Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_VCL_WINDOW_HXX
21 : #define INCLUDED_VCL_WINDOW_HXX
22 :
23 : #include <config_features.h>
24 : #include <tools/solar.h>
25 : #include <vcl/dllapi.h>
26 : #include <vcl/outdev.hxx>
27 : #include <tools/resid.hxx>
28 : #include <vcl/pointr.hxx>
29 : #include <tools/wintypes.hxx>
30 : #include <rsc/rsc-vcl-shared-types.hxx>
31 : #include <vcl/apptypes.hxx>
32 : #include <vcl/cursor.hxx>
33 : #include <vcl/inputctx.hxx>
34 : #include <vcl/keycodes.hxx>
35 : #include <vcl/region.hxx>
36 : #include <vcl/salnativewidgets.hxx>
37 : #include <rtl/ustring.hxx>
38 : #include <rtl/ref.hxx>
39 : #include <cppuhelper/weakref.hxx>
40 : #include <com/sun/star/uno/Reference.hxx>
41 : #include <memory>
42 :
43 : class VirtualDevice;
44 : struct ImplDelData;
45 : struct ImplSVEvent;
46 : struct ImplWinData;
47 : struct ImplFrameData;
48 : struct ImplCalcToTopData;
49 : struct SystemEnvData;
50 : struct SystemParentData;
51 : class ImplBorderWindow;
52 : class Idle;
53 : class Timer;
54 : class DockingManager;
55 : class ScrollBar;
56 : class Bitmap;
57 : class FixedText;
58 : class Image;
59 : class MouseEvent;
60 : class KeyEvent;
61 : class CommandEvent;
62 : class TrackingEvent;
63 : class HelpEvent;
64 : class DataChangedEvent;
65 : class VclSimpleEvent;
66 : class NotifyEvent;
67 : class SystemWindow;
68 : class SalFrame;
69 : class MenuFloatingWindow;
70 : class VCLXWindow;
71 :
72 : namespace com { namespace sun { namespace star {
73 : namespace accessibility {
74 : class XAccessible;
75 : }
76 : namespace beans {
77 : struct PropertyValue;
78 : }
79 : namespace rendering {
80 : class XCanvas;
81 : class XSpriteCanvas;
82 : }
83 : namespace awt {
84 : class XWindowPeer;
85 : class XWindow;
86 : }
87 : namespace uno {
88 : class Any;
89 : class XInterface;
90 : }
91 : namespace datatransfer { namespace clipboard {
92 : class XClipboard;
93 : }
94 : namespace dnd {
95 : class XDragGestureRecognizer;
96 : class XDragSource;
97 : class XDropTarget;
98 : }}}}}
99 :
100 : namespace vcl {
101 : struct ControlLayoutData;
102 : class RenderSettings;
103 : }
104 :
105 : namespace svt { class PopupWindowControllerImpl; }
106 :
107 : template<class T> class VclPtr;
108 :
109 : enum class TrackingEventFlags
110 : {
111 : NONE = 0x0000,
112 : Cancel = 0x0001,
113 : Key = 0x0002,
114 : Focus = 0x0004,
115 : Repeat = 0x0100,
116 : End = 0x1000,
117 : DontCallHdl = 0x8000,
118 : };
119 : namespace o3tl
120 : {
121 : template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x9107> {};
122 : }
123 :
124 :
125 : // - WindowTypes -
126 :
127 :
128 : // Type fuer GetWindow()
129 : enum class GetWindowType
130 : {
131 : Parent = 0,
132 : FirstChild = 1,
133 : LastChild = 2,
134 : Prev = 3,
135 : Next = 4,
136 : FirstOverlap = 5,
137 : LastOverlap = 6,
138 : Overlap = 7,
139 : ParentOverlap = 8,
140 : Client = 9,
141 : RealParent = 10,
142 : Frame = 11,
143 : Border = 12,
144 : FirstTopWindowChild = 13,
145 : LastTopWindowChild = 14,
146 : PrevTopWindowSibling = 15,
147 : NextTopWindowSibling = 16,
148 : };
149 :
150 : // Flags for setPosSizePixel()
151 : // These must match the definitions in css::awt::PosSize
152 : enum class PosSizeFlags
153 : {
154 : NONE = 0x0000,
155 : X = 0x0001,
156 : Y = 0x0002,
157 : Width = 0x0004,
158 : Height = 0x0008,
159 : Pos = X | Y,
160 : Size = Width | Height,
161 : PosSize = Pos | Size,
162 : All = PosSize,
163 : Dropdown = 0x0010,
164 : };
165 : namespace o3tl
166 : {
167 : template<> struct typed_flags<PosSizeFlags> : is_typed_flags<PosSizeFlags, 0x001f> {};
168 : }
169 :
170 : // Flags for Show()
171 : enum class ShowFlags
172 : {
173 : NONE = 0x0000,
174 : NoParentUpdate = 0x0001,
175 : NoFocusChange = 0x0002,
176 : NoActivate = 0x0004,
177 : ForegroundTask = 0x0008,
178 : };
179 : namespace o3tl
180 : {
181 : template<> struct typed_flags<ShowFlags> : is_typed_flags<ShowFlags, 0x000f> {};
182 : }
183 :
184 : // Flags for SetZOrder()
185 : enum class ZOrderFlags
186 : {
187 : NONE = 0x0000,
188 : Before = 0x0001,
189 : Behind = 0x0002,
190 : First = 0x0004,
191 : Last = 0x0008,
192 : };
193 : namespace o3tl
194 : {
195 : template<> struct typed_flags<ZOrderFlags> : is_typed_flags<ZOrderFlags, 0x000f> {};
196 : }
197 :
198 : // Activate-Flags
199 : enum class ActivateModeFlags
200 : {
201 : NONE = 0,
202 : GrabFocus = 0x0001,
203 : };
204 : namespace o3tl
205 : {
206 : template<> struct typed_flags<ActivateModeFlags> : is_typed_flags<ActivateModeFlags, 0x0001> {};
207 : }
208 :
209 : // ToTop-Flags
210 : enum class ToTopFlags
211 : {
212 : NONE = 0x0000,
213 : RestoreWhenMin = 0x0001,
214 : ForegroundTask = 0x0002,
215 : NoGrabFocus = 0x0004,
216 : GrabFocusOnly = 0x0008,
217 : };
218 : namespace o3tl
219 : {
220 : template<> struct typed_flags<ToTopFlags> : is_typed_flags<ToTopFlags, 0x000f> {};
221 : }
222 :
223 : // Flags for Invalidate
224 : // must match css::awt::InvalidateStyle
225 : enum class InvalidateFlags
226 : {
227 : NONE = 0x0000,
228 : Children = 0x0001,
229 : NoChildren = 0x0002,
230 : NoErase = 0x0004,
231 : Update = 0x0008,
232 : Transparent = 0x0010,
233 : NoTransparent = 0x0020,
234 : NoClipChildren = 0x4000,
235 : };
236 : namespace o3tl
237 : {
238 : template<> struct typed_flags<InvalidateFlags> : is_typed_flags<InvalidateFlags, 0x403f> {};
239 : }
240 :
241 : // Flags for Validate
242 : enum class ValidateFlags
243 : {
244 : NONE = 0x0000,
245 : Children = 0x0001,
246 : NoChildren = 0x0002
247 : };
248 : namespace o3tl
249 : {
250 : template<> struct typed_flags<ValidateFlags> : is_typed_flags<ValidateFlags, 0x0003> {};
251 : }
252 :
253 : // Flags for Scroll
254 : enum class ScrollFlags
255 : {
256 : NONE = 0x0000,
257 : Clip = 0x0001,
258 : Children = 0x0002,
259 : NoChildren = 0x0004,
260 : NoErase = 0x0008,
261 : NoInvalidate = 0x0010,
262 : NoWindowInvalidate = 0x0020,
263 : UseClipRegion = 0x0040,
264 : Update = 0x0080,
265 : };
266 : namespace o3tl
267 : {
268 : template<> struct typed_flags<ScrollFlags> : is_typed_flags<ScrollFlags, 0x00ff> {};
269 : }
270 :
271 : // Flags for ParentClipMode
272 : enum class ParentClipMode
273 : {
274 : NONE = 0x0000,
275 : Clip = 0x0001,
276 : NoClip = 0x0002,
277 : };
278 : namespace o3tl
279 : {
280 : template<> struct typed_flags<ParentClipMode> : is_typed_flags<ParentClipMode, 0x0003> {};
281 : }
282 :
283 : // Flags for Invert()
284 : enum class InvertFlags
285 : {
286 : NONE = 0x0000,
287 : Highlight = 0x0001,
288 : N50 = 0x0002,
289 : };
290 : namespace o3tl
291 : {
292 : template<> struct typed_flags<InvertFlags> : is_typed_flags<InvertFlags, 0x0003> {};
293 : }
294 :
295 : // Flags for ShowTracking()
296 : #define SHOWTRACK_SMALL ((sal_uInt16)0x0001)
297 : #define SHOWTRACK_BIG ((sal_uInt16)0x0002)
298 : #define SHOWTRACK_SPLIT ((sal_uInt16)0x0003)
299 : #define SHOWTRACK_OBJECT ((sal_uInt16)0x0004)
300 : #define SHOWTRACK_WINDOW ((sal_uInt16)0x1000)
301 : #define SHOWTRACK_CLIP ((sal_uInt16)0x2000)
302 : #define SHOWTRACK_STYLE ((sal_uInt16)0x000F)
303 :
304 : // Flags for StartTracking()
305 : enum class StartTrackingFlags
306 : {
307 : NONE = 0x0000,
308 : KeyInput = 0x0001,
309 : KeyMod = 0x0002,
310 : NoKeyCancel = 0x0004,
311 : ScrollRepeat = 0x0008,
312 : ButtonRepeat = 0x0010,
313 : MouseButtonDown = 0x0020,
314 : FocusCancel = 0x0040,
315 : };
316 : namespace o3tl
317 : {
318 : template<> struct typed_flags<StartTrackingFlags> : is_typed_flags<StartTrackingFlags, 0x007f> {};
319 : }
320 :
321 : // Flags for StartAutoScroll()
322 : enum class StartAutoScrollFlags
323 : {
324 : NONE = 0x0000,
325 : Vert = 0x0001,
326 : Horz = 0x0002,
327 : };
328 : namespace o3tl
329 : {
330 : template<> struct typed_flags<StartAutoScrollFlags> : is_typed_flags<StartAutoScrollFlags, 0x0003> {};
331 : }
332 :
333 : // Flags for StateChanged()
334 : enum class StateChangedType : sal_uInt16
335 : {
336 : InitShow = 1,
337 : Visible = 2,
338 : UpdateMode = 3,
339 : Enable = 4,
340 : Text = 5,
341 : Image = 6,
342 : Data = 7,
343 : State = 8,
344 : Style = 9,
345 : Zoom = 10,
346 : Border = 11,
347 : Transparent = 12,
348 : ControlFont = 13,
349 : ControlForeground = 14,
350 : ControlBackground = 15,
351 : ReadOnly = 16,
352 : ExtendedStyle = 17,
353 : Mirroring = 18,
354 : Layout = 19,
355 : ControlFocus = 20,
356 : User = 10000
357 : };
358 :
359 : // GetFocusFlags
360 : // must match constants in css:awt::FocusChangeReason
361 : enum class GetFocusFlags
362 : {
363 : NONE = 0x0000,
364 : Tab = 0x0001,
365 : CURSOR = 0x0002, // avoid name-clash with X11 #define
366 : Mnemonic = 0x0004,
367 : F6 = 0x0008,
368 : Forward = 0x0010,
369 : Backward = 0x0020,
370 : Around = 0x0040,
371 : UniqueMnemonic = 0x0100,
372 : Init = 0x0200,
373 : FloatWinPopupModeEndCancel = 0x0400,
374 : };
375 : namespace o3tl
376 : {
377 : template<> struct typed_flags<GetFocusFlags> : is_typed_flags<GetFocusFlags, 0x077f> {};
378 : }
379 :
380 :
381 : // Flags for Draw()
382 : enum class DrawFlags
383 : {
384 : NONE = 0x0000,
385 : Mono = 0x0001,
386 : NoBorder = 0x0002,
387 : NoControls = 0x0004,
388 : NoDisable = 0x0008,
389 : NoMnemonic = 0x0010,
390 : NoSelection = 0x0020,
391 : NoFocus = 0x0040,
392 : NoBackground = 0x0080,
393 : NoRollover = 0x0100,
394 : };
395 : namespace o3tl
396 : {
397 : template<> struct typed_flags<DrawFlags> : is_typed_flags<DrawFlags, 0x01ff> {};
398 : }
399 :
400 : // DialogControl-Flags
401 : enum class DialogControlFlags
402 : {
403 : NONE = 0x0000,
404 : Return = 0x0001,
405 : WantFocus = 0x0002,
406 : Mod1Tab = 0x0004,
407 : FloatWinPopupModeEndCancel = 0x0008,
408 : };
409 : namespace o3tl
410 : {
411 : template<> struct typed_flags<DialogControlFlags> : is_typed_flags<DialogControlFlags, 0x000f> {};
412 : }
413 :
414 : // EndExtTextInput() Flags
415 : enum class EndExtTextInputFlags
416 : {
417 : NONE = 0x0000,
418 : Complete = 0x0001
419 : };
420 : namespace o3tl
421 : {
422 : template<> struct typed_flags<EndExtTextInputFlags> : is_typed_flags<EndExtTextInputFlags, 0x0001> {};
423 : }
424 :
425 : #define IMPL_MINSIZE_BUTTON_WIDTH 70
426 : #define IMPL_MINSIZE_BUTTON_HEIGHT 22
427 : #define IMPL_EXTRA_BUTTON_WIDTH 18
428 : #define IMPL_EXTRA_BUTTON_HEIGHT 10
429 : #define IMPL_SEP_BUTTON_X 5
430 : #define IMPL_SEP_BUTTON_Y 5
431 : #define IMPL_MINSIZE_MSGBOX_WIDTH 150
432 : #define IMPL_DIALOG_OFFSET 5
433 : #define IMPL_DIALOG_BAR_OFFSET 3
434 : #define IMPL_MSGBOX_OFFSET_EXTRA_X 0
435 : #define IMPL_MSGBOX_OFFSET_EXTRA_Y 2
436 : #define IMPL_SEP_MSGBOX_IMAGE 8
437 :
438 : // ImplGetDlgWindow()
439 : enum class GetDlgWindowType
440 : {
441 : Prev, Next, First
442 : };
443 :
444 :
445 : // - Window -
446 :
447 :
448 : #ifdef DBG_UTIL
449 : const char* ImplDbgCheckWindow( const void* pObj );
450 : #endif
451 :
452 487550 : inline bool ImplDoTiledRendering()
453 : {
454 : #if !HAVE_FEATURE_DESKTOP && !defined(ANDROID)
455 : // We do tiled rendering only for iOS at the moment, actually, but
456 : // let's see what happens if we assume it for Android, too.
457 : // (That comment doesn't match what the code does, does it?)
458 : return true;
459 : #else
460 : // We need some way to know globally if this process will use
461 : // tiled rendering or not. Or should this be a per-window setting?
462 : // Or what?
463 487550 : return false;
464 : #endif
465 : }
466 :
467 :
468 :
469 : namespace vcl { class Window; }
470 : vcl::Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos );
471 :
472 : namespace vcl { class Cursor; }
473 : class Dialog;
474 : class WindowImpl;
475 : class PaintHelper;
476 : class VclBuilder;
477 : class VclSizeGroup;
478 : class OutputDevice;
479 : class Application;
480 : class SystemWindow;
481 : class WorkWindow;
482 : class Dialog;
483 : class MessBox;
484 : class DockingWindow;
485 : class FloatingWindow;
486 : class GroupBox;
487 : class PushButton;
488 : class RadioButton;
489 : class SystemChildWindow;
490 : class ImplBorderWindow;
491 : class VclBuilder;
492 : class ImplDockingWindowWrapper;
493 : class ImplPopupFloatWin;
494 : class MenuFloatingWindow;
495 : class LifecycleTest;
496 :
497 : namespace svt { class PopupWindowControllerImpl; }
498 :
499 11588 : struct WindowResHeader
500 : {
501 : sal_uLong nObjMask;
502 : OString aHelpId;
503 : sal_uLong nRSStyle;
504 : };
505 :
506 : namespace vcl {
507 :
508 : class VCL_DLLPUBLIC RenderTools
509 : {
510 : public:
511 : // transparent background for selected or checked items in toolboxes etc.
512 : // + selection Color with a text color complementing the selection background
513 : // + rounded edge
514 : static void DrawSelectionBackground(vcl::RenderContext& rRenderContext, vcl::Window& rWindow,
515 : const Rectangle& rRect, sal_uInt16 nHighlight,
516 : bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly,
517 : Color* pSelectionTextColor = nullptr, long nCornerRadius = 0,
518 : Color* pPaintColor = nullptr);
519 : };
520 :
521 : class VCL_DLLPUBLIC Window : public ::OutputDevice, public Resource
522 : {
523 : friend class ::vcl::Cursor;
524 : friend class ::OutputDevice;
525 : friend class ::Application;
526 : friend class ::SystemWindow;
527 : friend class ::WorkWindow;
528 : friend class ::Dialog;
529 : friend class ::MessBox;
530 : friend class ::DockingWindow;
531 : friend class ::FloatingWindow;
532 : friend class ::GroupBox;
533 : friend class ::PushButton;
534 : friend class ::RadioButton;
535 : friend class ::SystemChildWindow;
536 : friend class ::ImplBorderWindow;
537 : friend class ::VclBuilder;
538 : friend class ::PaintHelper;
539 : friend class ::LifecycleTest;
540 :
541 : // TODO: improve missing functionality
542 : // only required because of SetFloatingMode()
543 : friend class ::ImplDockingWindowWrapper;
544 : friend class ::ImplPopupFloatWin;
545 : friend class ::MenuFloatingWindow;
546 :
547 : friend class ::svt::PopupWindowControllerImpl;
548 :
549 : private:
550 : // NOTE: to remove many dependencies of other modules
551 : // to this central file, all members are now hidden
552 : // in the WindowImpl class and all inline functions
553 : // were removed.
554 : // (WindowImpl is a pImpl pattern)
555 :
556 : // Please do *not* add new members or inline functions to class Window,
557 : // but use class WindowImpl instead
558 :
559 : WindowImpl* mpWindowImpl;
560 :
561 : #ifdef DBG_UTIL
562 : friend const char* ::ImplDbgCheckWindow( const void* pObj );
563 : #endif
564 : friend vcl::Window* ::ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos );
565 :
566 : public:
567 :
568 : DECL_DLLPRIVATE_LINK_TYPED( ImplHandlePaintHdl, Idle*, void );
569 : DECL_DLLPRIVATE_LINK( ImplGenerateMouseMoveHdl, void* );
570 : DECL_DLLPRIVATE_LINK_TYPED( ImplTrackTimerHdl, Timer*, void );
571 : DECL_DLLPRIVATE_LINK( ImplAsyncFocusHdl, void* );
572 : DECL_DLLPRIVATE_LINK_TYPED( ImplHandleResizeTimerHdl, Idle*, void );
573 : DECL_DLLPRIVATE_LINK( ImplHideOwnerDrawWindowsHdl, void* );
574 :
575 :
576 : SAL_DLLPRIVATE static void ImplInitAppFontData( vcl::Window* pWindow );
577 :
578 : SAL_DLLPRIVATE vcl::Window* ImplGetFrameWindow() const;
579 : SalFrame* ImplGetFrame() const;
580 : SAL_DLLPRIVATE ImplFrameData* ImplGetFrameData();
581 :
582 : SAL_DLLPRIVATE vcl::Window* ImplGetWindow();
583 : SAL_DLLPRIVATE ImplWinData* ImplGetWinData() const;
584 : SAL_DLLPRIVATE vcl::Window* ImplGetClientWindow() const;
585 : SAL_DLLPRIVATE vcl::Window* ImplGetDlgWindow( sal_uInt16 n, GetDlgWindowType nType, sal_uInt16 nStart = 0, sal_uInt16 nEnd = 0xFFFF, sal_uInt16* pIndex = NULL );
586 : SAL_DLLPRIVATE vcl::Window* ImplGetParent() const;
587 : SAL_DLLPRIVATE vcl::Window* ImplFindWindow( const Point& rFramePos );
588 :
589 : SAL_DLLPRIVATE void ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFlags nFlags );
590 : SAL_DLLPRIVATE void ImplInvalidateOverlapFrameRegion( const vcl::Region& rRegion );
591 :
592 : SAL_DLLPRIVATE bool ImplSetClipFlag( bool bSysObjOnlySmaller = false );
593 :
594 : SAL_DLLPRIVATE bool ImplIsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const;
595 : SAL_DLLPRIVATE bool ImplIsChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const;
596 : SAL_DLLPRIVATE bool ImplIsFloatingWindow() const;
597 : SAL_DLLPRIVATE bool ImplIsPushButton() const;
598 : SAL_DLLPRIVATE bool ImplIsSplitter() const;
599 : SAL_DLLPRIVATE bool ImplIsOverlapWindow() const;
600 :
601 : SAL_DLLPRIVATE void ImplIsInTaskPaneList( bool mbIsInTaskList );
602 :
603 1456819 : SAL_DLLPRIVATE WindowImpl* ImplGetWindowImpl() const { return mpWindowImpl; }
604 :
605 : SAL_DLLPRIVATE Point ImplFrameToOutput( const Point& rPos );
606 :
607 : SAL_DLLPRIVATE void ImplGrabFocus( GetFocusFlags nFlags );
608 : SAL_DLLPRIVATE void ImplGrabFocusToDocument( GetFocusFlags nFlags );
609 : SAL_DLLPRIVATE void ImplInvertFocus( const Rectangle& rRect );
610 :
611 : SAL_DLLPRIVATE PointerStyle ImplGetMousePointer() const;
612 : SAL_DLLPRIVATE void ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged = false );
613 : SAL_DLLPRIVATE void ImplGenerateMouseMove();
614 :
615 : SAL_DLLPRIVATE void ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt );
616 : SAL_DLLPRIVATE void ImplNotifyIconifiedState( bool bIconified );
617 :
618 : SAL_DLLPRIVATE void ImplUpdateAll( bool bOverlapWindows = true );
619 :
620 : SAL_DLLPRIVATE void ImplDeleteOverlapBackground();
621 :
622 : SAL_DLLPRIVATE void ImplControlFocus( GetFocusFlags nFlags = GetFocusFlags::NONE );
623 :
624 : SAL_DLLPRIVATE void ImplMirrorFramePos( Point &pt ) const;
625 :
626 : SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags );
627 :
628 : SAL_DLLPRIVATE void ImplAddDel( ImplDelData* pDel );
629 : SAL_DLLPRIVATE void ImplRemoveDel( ImplDelData* pDel );
630 :
631 : SAL_DLLPRIVATE void ImplCallResize();
632 : SAL_DLLPRIVATE void ImplCallMove();
633 :
634 : SAL_DLLPRIVATE void ImplIncModalCount();
635 : SAL_DLLPRIVATE void ImplDecModalCount();
636 :
637 : SAL_DLLPRIVATE static void ImplCalcSymbolRect( Rectangle& rRect );
638 :
639 : protected:
640 :
641 : /** This is intended to be used to clear any locally held references to other Window-subclass objects */
642 : virtual void dispose() SAL_OVERRIDE;
643 :
644 : SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData );
645 :
646 : SAL_DLLPRIVATE Point ImplOutputToFrame( const Point& rPos );
647 :
648 : SAL_DLLPRIVATE void ImplInvalidateParentFrameRegion( vcl::Region& rRegion );
649 : SAL_DLLPRIVATE void ImplValidateFrameRegion( const vcl::Region* rRegion, ValidateFlags nFlags );
650 : SAL_DLLPRIVATE void ImplValidate( const vcl::Region* rRegion, ValidateFlags nFlags );
651 : SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren );
652 : SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren );
653 :
654 : SAL_DLLPRIVATE vcl::Window* ImplGetBorderWindow() const;
655 :
656 : SAL_DLLPRIVATE void ImplInvalidate( const vcl::Region* rRegion, InvalidateFlags nFlags );
657 :
658 : SAL_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rFramePos );
659 :
660 : SAL_DLLPRIVATE void ImplSetMouseTransparent( bool bTransparent );
661 :
662 : SAL_DLLPRIVATE void ImplScroll( const Rectangle& rRect, long nHorzScroll, long nVertScroll, ScrollFlags nFlags );
663 :
664 : SAL_DLLPRIVATE void ImplSaveOverlapBackground();
665 : SAL_DLLPRIVATE bool ImplRestoreOverlapBackground( vcl::Region& rInvRegion );
666 : SAL_DLLPRIVATE void ImplInvalidateAllOverlapBackgrounds();
667 :
668 : SAL_DLLPRIVATE bool ImplSetClipFlagChildren( bool bSysObjOnlySmaller = false );
669 : SAL_DLLPRIVATE bool ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller = false );
670 :
671 : SAL_DLLPRIVATE WinBits ImplInitRes( const ResId& rResId );
672 : SAL_DLLPRIVATE WindowResHeader ImplLoadResHeader( const ResId& rResId );
673 : SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
674 :
675 : SAL_DLLPRIVATE void PushPaintHelper(PaintHelper* pHelper, vcl::RenderContext& rRenderContext);
676 : SAL_DLLPRIVATE void PopPaintHelper(PaintHelper* pHelper);
677 :
678 : private:
679 :
680 : SAL_DLLPRIVATE void ImplInitWindowData( WindowType nType );
681 :
682 : SAL_DLLPRIVATE void getFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
683 : OutputDevice& rOutDev );
684 :
685 :
686 : SAL_DLLPRIVATE void drawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
687 : const OutputDevice& rOutDev, const vcl::Region& rRegion );
688 :
689 : SAL_DLLPRIVATE void ImplSetFrameParent( const vcl::Window* pParent );
690 :
691 : SAL_DLLPRIVATE void ImplInsertWindow( vcl::Window* pParent );
692 : SAL_DLLPRIVATE void ImplRemoveWindow( bool bRemoveFrameData );
693 :
694 : SAL_DLLPRIVATE SalGraphics* ImplGetFrameGraphics() const;
695 :
696 : SAL_DLLPRIVATE void ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow, vcl::Window* pOldOverlapWindow );
697 : SAL_DLLPRIVATE vcl::Window* ImplGetFirstOverlapWindow();
698 : SAL_DLLPRIVATE const vcl::Window* ImplGetFirstOverlapWindow() const;
699 :
700 : SAL_DLLPRIVATE bool ImplIsRealParentPath( const vcl::Window* pWindow ) const;
701 :
702 : SAL_DLLPRIVATE bool ImplTestMousePointerSet();
703 :
704 : SAL_DLLPRIVATE void ImplResetReallyVisible();
705 : SAL_DLLPRIVATE void ImplSetReallyVisible();
706 :
707 : SAL_DLLPRIVATE void ImplCallInitShow();
708 :
709 : SAL_DLLPRIVATE void ImplInitResolutionSettings();
710 :
711 : SAL_DLLPRIVATE void ImplPointToLogic(vcl::RenderContext& rRenderContext, vcl::Font& rFont) const;
712 : SAL_DLLPRIVATE void ImplLogicToPoint(vcl::RenderContext& rRenderContext, vcl::Font& rFont) const;
713 :
714 : SAL_DLLPRIVATE bool ImplSysObjClip( const vcl::Region* pOldRegion );
715 : SAL_DLLPRIVATE void ImplUpdateSysObjChildrenClip();
716 : SAL_DLLPRIVATE void ImplUpdateSysObjOverlapsClip();
717 : SAL_DLLPRIVATE void ImplUpdateSysObjClip();
718 :
719 : SAL_DLLPRIVATE void ImplIntersectWindowClipRegion( vcl::Region& rRegion );
720 : SAL_DLLPRIVATE void ImplIntersectWindowRegion( vcl::Region& rRegion );
721 : SAL_DLLPRIVATE void ImplExcludeWindowRegion( vcl::Region& rRegion );
722 : SAL_DLLPRIVATE void ImplExcludeOverlapWindows( vcl::Region& rRegion );
723 : SAL_DLLPRIVATE void ImplExcludeOverlapWindows2( vcl::Region& rRegion );
724 :
725 : SAL_DLLPRIVATE void ImplClipBoundaries( vcl::Region& rRegion, bool bThis, bool bOverlaps );
726 : SAL_DLLPRIVATE bool ImplClipChildren( vcl::Region& rRegion );
727 : SAL_DLLPRIVATE void ImplClipAllChildren( vcl::Region& rRegion );
728 : SAL_DLLPRIVATE void ImplClipSiblings( vcl::Region& rRegion );
729 :
730 : SAL_DLLPRIVATE void ImplInitWinClipRegion();
731 : SAL_DLLPRIVATE void ImplInitWinChildClipRegion();
732 : SAL_DLLPRIVATE vcl::Region* ImplGetWinChildClipRegion();
733 :
734 : SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows( const vcl::Region& rInterRegion, vcl::Region& rRegion );
735 : SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows2( const vcl::Region& rInterRegion, vcl::Region& rRegion );
736 : SAL_DLLPRIVATE void ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl::Region& rRegion );
737 : SAL_DLLPRIVATE void ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& rRegion,
738 : bool bChildren, bool bParent, bool bSiblings );
739 :
740 : /** Invoke the actual painting.
741 :
742 : This function is kind of recursive - it may be called from the
743 : PaintHelper destructor; and on the other hand it creates PaintHelper
744 : that (when destructed) calls other ImplCallPaint()'s.
745 :
746 : @param rBuffer VirtualDevice for double-buffering. It is only passed
747 : here, the actual handling happens in the PaintHelper.
748 : */
749 : SAL_DLLPRIVATE void ImplCallPaint(const VclPtr<VirtualDevice>& rBuffer, const vcl::Region* pRegion, sal_uInt16 nPaintFlags);
750 :
751 : SAL_DLLPRIVATE void ImplCallOverlapPaint();
752 : SAL_DLLPRIVATE void ImplPostPaint();
753 :
754 : SAL_DLLPRIVATE void ImplUpdateWindowPtr( vcl::Window* pWindow );
755 : SAL_DLLPRIVATE void ImplUpdateWindowPtr();
756 : SAL_DLLPRIVATE void ImplUpdateOverlapWindowPtr( bool bNewFrame );
757 :
758 : SAL_DLLPRIVATE bool ImplUpdatePos();
759 : SAL_DLLPRIVATE void ImplUpdateSysObjPos();
760 :
761 : SAL_DLLPRIVATE void ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl = true );
762 :
763 : SAL_DLLPRIVATE void ImplAlignChildren();
764 : SAL_DLLPRIVATE void ImplToBottomChild();
765 :
766 : SAL_DLLPRIVATE void ImplCalcToTop( ImplCalcToTopData* pPrevData );
767 : SAL_DLLPRIVATE void ImplToTop( ToTopFlags nFlags );
768 : SAL_DLLPRIVATE void ImplStartToTop( ToTopFlags nFlags );
769 : SAL_DLLPRIVATE void ImplFocusToTop( ToTopFlags nFlags, bool bReallyVisible );
770 :
771 : SAL_DLLPRIVATE void ImplShowAllOverlaps();
772 : SAL_DLLPRIVATE void ImplHideAllOverlaps();
773 :
774 : SAL_DLLPRIVATE bool ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput );
775 : SAL_DLLPRIVATE bool ImplHasDlgCtrl();
776 : SAL_DLLPRIVATE void ImplDlgCtrlNextWindow();
777 : SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged( vcl::Window* pWindow, bool bGetFocus );
778 : SAL_DLLPRIVATE vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pWindow );
779 :
780 : SAL_DLLPRIVATE long ImplLogicUnitToPixelX( long nX, MapUnit eUnit );
781 : SAL_DLLPRIVATE long ImplLogicUnitToPixelY( long nY, MapUnit eUnit );
782 :
783 : SAL_DLLPRIVATE bool ImplIsWindowInFront( const vcl::Window* pTestWindow ) const;
784 :
785 : SAL_DLLPRIVATE static void ImplNewInputContext();
786 :
787 : SAL_DLLPRIVATE void ImplCallActivateListeners(vcl::Window*);
788 : SAL_DLLPRIVATE void ImplCallDeactivateListeners(vcl::Window*);
789 :
790 : SAL_DLLPRIVATE void ImplHandleScroll( ScrollBar* pHScrl, long nX, ScrollBar* pVScrl, long nY );
791 :
792 : SAL_DLLPRIVATE Rectangle ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle& rRect ) const;
793 : SAL_DLLPRIVATE long ImplGetUnmirroredOutOffX();
794 :
795 : // retrieves the list of owner draw decorated windows for this window hiearchy
796 : SAL_DLLPRIVATE ::std::vector<VclPtr<vcl::Window> >& ImplGetOwnerDrawList();
797 :
798 : SAL_DLLPRIVATE vcl::Window* ImplGetTopmostFrameWindow();
799 :
800 : SAL_DLLPRIVATE Rectangle ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const;
801 :
802 : SAL_DLLPRIVATE bool ImplStopDnd();
803 : SAL_DLLPRIVATE void ImplStartDnd();
804 :
805 : SAL_DLLPRIVATE void ImplPaintToDevice( ::OutputDevice* pTargetOutDev, const Point& rPos );
806 :
807 : SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas >
808 : ImplGetCanvas( const Size& rFullscreenSize, bool bFullscreen, bool bSpriteCanvas ) const;
809 :
810 : public:
811 : virtual vcl::Region GetActiveClipRegion() const SAL_OVERRIDE;
812 :
813 : protected:
814 : // Single argument ctors shall be explicit.
815 : explicit Window( WindowType nType );
816 :
817 : void SetCompoundControl( bool bCompound );
818 :
819 : void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
820 : static void FireVclEvent( VclSimpleEvent* pEvent );
821 :
822 : virtual bool AcquireGraphics() const SAL_OVERRIDE;
823 : virtual void ReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
824 :
825 : virtual void InitClipRegion() SAL_OVERRIDE;
826 :
827 : // FIXME: this is a hack to workaround missing layout functionality
828 : SAL_DLLPRIVATE void ImplAdjustNWFSizes();
829 :
830 : virtual void CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate = false) SAL_OVERRIDE;
831 : virtual void ClipToPaintRegion( Rectangle& rDstRect ) SAL_OVERRIDE;
832 : virtual bool UsePolyPolygonForComplexGradient() SAL_OVERRIDE;
833 :
834 1227 : virtual void DrawGradientWallpaper(long nX, long nY, long nWidth, long nHeight,
835 : const Wallpaper& rWallpaper) SAL_OVERRIDE
836 : {
837 1227 : OutputDevice::DrawGradientWallpaper(nX, nY, nWidth, nHeight, rWallpaper);
838 1227 : }
839 :
840 : void DrawGradientWallpaper(vcl::RenderContext& rRenderContext, long nX, long nY,
841 : long nWidth, long nHeight, const Wallpaper& rWallpaper);
842 :
843 : virtual void ApplySettings(vcl::RenderContext& rRenderContext);
844 : public:
845 : bool HasMirroredGraphics() const SAL_OVERRIDE;
846 :
847 : public:
848 : // Single argument ctors shall be explicit.
849 : explicit Window( vcl::Window* pParent, WinBits nStyle = 0 );
850 :
851 : Window( vcl::Window* pParent, const ResId& rResId );
852 : virtual ~Window();
853 :
854 : ::OutputDevice const* GetOutDev() const;
855 : ::OutputDevice* GetOutDev();
856 :
857 : virtual void EnableRTL ( bool bEnable = true ) SAL_OVERRIDE;
858 : virtual void MouseMove( const MouseEvent& rMEvt );
859 : virtual void MouseButtonDown( const MouseEvent& rMEvt );
860 : virtual void MouseButtonUp( const MouseEvent& rMEvt );
861 : virtual void KeyInput( const KeyEvent& rKEvt );
862 : virtual void KeyUp( const KeyEvent& rKEvt );
863 : virtual void PrePaint(vcl::RenderContext& rRenderContext);
864 : virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect);
865 : virtual void PostPaint(vcl::RenderContext& rRenderContext);
866 : void Erase(vcl::RenderContext& rRenderContext);
867 :
868 0 : virtual void Erase() SAL_OVERRIDE
869 : {
870 0 : OutputDevice::Erase();
871 0 : }
872 :
873 11560 : virtual void Erase(const Rectangle& rRect) SAL_OVERRIDE
874 : {
875 11560 : OutputDevice::Erase(rRect);
876 11560 : }
877 :
878 : virtual void Draw( ::OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags );
879 : virtual void Move();
880 : virtual void Resize();
881 : virtual void Activate();
882 : virtual void Deactivate();
883 : virtual void GetFocus();
884 : virtual void LoseFocus();
885 : virtual void RequestHelp( const HelpEvent& rHEvt );
886 : virtual void Command( const CommandEvent& rCEvt );
887 : virtual void Tracking( const TrackingEvent& rTEvt );
888 : virtual void StateChanged( StateChangedType nStateChange );
889 : virtual void DataChanged( const DataChangedEvent& rDCEvt );
890 : virtual bool PreNotify( NotifyEvent& rNEvt );
891 : virtual bool Notify( NotifyEvent& rNEvt );
892 : virtual vcl::Window* GetPreferredKeyInputWindow();
893 :
894 : // These methods call the relevant virtual method when not in/post dispose
895 : void CompatGetFocus();
896 : void CompatLoseFocus();
897 : void CompatStateChanged( StateChangedType nStateChange );
898 : void CompatDataChanged( const DataChangedEvent& rDCEvt );
899 : bool CompatPreNotify( NotifyEvent& rNEvt );
900 : bool CompatNotify( NotifyEvent& rNEvt );
901 :
902 : void AddEventListener( const Link<>& rEventListener );
903 : void RemoveEventListener( const Link<>& rEventListener );
904 : void AddChildEventListener( const Link<>& rEventListener );
905 : void RemoveChildEventListener( const Link<>& rEventListener );
906 :
907 : ImplSVEvent * PostUserEvent( const Link<>& rLink, void* pCaller = NULL, bool bReferenceLink = false );
908 : void RemoveUserEvent( ImplSVEvent * nUserEvent );
909 :
910 : void IncrementLockCount();
911 : void DecrementLockCount();
912 : bool IsLocked( bool bChildren = false ) const;
913 :
914 : // returns the input language used for the last key stroke
915 : // may be LANGUAGE_DONTKNOW if not supported by the OS
916 : LanguageType GetInputLanguage() const;
917 :
918 : void SetStyle( WinBits nStyle );
919 : WinBits GetStyle() const;
920 : WinBits GetPrevStyle() const;
921 : void SetExtendedStyle( WinBits nExtendedStyle );
922 : WinBits GetExtendedStyle() const;
923 : void SetType( WindowType nType );
924 : WindowType GetType() const;
925 : bool IsSystemWindow() const;
926 : bool IsDockingWindow() const;
927 : bool IsDialog() const;
928 : bool IsMenuFloatingWindow() const;
929 : bool IsToolbarFloatingWindow() const;
930 : bool IsTopWindow() const;
931 : bool IsDisposed() const;
932 : SystemWindow* GetSystemWindow() const;
933 :
934 : /// Can the widget derived from this Window do the double-buffering via RenderContext properly?
935 : bool SupportsDoubleBuffering() const;
936 : /// Mark this window / widget derived from this window as working with double-buffering via RenderContext.
937 : void SetDoubleBuffering(bool bDoubleBuffering = true);
938 :
939 : void EnableAllResize( bool bEnable = true );
940 :
941 : void SetBorderStyle( WindowBorderStyle nBorderStyle );
942 : WindowBorderStyle GetBorderStyle() const;
943 : void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
944 : sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
945 : Size CalcWindowSize( const Size& rOutSz ) const;
946 : Size CalcOutputSize( const Size& rWinSz ) const;
947 : long CalcTitleWidth() const;
948 :
949 : void EnableClipSiblings( bool bClipSiblings = true );
950 :
951 : void EnableChildTransparentMode( bool bEnable = true );
952 : bool IsChildTransparentModeEnabled() const;
953 :
954 : void SetMouseTransparent( bool bTransparent );
955 : bool IsMouseTransparent() const;
956 : void SetPaintTransparent( bool bTransparent );
957 : bool IsPaintTransparent() const;
958 : void SetDialogControlStart( bool bStart );
959 : bool IsDialogControlStart() const;
960 : void SetDialogControlFlags( DialogControlFlags nFlags );
961 : DialogControlFlags GetDialogControlFlags() const;
962 :
963 249 : struct PointerState
964 : {
965 : sal_uLong mnState; // the button state
966 : Point maPos; // mouse position in output coordinates
967 : };
968 : PointerState GetPointerState();
969 : bool IsMouseOver();
970 :
971 : sal_uLong GetCurrentModButtons();
972 :
973 : void SetInputContext( const InputContext& rInputContext );
974 : const InputContext& GetInputContext() const;
975 : void EndExtTextInput( EndExtTextInputFlags nFlags );
976 : void SetCursorRect( const Rectangle* pRect = NULL, long nExtTextInputWidth = 0 );
977 : const Rectangle* GetCursorRect() const;
978 : long GetCursorExtTextInputWidth() const;
979 :
980 : void SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, bool bVertical = false );
981 :
982 : using ::OutputDevice::SetSettings;
983 : virtual void SetSettings( const AllSettings& rSettings ) SAL_OVERRIDE;
984 : void SetSettings( const AllSettings& rSettings, bool bChild );
985 : void UpdateSettings( const AllSettings& rSettings, bool bChild = false );
986 : void NotifyAllChildren( DataChangedEvent& rDCEvt );
987 :
988 : void SetPointFont(vcl::RenderContext& rRenderContext, const vcl::Font& rFont);
989 : vcl::Font GetPointFont(vcl::RenderContext& rRenderContext) const;
990 : void SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::Font& rFont);
991 : long GetDrawPixel( ::OutputDevice* pDev, long nPixels ) const;
992 : vcl::Font GetDrawPixelFont( ::OutputDevice* pDev ) const;
993 :
994 : void SetControlFont();
995 : void SetControlFont( const vcl::Font& rFont );
996 : vcl::Font GetControlFont() const;
997 : bool IsControlFont() const;
998 : void ApplyControlFont(vcl::RenderContext& rRenderContext, const vcl::Font& rDefaultFont);
999 :
1000 : void SetControlForeground();
1001 : void SetControlForeground(const Color& rColor);
1002 : Color GetControlForeground() const;
1003 : bool IsControlForeground() const;
1004 : void ApplyControlForeground(vcl::RenderContext& rRenderContext, const Color& rDefaultColor);
1005 :
1006 : void SetControlBackground();
1007 : void SetControlBackground( const Color& rColor );
1008 : Color GetControlBackground() const;
1009 : bool IsControlBackground() const;
1010 : void ApplyControlBackground(vcl::RenderContext& rRenderContext, const Color& rDefaultColor);
1011 :
1012 : void SetParentClipMode( ParentClipMode nMode = ParentClipMode::NONE );
1013 : ParentClipMode GetParentClipMode() const;
1014 :
1015 : void SetWindowRegionPixel();
1016 : void SetWindowRegionPixel( const vcl::Region& rRegion );
1017 : const vcl::Region& GetWindowRegionPixel() const;
1018 : bool IsWindowRegionPixel() const;
1019 : vcl::Region GetWindowClipRegionPixel() const;
1020 : vcl::Region GetPaintRegion() const;
1021 : bool IsInPaint() const;
1022 : // while IsInPaint returns true ExpandPaintClipRegion adds the
1023 : // submitted region to the paint clip region so you can
1024 : // paint additional parts of your window if necessary
1025 : void ExpandPaintClipRegion( const vcl::Region& rRegion );
1026 :
1027 : void SetParent( vcl::Window* pNewParent );
1028 : vcl::Window* GetParent() const;
1029 : // return the dialog we are contained in or NULL if un-contained
1030 : Dialog* GetParentDialog() const;
1031 :
1032 : void Show( bool bVisible = true, ShowFlags nFlags = ShowFlags::NONE );
1033 411702 : void Hide() { Show( false ); }
1034 : bool IsVisible() const;
1035 : bool IsReallyVisible() const;
1036 : bool IsReallyShown() const;
1037 : bool IsInInitShow() const;
1038 :
1039 : void Enable( bool bEnable = true, bool bChild = true );
1040 2127 : void Disable( bool bChild = true ) { Enable( false, bChild ); }
1041 : bool IsEnabled() const;
1042 :
1043 : void EnableInput( bool bEnable = true, bool bChild = true );
1044 : void EnableInput( bool bEnable, bool bChild, bool bSysWin,
1045 : const vcl::Window* pExcludeWindow = NULL );
1046 : bool IsInputEnabled() const;
1047 :
1048 : vcl::RenderSettings& GetRenderSettings();
1049 :
1050 : /** Override <code>EnableInput</code>. This can be necessary due to other people
1051 : using EnableInput for whole window hierarchies.
1052 :
1053 :
1054 : <code>AlwaysEnableInput</code> and <code>AlwaysDisableInput</code> are
1055 : mutually exclusive; the last setter wins.
1056 : @param bAlways
1057 : sets always enabled flag
1058 :
1059 : @param bChild
1060 : if true children are recursively set to AlwaysEnableInput
1061 : */
1062 : void AlwaysEnableInput( bool bAlways, bool bChild = true );
1063 : /** returns the current AlwaysEnableInput state
1064 : @return
1065 : true if window is in AlwaysEnableInput state
1066 : */
1067 : bool IsAlwaysEnableInput() const;
1068 : /** Override <code>EnableInput</code>, counterpart to AlwaysEnableInput.
1069 : Windows with AlwaysDisableInput will not get key events even if enabled
1070 : and input enabled.This can be necessary due to other people using EnableInput
1071 : for whole window hierarchies.
1072 :
1073 : <code>AlwaysEnableInput</code> and <code>AlwaysDisableInput</code> are
1074 : mutually exclusive; the last setter wins.
1075 :
1076 : @param bAlways
1077 : sets always disable flag
1078 :
1079 : @param bChild
1080 : if true children are recursively set to AlwaysDisableInput
1081 : */
1082 : void AlwaysDisableInput( bool bAlways, bool bChild = true );
1083 :
1084 : /** usually event handlers (see AddEventListener and AddChildEventListener)
1085 : are not called on disabled, modal or input disabled windows. There are however rare cases
1086 : in which one wants a Window or rather one of its Control subclasses to
1087 : not evaluate events but still react to those events externally. In these
1088 : rare cases call SetCallHandlersOnInputDisabled( true ) to have your handler
1089 : called anyway.
1090 :
1091 : Currently only mouse events get this special treatment.
1092 :
1093 : Use this sparingly, chances are if you want to use it you're working around
1094 : the real problem.
1095 :
1096 : @param bCall
1097 : Enable/Disable calling event handlers for this disabled, modal or input disabled window.
1098 : This call is implicity done recursively for possible child windows.
1099 : */
1100 : void SetCallHandlersOnInputDisabled( bool bCall );
1101 : /** get state of SetCallHandlersOnInputDisabled
1102 :
1103 : @returns whether handlers are called regardless of input enabled state
1104 : */
1105 : bool IsCallHandlersOnInputDisabled() const;
1106 : /** A window is in modal mode if one of its children or subchildren
1107 : is a running modal window (a modal dialog)
1108 :
1109 : @returns sal_True if a child or subchild is a running modal window
1110 : */
1111 : bool IsInModalMode() const;
1112 :
1113 : void SetActivateMode( ActivateModeFlags nMode );
1114 : ActivateModeFlags GetActivateMode() const;
1115 :
1116 : void ToTop( ToTopFlags nFlags = ToTopFlags::NONE );
1117 : void SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags );
1118 : void EnableAlwaysOnTop( bool bEnable = true );
1119 : bool IsAlwaysOnTopEnabled() const;
1120 :
1121 : virtual void setPosSizePixel( long nX, long nY,
1122 : long nWidth, long nHeight,
1123 : PosSizeFlags nFlags = PosSizeFlags::All );
1124 : virtual void SetPosPixel( const Point& rNewPos );
1125 : virtual Point GetPosPixel() const;
1126 : virtual void SetSizePixel( const Size& rNewSize );
1127 : virtual Size GetSizePixel() const;
1128 : virtual void SetPosSizePixel( const Point& rNewPos,
1129 : const Size& rNewSize );
1130 : virtual void SetOutputSizePixel( const Size& rNewSize );
1131 : bool IsDefaultPos() const;
1132 : bool IsDefaultSize() const;
1133 :
1134 : // those conversion routines might deliver different results during UI mirroring
1135 : Point OutputToScreenPixel( const Point& rPos ) const;
1136 : Point ScreenToOutputPixel( const Point& rPos ) const;
1137 : // the normalized screen methods work independent from UI mirroring
1138 : Point OutputToNormalizedScreenPixel( const Point& rPos ) const;
1139 : Point NormalizedScreenToOutputPixel( const Point& rPos ) const;
1140 : Point OutputToAbsoluteScreenPixel( const Point& rPos ) const;
1141 : Point AbsoluteScreenToOutputPixel( const Point& rPos ) const;
1142 : Rectangle GetDesktopRectPixel() const;
1143 : // window extents including border and decoratrion
1144 : Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const;
1145 : // window extents of the client window, coordinates to be used in SetPosPixel
1146 : Rectangle GetClientWindowExtentsRelative( vcl::Window *pRelativeWindow ) const;
1147 :
1148 : bool IsScrollable() const;
1149 : virtual void Scroll( long nHorzScroll, long nVertScroll,
1150 : ScrollFlags nFlags = ScrollFlags::NONE );
1151 : void Scroll( long nHorzScroll, long nVertScroll,
1152 : const Rectangle& rRect, ScrollFlags nFlags = ScrollFlags::NONE );
1153 : virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE );
1154 : virtual void Invalidate( const Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE );
1155 : virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE );
1156 : void Validate( ValidateFlags nFlags = ValidateFlags::NONE );
1157 : bool HasPaintEvent() const;
1158 : void Update();
1159 : void Flush();
1160 : void Sync();
1161 :
1162 : // toggles new docking support, enabled via toolkit
1163 : void EnableDocking( bool bEnable = true );
1164 : // retrieves the single dockingmanager instance
1165 : static DockingManager* GetDockingManager();
1166 :
1167 : void EnablePaint( bool bEnable );
1168 : bool IsPaintEnabled() const;
1169 : void SetUpdateMode( bool bUpdate );
1170 : bool IsUpdateMode() const;
1171 : void SetParentUpdateMode( bool bUpdate );
1172 :
1173 : void GrabFocus();
1174 : bool HasFocus() const;
1175 : bool HasChildPathFocus( bool bSystemWindow = false ) const;
1176 : bool IsActive() const;
1177 : bool HasActiveChildFrame();
1178 : GetFocusFlags GetGetFocusFlags() const;
1179 : void GrabFocusToDocument();
1180 :
1181 : /**
1182 : * Set this when you need to act as if the window has focus even if it
1183 : * doesn't. This is necessary for implementing tab stops inside floating
1184 : * windows, but floating windows don't get focus from the system.
1185 : */
1186 : void SetFakeFocus( bool bFocus );
1187 :
1188 : bool IsCompoundControl() const;
1189 :
1190 : static sal_uIntPtr SaveFocus();
1191 : static bool EndSaveFocus( sal_uIntPtr nSaveId, bool bRestore = true );
1192 :
1193 : void CaptureMouse();
1194 : void ReleaseMouse();
1195 : bool IsMouseCaptured() const;
1196 :
1197 : void SetPointer( const Pointer& rPointer );
1198 : const Pointer& GetPointer() const;
1199 : void EnableChildPointerOverwrite( bool bOverwrite );
1200 : void SetPointerPosPixel( const Point& rPos );
1201 : Point GetPointerPosPixel();
1202 : Point GetLastPointerPosPixel();
1203 : /// Similar to SetPointerPosPixel(), but sets the frame data's last mouse position instead.
1204 : void SetLastMousePos(const Point& rPos);
1205 : void ShowPointer( bool bVisible );
1206 : void EnterWait();
1207 : void LeaveWait();
1208 : bool IsWait() const;
1209 :
1210 : void SetCursor( vcl::Cursor* pCursor );
1211 : vcl::Cursor* GetCursor() const;
1212 :
1213 : void SetZoom( const Fraction& rZoom );
1214 : const Fraction& GetZoom() const;
1215 : bool IsZoom() const;
1216 : long CalcZoom( long n ) const;
1217 :
1218 : virtual void SetText( const OUString& rStr );
1219 : virtual OUString GetText() const;
1220 : // return the actual text displayed
1221 : // this may have e.g. accelerators removed or portions
1222 : // replaced by ellipses
1223 : virtual OUString GetDisplayText() const;
1224 : // gets the visible background color. for transparent windows
1225 : // this may be the parent's background color; for controls
1226 : // this may be a child's background color (e.g. ListBox)
1227 : virtual const Wallpaper& GetDisplayBackground() const;
1228 :
1229 : void SetHelpText( const OUString& rHelpText );
1230 : const OUString& GetHelpText() const;
1231 :
1232 : void SetQuickHelpText( const OUString& rHelpText );
1233 : const OUString& GetQuickHelpText() const;
1234 :
1235 : void SetHelpId( const OString& );
1236 : const OString& GetHelpId() const;
1237 :
1238 : void SetUniqueId( const OString& );
1239 : const OString& GetUniqueId() const;
1240 :
1241 : vcl::Window* FindWindow( const Point& rPos ) const;
1242 :
1243 : sal_uInt16 GetChildCount() const;
1244 : vcl::Window* GetChild( sal_uInt16 nChild ) const;
1245 : vcl::Window* GetWindow( GetWindowType nType ) const;
1246 : bool IsChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const;
1247 : bool IsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const;
1248 :
1249 : void SetData( void* pNewData );
1250 : void* GetData() const;
1251 :
1252 : /// Add all children to @rAllChildren recursively.
1253 : SAL_DLLPRIVATE void CollectChildren(::std::vector<vcl::Window *>& rAllChildren );
1254 :
1255 : virtual void ShowFocus(const Rectangle& rRect);
1256 : void HideFocus();
1257 :
1258 : void Invert( const Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE );
1259 : void Invert( const Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE );
1260 :
1261 : // transparent background for selected or checked items in toolboxes etc.
1262 : void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly );
1263 : // the same, but fills a passed Color with a text color complementing the selection background
1264 : void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly, Color* pSelectionTextColor );
1265 : // support rounded edges in the selection rect
1266 : void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor );
1267 :
1268 : void ShowTracking( const Rectangle& rRect,
1269 : sal_uInt16 nFlags = SHOWTRACK_SMALL );
1270 : void HideTracking();
1271 : void InvertTracking( const Rectangle& rRect,
1272 : sal_uInt16 nFlags = SHOWTRACK_SMALL );
1273 : void InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags = 0 );
1274 :
1275 : void StartTracking( StartTrackingFlags nFlags = StartTrackingFlags::NONE );
1276 : void EndTracking( TrackingEventFlags nFlags = TrackingEventFlags::NONE );
1277 : bool IsTracking() const;
1278 :
1279 : void StartAutoScroll( StartAutoScrollFlags nFlags );
1280 : void EndAutoScroll();
1281 :
1282 : bool HandleScrollCommand( const CommandEvent& rCmd,
1283 : ScrollBar* pHScrl = NULL,
1284 : ScrollBar* pVScrl = NULL );
1285 :
1286 : void SaveBackground( const Point& rPos, const Size& rSize,
1287 : const Point& rDestOff, VirtualDevice& rSaveDevice );
1288 :
1289 : const SystemEnvData* GetSystemData() const;
1290 : ::com::sun::star::uno::Any GetSystemDataAny() const;
1291 :
1292 : // API to set/query the component interfaces
1293 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
1294 : GetComponentInterface( bool bCreate = true );
1295 :
1296 : void SetComponentInterface( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xIFace );
1297 :
1298 : /** @name Accessibility
1299 : */
1300 : ///@{
1301 : public:
1302 :
1303 : ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
1304 : GetAccessible( bool bCreate = true );
1305 :
1306 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
1307 : CreateAccessible();
1308 :
1309 : void SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > );
1310 :
1311 : vcl::Window* GetAccessibleParentWindow() const;
1312 : sal_uInt16 GetAccessibleChildWindowCount();
1313 : vcl::Window* GetAccessibleChildWindow( sal_uInt16 n );
1314 :
1315 : void SetAccessibleRole( sal_uInt16 nRole );
1316 : sal_uInt16 GetAccessibleRole() const;
1317 :
1318 : void SetAccessibleName( const OUString& rName );
1319 : OUString GetAccessibleName() const;
1320 :
1321 : void SetAccessibleDescription( const OUString& rDescr );
1322 : OUString GetAccessibleDescription() const;
1323 :
1324 : void SetAccessibleRelationLabeledBy( vcl::Window* pLabeledBy );
1325 : vcl::Window* GetAccessibleRelationLabeledBy() const;
1326 :
1327 : void SetAccessibleRelationLabelFor( vcl::Window* pLabelFor );
1328 : vcl::Window* GetAccessibleRelationLabelFor() const;
1329 :
1330 : void SetAccessibleRelationMemberOf( vcl::Window* pMemberOf );
1331 : vcl::Window* GetAccessibleRelationMemberOf() const;
1332 :
1333 :
1334 : // to avoid sending accessibility events in cases like closing dialogs
1335 : // by default checks complete parent path
1336 : bool IsAccessibilityEventsSuppressed( bool bTraverseParentPath = true );
1337 : void SetAccessibilityEventsSuppressed(bool bSuppressed);
1338 :
1339 : // Deprecated - can use SetAccessibleRelationLabelFor/By nowadys
1340 : virtual vcl::Window* GetParentLabelFor( const vcl::Window* pLabel ) const;
1341 : virtual vcl::Window* GetParentLabeledBy( const vcl::Window* pLabeled ) const;
1342 : KeyEvent GetActivationKey() const;
1343 :
1344 : protected:
1345 :
1346 : // These eventually are supposed to go when everything is converted to .ui
1347 : SAL_DLLPRIVATE vcl::Window* getLegacyNonLayoutAccessibleRelationMemberOf() const;
1348 : SAL_DLLPRIVATE vcl::Window* getLegacyNonLayoutAccessibleRelationLabeledBy() const;
1349 : SAL_DLLPRIVATE vcl::Window* getLegacyNonLayoutAccessibleRelationLabelFor() const;
1350 :
1351 : // Let Label override the code part of GetAccessibleRelationLabelFor
1352 : virtual vcl::Window* getAccessibleRelationLabelFor() const;
1353 : virtual sal_uInt16 getDefaultAccessibleRole() const;
1354 : virtual OUString getDefaultAccessibleName() const;
1355 :
1356 : /*
1357 : * Advisory Sizing - what is a good size for this widget
1358 : *
1359 : * Retrieves the preferred size of a widget ignoring
1360 : * "width-request" and "height-request" properties.
1361 : *
1362 : * Implement this in sub-classes to tell layout
1363 : * the preferred widget size.
1364 : *
1365 : * Use get_preferred_size to retrieve this value
1366 : * cached and mediated via height and width requests
1367 : */
1368 : virtual Size GetOptimalSize() const;
1369 : /// clear OptimalSize cache
1370 : void InvalidateSizeCache();
1371 : private:
1372 :
1373 : SAL_DLLPRIVATE bool ImplIsAccessibleCandidate() const;
1374 : SAL_DLLPRIVATE bool ImplIsAccessibleNativeFrame() const;
1375 : SAL_DLLPRIVATE sal_uInt16 ImplGetAccessibleCandidateChildWindowCount( GetWindowType nFirstWindowType ) const;
1376 : SAL_DLLPRIVATE vcl::Window* ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, GetWindowType nFirstWindowType, bool bTopLevel = true ) const;
1377 : SAL_DLLPRIVATE bool ImplRegisterAccessibleNativeFrame();
1378 : SAL_DLLPRIVATE void ImplRevokeAccessibleNativeFrame();
1379 : ///@}
1380 :
1381 : /*
1382 : * Retrieves the preferred size of a widget taking
1383 : * into account the "width-request" and "height-request" properties.
1384 : *
1385 : * Overrides the result of GetOptimalSize to honor the
1386 : * width-request and height-request properties.
1387 : *
1388 : * So the same as get_ungrouped_preferred_size except
1389 : * it ignores groups. A building block of get_preferred_size
1390 : * that access the size cache
1391 : *
1392 : * @see get_preferred_size
1393 : */
1394 : Size get_ungrouped_preferred_size() const;
1395 : public:
1396 : /// request XCanvas render interface for this window
1397 : ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas >
1398 : GetCanvas() const;
1399 : /// request XSpriteCanvas render interface for this window
1400 : ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSpriteCanvas >
1401 : GetSpriteCanvas() const;
1402 :
1403 : /* records all DrawText operations within the passed rectangle;
1404 : * a synchronous paint is sent to achieve this
1405 : */
1406 : void RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect );
1407 :
1408 : // set and retrieve for Toolkit
1409 : VCLXWindow* GetWindowPeer() const;
1410 : void SetWindowPeer( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer, VCLXWindow* pVCLXWindow );
1411 :
1412 : // remember if it was generated by Toolkit
1413 : bool IsCreatedWithToolkit() const;
1414 : void SetCreatedWithToolkit( bool b );
1415 :
1416 : // Drag and Drop interfaces
1417 : ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTarget > GetDropTarget();
1418 : ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > GetDragSource();
1419 : ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureRecognizer > GetDragGestureRecognizer();
1420 :
1421 : // Clipboard/Selection interfaces
1422 : ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetClipboard();
1423 : ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetPrimarySelection();
1424 :
1425 : /*
1426 : * Widgets call this to inform their owner container that the widget wants
1427 : * to renegotiate its size. Should be called when a widget has a new size
1428 : * request. e.g. a FixedText Control gets a new label.
1429 : *
1430 : * akin to gtk_widget_queue_resize
1431 : */
1432 : virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout);
1433 :
1434 : /*
1435 : * Sets the "width-request" property
1436 : *
1437 : * Override for width request of the widget, or -1 if natural request
1438 : * should be used.
1439 : *
1440 : * @see get_preferred_size, set_width_request
1441 : */
1442 : void set_height_request(sal_Int32 nHeightRequest);
1443 : sal_Int32 get_height_request() const;
1444 :
1445 : /*
1446 : * Sets the "height-request" property
1447 : *
1448 : * Override for height request of the widget, or -1 if natural request
1449 : * should be used.
1450 : *
1451 : * @see get_preferred_size, set_height_request
1452 : */
1453 : void set_width_request(sal_Int32 nWidthRequest);
1454 : sal_Int32 get_width_request() const;
1455 :
1456 : /*
1457 : * Retrieves the preferred size of a widget taking
1458 : * into account the "width-request" and "height-request" properties.
1459 : *
1460 : * Overrides the result of GetOptimalSize to honor the
1461 : * width-request and height-request properties.
1462 : *
1463 : * @see GetOptimalSize
1464 : *
1465 : * akin to gtk_widget_get_preferred_size
1466 : */
1467 : Size get_preferred_size() const;
1468 :
1469 : /*
1470 : * How to horizontally align this widget
1471 : */
1472 : VclAlign get_halign() const;
1473 : void set_halign(VclAlign eAlign);
1474 :
1475 : /*
1476 : * How to vertically align this widget
1477 : */
1478 : VclAlign get_valign() const;
1479 : void set_valign(VclAlign eAlign);
1480 :
1481 : /*
1482 : * Whether the widget would like to use any available extra horizontal
1483 : * space.
1484 : */
1485 : bool get_hexpand() const;
1486 : void set_hexpand(bool bExpand);
1487 :
1488 : /*
1489 : * Whether the widget would like to use any available extra vertical
1490 : * space.
1491 : */
1492 : bool get_vexpand() const;
1493 : void set_vexpand(bool bExpand);
1494 :
1495 : /*
1496 : * Whether the widget would like to use any available extra space.
1497 : */
1498 : bool get_expand() const;
1499 : void set_expand(bool bExpand);
1500 :
1501 : /*
1502 : * Whether the widget should receive extra space when the parent grows
1503 : */
1504 : bool get_fill() const;
1505 : void set_fill(bool bFill);
1506 :
1507 : void set_border_width(sal_Int32 nBorderWidth);
1508 : sal_Int32 get_border_width() const;
1509 :
1510 : void set_margin_left(sal_Int32 nWidth);
1511 : sal_Int32 get_margin_left() const;
1512 :
1513 : void set_margin_right(sal_Int32 nWidth);
1514 : sal_Int32 get_margin_right() const;
1515 :
1516 : void set_margin_top(sal_Int32 nWidth);
1517 : sal_Int32 get_margin_top() const;
1518 :
1519 : void set_margin_bottom(sal_Int32 nWidth);
1520 : sal_Int32 get_margin_bottom() const;
1521 :
1522 : /*
1523 : * How the widget is packed with reference to the start or end of the parent
1524 : */
1525 : VclPackType get_pack_type() const;
1526 : void set_pack_type(VclPackType ePackType);
1527 :
1528 : /*
1529 : * The extra space to put between the widget and its neighbors
1530 : */
1531 : sal_Int32 get_padding() const;
1532 : void set_padding(sal_Int32 nPadding);
1533 :
1534 : /*
1535 : * The number of columns that the widget spans
1536 : */
1537 : sal_Int32 get_grid_width() const;
1538 : void set_grid_width(sal_Int32 nCols);
1539 :
1540 : /*
1541 : * The column number to attach the left side of the widget to
1542 : */
1543 : sal_Int32 get_grid_left_attach() const;
1544 : void set_grid_left_attach(sal_Int32 nAttach);
1545 :
1546 : /*
1547 : * The number of row that the widget spans
1548 : */
1549 : sal_Int32 get_grid_height() const;
1550 : void set_grid_height(sal_Int32 nRows);
1551 :
1552 : /*
1553 : * The row number to attach the top side of the widget to
1554 : */
1555 : sal_Int32 get_grid_top_attach() const;
1556 : void set_grid_top_attach(sal_Int32 nAttach);
1557 :
1558 : /*
1559 : * If true this child appears in a secondary layout group of children
1560 : * e.g. help buttons in a buttonbox
1561 : */
1562 : bool get_secondary() const;
1563 : void set_secondary(bool bSecondary);
1564 :
1565 : /*
1566 : * If true this child is exempted from homogenous sizing
1567 : * e.g. special button in a buttonbox
1568 : */
1569 : bool get_non_homogeneous() const;
1570 : void set_non_homogeneous(bool bNonHomogeneous);
1571 :
1572 : /*
1573 : * Sets a widget property
1574 : *
1575 : * @return false if property is unknown
1576 : */
1577 : virtual bool set_property(const OString &rKey, const OString &rValue);
1578 :
1579 : /*
1580 : * Sets a font attribute
1581 : *
1582 : * @return false if attribute is unknown
1583 : */
1584 : bool set_font_attribute(const OString &rKey, const OString &rValue);
1585 :
1586 : /*
1587 : * Adds this widget to the xGroup VclSizeGroup
1588 : *
1589 : */
1590 : void add_to_size_group(std::shared_ptr<VclSizeGroup> xGroup);
1591 : void remove_from_all_size_groups();
1592 :
1593 : /*
1594 : * add/remove mnemonic label
1595 : */
1596 : void add_mnemonic_label(FixedText *pLabel);
1597 : void remove_mnemonic_label(FixedText *pLabel);
1598 : std::vector<VclPtr<FixedText> > list_mnemonic_labels() const;
1599 :
1600 : /*
1601 : * Move this widget to be the nNewPosition'd child of its parent
1602 : */
1603 : void reorderWithinParent(sal_uInt16 nNewPosition);
1604 :
1605 :
1606 : // Native Widget Rendering functions
1607 :
1608 :
1609 : // form controls must never use native widgets, this can be toggled here
1610 : void EnableNativeWidget( bool bEnable = true );
1611 : bool IsNativeWidgetEnabled() const;
1612 :
1613 : // a helper method for a Control's Draw method
1614 : void PaintToDevice( ::OutputDevice* pDevice, const Point& rPos, const Size& rSize );
1615 :
1616 : /* mark Window for deletion in top of event queue
1617 : */
1618 : void doLazyDelete();
1619 :
1620 :
1621 : // Keyboard access functions
1622 :
1623 :
1624 : /** Query the states of keyboard indicators - Caps Lock, Num Lock and
1625 : Scroll Lock. Use the following mask to retrieve the state of each
1626 : indicator:
1627 :
1628 : KeyIndicatorState::CAPS_LOCK
1629 : KeyIndicatorState::NUM_LOCK
1630 : KeyIndicatorState::SCROLL_LOCK
1631 : */
1632 : KeyIndicatorState GetIndicatorState() const;
1633 :
1634 : void SimulateKeyPress( sal_uInt16 nKeyCode ) const;
1635 :
1636 : virtual OUString GetSurroundingText() const;
1637 : virtual Selection GetSurroundingTextSelection() const;
1638 : };
1639 :
1640 : }
1641 :
1642 : // Only for compatibility - because many people outside haven't included event.hxx
1643 : // These require Window to be defined for VclPtr<Window>
1644 : #include <vcl/vclevent.hxx>
1645 : #include <vcl/event.hxx>
1646 :
1647 : #endif // INCLUDED_VCL_WINDOW_HXX
1648 :
1649 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|