Coverage Report

Created: 2026-05-16 09:25

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/vcl/window.hxx
Line
Count
Source
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 <vcl/dllapi.h>
24
#include <vcl/outdev.hxx>
25
#include <tools/link.hxx>
26
#include <vcl/wintypes.hxx>
27
#include <vcl/vclenum.hxx>
28
#include <vcl/uitest/factory.hxx>
29
#include <vcl/IDialogRenderable.hxx>
30
#include <rtl/ustring.hxx>
31
#include <memory>
32
33
struct ImplSVEvent;
34
struct ImplWinData;
35
struct ImplFrameData;
36
struct ImplCalcToTopData;
37
struct SystemEnvData;
38
struct SystemParentData;
39
class ImplBorderWindow;
40
class Timer;
41
class DNDListenerContainer;
42
class DockingManager;
43
class Scrollable;
44
class FixedText;
45
class MouseEvent;
46
class KeyEvent;
47
class CommandEvent;
48
class TrackingEvent;
49
class HelpEvent;
50
class DataChangedEvent;
51
class NotifyEvent;
52
class SystemWindow;
53
class SalFrame;
54
class MenuFloatingWindow;
55
class VCLXWindow;
56
class VclWindowEvent;
57
class AllSettings;
58
class InputContext;
59
class VclEventListeners;
60
class EditView;
61
enum class ImplPaintFlags;
62
enum class KeyIndicatorState;
63
enum class VclEventId;
64
enum class PointerStyle;
65
66
namespace com::sun::star {
67
    namespace awt {
68
        class XVclWindowPeer;
69
    }
70
    namespace datatransfer::clipboard {
71
        class XClipboard;
72
    }
73
    namespace datatransfer::dnd {
74
        class XDragGestureRecognizer;
75
        class XDragSource;
76
        class XDropTarget;
77
    }
78
}
79
80
namespace comphelper
81
{
82
class OAccessible;
83
}
84
85
namespace rtl { template <class reference_type> class Reference; }
86
87
namespace vcl {
88
    class Region;
89
    struct ControlLayoutData;
90
}
91
92
namespace svt { class PopupWindowControllerImpl; }
93
94
namespace weld { class Window; }
95
96
template<class T> class VclPtr;
97
namespace tools { class JsonWriter; }
98
99
// Type for GetWindow()
100
enum class GetWindowType
101
{
102
    Parent                   =  0,
103
    FirstChild               =  1,
104
    LastChild                =  2,
105
    Prev                     =  3,
106
    Next                     =  4,
107
    FirstOverlap             =  5,
108
    Overlap                  =  7,
109
    ParentOverlap            =  8,
110
    Client                   =  9,
111
    RealParent               = 10,
112
    Frame                    = 11,
113
    Border                   = 12,
114
    FirstTopWindowChild      = 13,
115
    NextTopWindowSibling     = 16,
116
};
117
118
// Flags for setPosSizePixel()
119
// These must match the definitions in css::awt::PosSize
120
enum class PosSizeFlags
121
{
122
    NONE             = 0x0000,
123
    X                = 0x0001,
124
    Y                = 0x0002,
125
    Width            = 0x0004,
126
    Height           = 0x0008,
127
    Pos              = X | Y,
128
    Size             = Width | Height,
129
    PosSize          = Pos | Size,
130
    All              = PosSize,
131
};
132
133
namespace o3tl
134
{
135
    template<> struct typed_flags<PosSizeFlags> : is_typed_flags<PosSizeFlags, 0x000f> {};
136
}
137
138
// Flags for SetZOrder()
139
enum class ZOrderFlags
140
{
141
    NONE              = 0x0000,
142
    Before            = 0x0001,
143
    Behind            = 0x0002,
144
    First             = 0x0004,
145
    Last              = 0x0008,
146
};
147
namespace o3tl
148
{
149
    template<> struct typed_flags<ZOrderFlags> : is_typed_flags<ZOrderFlags, 0x000f> {};
150
}
151
152
// Activate-Flags
153
enum class ActivateModeFlags
154
{
155
    NONE        = 0,
156
    GrabFocus   = 0x0001,
157
};
158
namespace o3tl
159
{
160
    template<> struct typed_flags<ActivateModeFlags> : is_typed_flags<ActivateModeFlags, 0x0001> {};
161
}
162
163
// ToTop-Flags
164
enum class ToTopFlags
165
{
166
    NONE            = 0x0000,
167
    RestoreWhenMin  = 0x0001,
168
    ForegroundTask  = 0x0002,
169
    NoGrabFocus     = 0x0004,
170
    GrabFocusOnly   = 0x0008,
171
};
172
namespace o3tl
173
{
174
    template<> struct typed_flags<ToTopFlags> : is_typed_flags<ToTopFlags, 0x000f> {};
175
}
176
177
// Flags for Invalidate
178
// must match css::awt::InvalidateStyle
179
enum class InvalidateFlags
180
{
181
    NONE                 = 0x0000,
182
    /** The child windows are invalidated, too. */
183
    Children             = 0x0001,
184
    /** The child windows are not invalidated. */
185
    NoChildren           = 0x0002,
186
    /** The invalidated area is painted with the background color/pattern. */
187
    NoErase              = 0x0004,
188
    /** The invalidated area is updated immediately. */
189
    Update               = 0x0008,
190
    /** The parent window is invalidated, too. */
191
    Transparent          = 0x0010,
192
    /** The parent window is not invalidated. */
193
    NoTransparent        = 0x0020,
194
    /** The area is invalidated regardless of overlapping child windows. */
195
    NoClipChildren       = 0x4000,
196
};
197
namespace o3tl
198
{
199
    template<> struct typed_flags<InvalidateFlags> : is_typed_flags<InvalidateFlags, 0x403f> {};
200
}
201
202
// Flags for Validate
203
enum class ValidateFlags
204
{
205
    NONE                = 0x0000,
206
    Children            = 0x0001,
207
    NoChildren          = 0x0002
208
};
209
namespace o3tl
210
{
211
    template<> struct typed_flags<ValidateFlags> : is_typed_flags<ValidateFlags, 0x0003> {};
212
}
213
214
// Flags for Scroll
215
enum class ScrollFlags
216
{
217
    NONE                     = 0x0000,
218
    Clip                     = 0x0001,
219
    Children                 = 0x0002,
220
    NoChildren               = 0x0004,
221
    UseClipRegion            = 0x0008,
222
    Update                   = 0x0010, // paint immediately
223
};
224
namespace o3tl
225
{
226
    template<> struct typed_flags<ScrollFlags> : is_typed_flags<ScrollFlags, 0x001f> {};
227
}
228
229
// Flags for ParentClipMode
230
enum class ParentClipMode
231
{
232
    NONE             = 0x0000,
233
    Clip             = 0x0001,
234
    NoClip           = 0x0002,
235
};
236
namespace o3tl
237
{
238
    template<> struct typed_flags<ParentClipMode> : is_typed_flags<ParentClipMode, 0x0003> {};
239
}
240
241
// Flags for ShowTracking()
242
enum class ShowTrackFlags {
243
    NONE                  = 0x0000,
244
    Small                 = 0x0001,
245
    Big                   = 0x0002,
246
    Split                 = 0x0003,
247
    Object                = 0x0004,
248
    StyleMask             = 0x000F,
249
    TrackWindow           = 0x1000,
250
    Clip                  = 0x2000,
251
};
252
namespace o3tl
253
{
254
    template<> struct typed_flags<ShowTrackFlags> : is_typed_flags<ShowTrackFlags, 0x300f> {};
255
}
256
257
// Flags for StartTracking()
258
enum class StartTrackingFlags
259
{
260
    NONE                 = 0x0001,
261
    KeyMod               = 0x0002,
262
    ScrollRepeat         = 0x0004,
263
    ButtonRepeat         = 0x0008,
264
};
265
266
namespace o3tl
267
{
268
    template<> struct typed_flags<StartTrackingFlags> : is_typed_flags<StartTrackingFlags, 0x000f> {};
269
}
270
271
// Flags for StartAutoScroll()
272
enum class StartAutoScrollFlags
273
{
274
    NONE                 = 0x0000,
275
    Vert                 = 0x0001,
276
    Horz                 = 0x0002,
277
};
278
namespace o3tl
279
{
280
    template<> struct typed_flags<StartAutoScrollFlags> : is_typed_flags<StartAutoScrollFlags, 0x0003> {};
281
}
282
283
// Flags for StateChanged()
284
enum class StateChangedType : sal_uInt16
285
{
286
    InitShow           = 1,
287
    Visible            = 2,
288
    UpdateMode         = 3,
289
    Enable             = 4,
290
    Text               = 5,
291
    Data               = 7,
292
    State              = 8,
293
    Style              = 9,
294
    Zoom               = 10,
295
    ControlFont        = 13,
296
    ControlForeground  = 14,
297
    ControlBackground  = 15,
298
    ReadOnly           = 16,
299
    Mirroring          = 18,
300
    Layout             = 19,
301
    ControlFocus       = 20
302
};
303
304
// GetFocusFlags
305
// must match constants in css:awt::FocusChangeReason
306
enum class GetFocusFlags
307
{
308
    NONE                   = 0x0000,
309
    Tab                    = 0x0001,
310
    CURSOR                 = 0x0002, // avoid name-clash with X11 #define
311
    Mnemonic               = 0x0004,
312
    F6                     = 0x0008,
313
    Forward                = 0x0010,
314
    Backward               = 0x0020,
315
    Around                 = 0x0040,
316
    UniqueMnemonic         = 0x0100,
317
    Init                   = 0x0200,
318
    FloatWinPopupModeEndCancel = 0x0400,
319
};
320
namespace o3tl
321
{
322
    template<> struct typed_flags<GetFocusFlags> : is_typed_flags<GetFocusFlags, 0x077f> {};
323
}
324
325
// DialogControl-Flags
326
enum class DialogControlFlags
327
{
328
    NONE                       = 0x0000,
329
    Return                     = 0x0001,
330
    WantFocus                  = 0x0002,
331
    FloatWinPopupModeEndCancel = 0x0004,
332
};
333
namespace o3tl
334
{
335
    template<> struct typed_flags<DialogControlFlags> : is_typed_flags<DialogControlFlags, 0x0007> {};
336
}
337
338
// EndExtTextInput() Flags
339
enum class EndExtTextInputFlags
340
{
341
    NONE           = 0x0000,
342
    Complete       = 0x0001
343
};
344
namespace o3tl
345
{
346
    template<> struct typed_flags<EndExtTextInputFlags> : is_typed_flags<EndExtTextInputFlags, 0x0001> {};
347
}
348
349
0
#define IMPL_MINSIZE_BUTTON_WIDTH       70
350
0
#define IMPL_MINSIZE_BUTTON_HEIGHT      22
351
0
#define IMPL_EXTRA_BUTTON_WIDTH         18
352
0
#define IMPL_EXTRA_BUTTON_HEIGHT        10
353
0
#define IMPL_SEP_BUTTON_X               5
354
0
#define IMPL_SEP_BUTTON_Y               5
355
0
#define IMPL_MINSIZE_MSGBOX_WIDTH       150
356
0
#define IMPL_DIALOG_OFFSET              5
357
0
#define IMPL_DIALOG_BAR_OFFSET          3
358
0
#define IMPL_MSGBOX_OFFSET_EXTRA_X      0
359
0
#define IMPL_MSGBOX_OFFSET_EXTRA_Y      2
360
0
#define IMPL_SEP_MSGBOX_IMAGE           8
361
362
// ImplGetDlgWindow()
363
enum class GetDlgWindowType
364
{
365
    Prev, Next, First
366
};
367
368
369
namespace vcl { class Window; }
370
namespace vcl { class Cursor; }
371
namespace vcl { class WindowOutputDevice; }
372
class Dialog;
373
class Edit;
374
class WindowImpl;
375
class PaintHelper;
376
class VclSizeGroup;
377
class Application;
378
class WorkWindow;
379
class MessBox;
380
class MessageDialog;
381
class DockingWindow;
382
class FloatingWindow;
383
class GroupBox;
384
class PushButton;
385
class RadioButton;
386
class SalInstanceWidget;
387
class SystemChildWindow;
388
class ImplDockingWindowWrapper;
389
class ImplPopupFloatWin;
390
class LifecycleTest;
391
392
393
enum class WindowHitTest {
394
    NONE        = 0x0000,
395
    Inside      = 0x0001,
396
    Transparent = 0x0002
397
};
398
namespace o3tl {
399
    template<> struct typed_flags<WindowHitTest> : is_typed_flags<WindowHitTest, 0x0003> {};
400
};
401
402
403
enum class WindowExtendedStyle {
404
    NONE        = 0x0000,
405
    Document    = 0x0001,
406
    DocModified = 0x0002,
407
    /**
408
     * This is a frame window that is requested to be hidden (not just "not yet
409
     * shown").
410
     */
411
    DocHidden   = 0x0004,
412
};
413
namespace o3tl {
414
    template<> struct typed_flags<WindowExtendedStyle> : is_typed_flags<WindowExtendedStyle, 0x0007> {};
415
};
416
417
namespace vcl {
418
419
class VCL_DLLPUBLIC Window : public virtual VclReferenceBase
420
{
421
    friend class ::vcl::Cursor;
422
    friend class ::vcl::WindowOutputDevice;
423
    friend class ::OutputDevice;
424
    friend class ::Application;
425
    friend class ::SystemWindow;
426
    friend class ::WorkWindow;
427
    friend class ::Dialog;
428
    friend class ::Edit;
429
    friend class ::MessBox;
430
    friend class ::MessageDialog;
431
    friend class ::DockingWindow;
432
    friend class ::FloatingWindow;
433
    friend class ::GroupBox;
434
    friend class ::PushButton;
435
    friend class ::RadioButton;
436
    friend class ::SalInstanceWidget;
437
    friend class ::SystemChildWindow;
438
    friend class ::ImplBorderWindow;
439
    friend class ::PaintHelper;
440
    friend class ::LifecycleTest;
441
    friend class ::VclEventListeners;
442
443
    // TODO: improve missing functionality
444
    // only required because of SetFloatingMode()
445
    friend class ::ImplDockingWindowWrapper;
446
    friend class ::ImplPopupFloatWin;
447
    friend class ::MenuFloatingWindow;
448
449
    friend class ::svt::PopupWindowControllerImpl;
450
451
private:
452
    // NOTE: to remove many dependencies of other modules
453
    //       to this central file, all members are now hidden
454
    //       in the WindowImpl class and all inline functions
455
    //       were removed.
456
    //       (WindowImpl is a pImpl pattern)
457
458
    //       Please do *not* add new members or inline functions to class Window,
459
    //       but use class WindowImpl instead
460
461
    std::unique_ptr<WindowImpl> mpWindowImpl;
462
463
public:
464
465
    DECL_DLLPRIVATE_LINK( ImplHandlePaintHdl, Timer*, void );
466
    DECL_DLLPRIVATE_LINK( ImplGenerateMouseMoveHdl, void*, void );
467
    DECL_DLLPRIVATE_LINK( ImplTrackTimerHdl, Timer*, void );
468
    DECL_DLLPRIVATE_LINK( ImplAsyncFocusHdl, void*, void );
469
    DECL_DLLPRIVATE_LINK( ImplHandleResizeTimerHdl, Timer*, void );
470
471
472
    SAL_DLLPRIVATE static void          ImplInitAppFontData( vcl::Window const * pWindow );
473
474
    SAL_DLLPRIVATE vcl::Window*         ImplGetFrameWindow() const;
475
    weld::Window*                       GetFrameWeld() const;
476
    vcl::Window*                        GetFrameWindow() const;
477
    SalFrame*                           ImplGetFrame() const;
478
    SAL_DLLPRIVATE ImplFrameData*       ImplGetFrameData();
479
480
    vcl::Window*                        ImplGetWindow() const; ///< if this is a proxy return the client, otherwise itself
481
    SAL_DLLPRIVATE ImplWinData*         ImplGetWinData() const;
482
    SAL_DLLPRIVATE vcl::Window*         ImplGetClientWindow() const;
483
    SAL_DLLPRIVATE vcl::Window*         ImplGetDlgWindow( sal_uInt16 n, GetDlgWindowType nType, sal_uInt16 nStart = 0, sal_uInt16 nEnd = 0xFFFF, sal_uInt16* pIndex = nullptr );
484
    SAL_DLLPRIVATE vcl::Window*         ImplGetParent() const;
485
    SAL_DLLPRIVATE vcl::Window*         ImplFindWindow( const Point& rFramePos );
486
487
    SAL_DLLPRIVATE void                 ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFlags nFlags );
488
    SAL_DLLPRIVATE void                 ImplInvalidateOverlapFrameRegion( const vcl::Region& rRegion );
489
490
    SAL_DLLPRIVATE bool                 ImplSetClipFlag( bool bSysObjOnlySmaller = false );
491
492
    SAL_DLLPRIVATE bool                 ImplIsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const;
493
    SAL_DLLPRIVATE bool                 ImplIsChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const;
494
    SAL_DLLPRIVATE bool                 ImplIsFloatingWindow() const;
495
    SAL_DLLPRIVATE bool                 ImplIsPushButton() const;
496
    SAL_DLLPRIVATE bool                 ImplIsSplitter() const;
497
    SAL_DLLPRIVATE bool                 ImplIsOverlapWindow() const;
498
499
    SAL_DLLPRIVATE void                 ImplIsInTaskPaneList( bool mbIsInTaskList );
500
501
3.82k
    SAL_DLLPRIVATE WindowImpl*          ImplGetWindowImpl() const { return mpWindowImpl.get(); }
502
503
    SAL_DLLPRIVATE void                 ImplGrabFocus( GetFocusFlags nFlags );
504
    SAL_DLLPRIVATE void                 ImplGrabFocusToDocument( GetFocusFlags nFlags );
505
    SAL_DLLPRIVATE void                 ImplInvertFocus( const tools::Rectangle& rRect );
506
507
    SAL_DLLPRIVATE PointerStyle         ImplGetMousePointer() const;
508
    SAL_DLLPRIVATE void                 ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged = false );
509
    SAL_DLLPRIVATE void                 ImplGenerateMouseMove();
510
511
    SAL_DLLPRIVATE void                 ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt );
512
    SAL_DLLPRIVATE void                 ImplNotifyIconifiedState( bool bIconified );
513
514
    SAL_DLLPRIVATE void                 ImplUpdateAll();
515
516
    SAL_DLLPRIVATE void                 ImplControlFocus( GetFocusFlags nFlags = GetFocusFlags::NONE );
517
518
    SAL_DLLPRIVATE void                 ImplMirrorFramePos( Point &pt ) const;
519
520
    SAL_DLLPRIVATE void                 ImplPosSizeWindow( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags );
521
522
    SAL_DLLPRIVATE void                 ImplCallResize();
523
    SAL_DLLPRIVATE void                 ImplCallMove();
524
525
    // These methods call the relevant virtual method when not in/post dispose
526
    SAL_DLLPRIVATE void                 CompatGetFocus();
527
    SAL_DLLPRIVATE void                 CompatLoseFocus();
528
    SAL_DLLPRIVATE void                 CompatStateChanged( StateChangedType nStateChange );
529
    SAL_DLLPRIVATE void                 CompatDataChanged( const DataChangedEvent& rDCEvt );
530
    SAL_DLLPRIVATE bool                 CompatPreNotify( NotifyEvent& rNEvt );
531
    SAL_DLLPRIVATE bool                 CompatNotify( NotifyEvent& rNEvt );
532
533
                   void                 IncModalCount();
534
                   void                 DecModalCount();
535
536
    SAL_DLLPRIVATE static void          ImplCalcSymbolRect( tools::Rectangle& rRect );
537
538
protected:
539
540
    /** This is intended to be used to clear any locally held references to other Window-subclass objects */
541
    virtual void                        dispose() override;
542
543
    SAL_DLLPRIVATE void                 ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData );
544
545
    SAL_DLLPRIVATE void                 ImplInvalidateParentFrameRegion( const vcl::Region& rRegion );
546
    SAL_DLLPRIVATE void                 ImplValidateFrameRegion( const vcl::Region* rRegion, ValidateFlags nFlags );
547
    SAL_DLLPRIVATE void                 ImplValidate();
548
    SAL_DLLPRIVATE void                 ImplMoveInvalidateRegion( const tools::Rectangle& rRect, tools::Long nHorzScroll, tools::Long nVertScroll, bool bChildren );
549
    SAL_DLLPRIVATE void                 ImplMoveAllInvalidateRegions( const tools::Rectangle& rRect, tools::Long nHorzScroll, tools::Long nVertScroll, bool bChildren );
550
551
    SAL_DLLPRIVATE vcl::Window*         ImplGetBorderWindow() const;
552
553
    virtual void                        ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags );
554
555
    virtual WindowHitTest               ImplHitTest( const Point& rFramePos );
556
557
    SAL_DLLPRIVATE void                 ImplSetMouseTransparent( bool bTransparent );
558
559
    SAL_DLLPRIVATE void                 ImplScroll( const tools::Rectangle& rRect, tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags );
560
561
    SAL_DLLPRIVATE bool                 ImplSetClipFlagChildren( bool bSysObjOnlySmaller );
562
    SAL_DLLPRIVATE bool                 ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller = false );
563
564
    SAL_DLLPRIVATE void                 PushPaintHelper(PaintHelper* pHelper, vcl::RenderContext& rRenderContext);
565
    SAL_DLLPRIVATE void                 PopPaintHelper(PaintHelper const * pHelper);
566
567
private:
568
569
    SAL_DLLPRIVATE void                 ImplSetFrameParent( const vcl::Window* pParent );
570
571
    SAL_DLLPRIVATE void                 ImplInsertWindow( vcl::Window* pParent );
572
    SAL_DLLPRIVATE void                 ImplRemoveWindow( bool bRemoveFrameData );
573
574
    SAL_DLLPRIVATE SalGraphics*         ImplGetFrameGraphics() const;
575
576
    SAL_DLLPRIVATE static void          ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow, vcl::Window* pOldOverlapWindow );
577
    SAL_DLLPRIVATE vcl::Window*         ImplGetFirstOverlapWindow();
578
    SAL_DLLPRIVATE const vcl::Window*   ImplGetFirstOverlapWindow() const;
579
580
    SAL_DLLPRIVATE bool                 ImplIsRealParentPath( const vcl::Window* pWindow ) const;
581
582
    SAL_DLLPRIVATE bool                 ImplTestMousePointerSet();
583
584
    SAL_DLLPRIVATE void                 ImplResetReallyVisible();
585
    SAL_DLLPRIVATE void                 ImplSetReallyVisible();
586
587
    SAL_DLLPRIVATE void                 ImplCallInitShow();
588
589
    SAL_DLLPRIVATE void                 ImplInitResolutionSettings();
590
591
    SAL_DLLPRIVATE void                 ImplPointToLogic(vcl::RenderContext const & rRenderContext, vcl::Font& rFont, bool bUseRenderContextDPI = false) const;
592
    SAL_DLLPRIVATE void                 ImplLogicToPoint(vcl::RenderContext const & rRenderContext, vcl::Font& rFont) const;
593
594
    SAL_DLLPRIVATE bool                 ImplSysObjClip( const vcl::Region* pOldRegion );
595
    SAL_DLLPRIVATE void                 ImplUpdateSysObjChildrenClip();
596
    SAL_DLLPRIVATE void                 ImplUpdateSysObjOverlapsClip();
597
    SAL_DLLPRIVATE void                 ImplUpdateSysObjClip();
598
599
    SAL_DLLPRIVATE void                 ImplIntersectWindowClipRegion( vcl::Region& rRegion );
600
    SAL_DLLPRIVATE void                 ImplIntersectWindowRegion( vcl::Region& rRegion );
601
    SAL_DLLPRIVATE void                 ImplExcludeWindowRegion( vcl::Region& rRegion );
602
    SAL_DLLPRIVATE void                 ImplExcludeOverlapWindows( vcl::Region& rRegion ) const;
603
    SAL_DLLPRIVATE void                 ImplExcludeOverlapWindows2( vcl::Region& rRegion );
604
605
    SAL_DLLPRIVATE void                 ImplClipBoundaries( vcl::Region& rRegion, bool bThis, bool bOverlaps );
606
    SAL_DLLPRIVATE bool                 ImplClipChildren( vcl::Region& rRegion ) const;
607
    SAL_DLLPRIVATE void                 ImplClipAllChildren( vcl::Region& rRegion ) const;
608
    SAL_DLLPRIVATE void                 ImplClipSiblings( vcl::Region& rRegion ) const;
609
610
    SAL_DLLPRIVATE void                 ImplInitWinClipRegion();
611
    SAL_DLLPRIVATE void                 ImplInitWinChildClipRegion();
612
    SAL_DLLPRIVATE vcl::Region&         ImplGetWinChildClipRegion();
613
614
    SAL_DLLPRIVATE void                 ImplIntersectAndUnionOverlapWindows( const vcl::Region& rInterRegion, vcl::Region& rRegion ) const;
615
    SAL_DLLPRIVATE void                 ImplIntersectAndUnionOverlapWindows2( const vcl::Region& rInterRegion, vcl::Region& rRegion );
616
    SAL_DLLPRIVATE void                 ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl::Region& rRegion ) const;
617
    SAL_DLLPRIVATE void                 ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Region& rRegion,
618
                                                               bool bChildren, bool bSiblings );
619
620
    /** Invoke the actual painting.
621
622
        This function is kind of recursive - it may be called from the
623
        PaintHelper destructor; and on the other hand it creates PaintHelper
624
        that (when destructed) calls other ImplCallPaint()'s.
625
    */
626
    SAL_DLLPRIVATE void                 ImplCallPaint(const vcl::Region* pRegion, ImplPaintFlags nPaintFlags);
627
628
    SAL_DLLPRIVATE void                 ImplCallOverlapPaint();
629
630
    SAL_DLLPRIVATE void                 ImplUpdateWindowPtr( vcl::Window* pWindow );
631
    SAL_DLLPRIVATE void                 ImplUpdateWindowPtr();
632
    SAL_DLLPRIVATE void                 ImplUpdateOverlapWindowPtr( bool bNewFrame );
633
634
    SAL_DLLPRIVATE bool                 ImplUpdatePos();
635
    SAL_DLLPRIVATE void                 ImplUpdateSysObjPos();
636
637
    SAL_DLLPRIVATE void                 ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl = true ) const;
638
639
    SAL_DLLPRIVATE void                 ImplToBottomChild();
640
641
    SAL_DLLPRIVATE void                 ImplCalcToTop( ImplCalcToTopData* pPrevData );
642
    SAL_DLLPRIVATE void                 ImplToTop( ToTopFlags nFlags );
643
    SAL_DLLPRIVATE void                 ImplStartToTop( ToTopFlags nFlags );
644
    SAL_DLLPRIVATE void                 ImplFocusToTop( ToTopFlags nFlags, bool bReallyVisible );
645
646
    SAL_DLLPRIVATE void                 ImplShowAllOverlaps();
647
    SAL_DLLPRIVATE void                 ImplHideAllOverlaps();
648
649
    SAL_DLLPRIVATE bool                 ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput );
650
    SAL_DLLPRIVATE bool                 ImplHasDlgCtrl() const;
651
    SAL_DLLPRIVATE void                 ImplDlgCtrlNextWindow();
652
    SAL_DLLPRIVATE void                 ImplDlgCtrlFocusChanged( const vcl::Window* pWindow, bool bGetFocus );
653
    SAL_DLLPRIVATE vcl::Window*         ImplFindDlgCtrlWindow( const vcl::Window* pWindow );
654
655
    SAL_DLLPRIVATE static void          ImplNewInputContext();
656
657
    SAL_DLLPRIVATE void                 ImplCallActivateListeners(vcl::Window*);
658
    SAL_DLLPRIVATE void                 ImplCallDeactivateListeners(vcl::Window*);
659
660
    SAL_DLLPRIVATE static void          ImplHandleScroll(Scrollable* pHScrl, double nX, Scrollable* pVScrl, double nY);
661
662
    SAL_DLLPRIVATE AbsoluteScreenPixelRectangle ImplOutputToUnmirroredAbsoluteScreenPixel( const tools::Rectangle& rRect ) const;
663
    SAL_DLLPRIVATE tools::Rectangle     ImplUnmirroredAbsoluteScreenToOutputPixel( const AbsoluteScreenPixelRectangle& rRect ) const;
664
    SAL_DLLPRIVATE tools::Long          ImplGetUnmirroredOutOffX() const;
665
666
    // retrieves the list of owner draw decorated windows for this window hierarchy
667
    SAL_DLLPRIVATE ::std::vector<VclPtr<vcl::Window> >& ImplGetOwnerDrawList();
668
669
    SAL_DLLPRIVATE vcl::Window*         ImplGetTopmostFrameWindow() const;
670
671
    SAL_DLLPRIVATE bool                 ImplStopDnd();
672
    SAL_DLLPRIVATE void                 ImplStartDnd();
673
674
    virtual void                        ImplPaintToDevice( ::OutputDevice* pTargetOutDev, const Point& rPos );
675
676
protected:
677
    // Single argument ctors shall be explicit.
678
    SAL_DLLPRIVATE explicit             Window( WindowType eType );
679
680
            void                        SetCompoundControl( bool bCompound );
681
682
            void                        CallEventListeners( VclEventId nEvent, void* pData = nullptr );
683
684
    // FIXME: this is a hack to workaround missing layout functionality
685
    virtual void                        ImplAdjustNWFSizes();
686
687
    virtual void ApplySettings(vcl::RenderContext& rRenderContext);
688
689
public:
690
    // Single argument ctors shall be explicit.
691
    explicit                            Window( vcl::Window* pParent, WinBits nStyle = 0 );
692
693
    virtual                             ~Window() override;
694
695
    ::OutputDevice const*               GetOutDev() const;
696
    ::OutputDevice*                     GetOutDev();
697
698
    Color                               GetBackgroundColor() const;
699
    const Wallpaper &                   GetBackground() const;
700
    bool                                IsBackground() const;
701
    const MapMode&                      GetMapMode() const;
702
    void                                SetBackground();
703
    void                                SetBackground( const Wallpaper& rBackground );
704
705
    virtual void                        MouseMove( const MouseEvent& rMEvt );
706
    virtual void                        MouseButtonDown( const MouseEvent& rMEvt );
707
    virtual void                        MouseButtonUp( const MouseEvent& rMEvt );
708
    virtual void                        KeyInput( const KeyEvent& rKEvt );
709
    virtual void                        KeyUp( const KeyEvent& rKEvt );
710
    virtual void                        PrePaint(vcl::RenderContext& rRenderContext);
711
    virtual void                        Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
712
    virtual void                        PostPaint(vcl::RenderContext& rRenderContext);
713
714
    SAL_DLLPRIVATE void                 Erase(vcl::RenderContext& rRenderContext);
715
716
    virtual void                        Draw( ::OutputDevice* pDev, const Point& rPos, SystemTextColorFlags nFlags );
717
    virtual void                        Move();
718
    virtual void                        Resize();
719
    virtual void                        Activate();
720
    virtual void                        Deactivate();
721
    virtual void                        GetFocus();
722
    virtual void                        LoseFocus();
723
    virtual void                        RequestHelp( const HelpEvent& rHEvt );
724
    virtual void                        Command( const CommandEvent& rCEvt );
725
    virtual void                        Tracking( const TrackingEvent& rTEvt );
726
    virtual void                        StateChanged( StateChangedType nStateChange );
727
    virtual void                        DataChanged( const DataChangedEvent& rDCEvt );
728
    virtual bool                        PreNotify( NotifyEvent& rNEvt );
729
    virtual bool                        EventNotify( NotifyEvent& rNEvt );
730
731
    void                                AddEventListener( const Link<VclWindowEvent&,void>& rEventListener );
732
    void                                RemoveEventListener( const Link<VclWindowEvent&,void>& rEventListener );
733
    void                                AddChildEventListener( const Link<VclWindowEvent&,void>& rEventListener );
734
    void                                RemoveChildEventListener( const Link<VclWindowEvent&,void>& rEventListener );
735
736
    ImplSVEvent *                       PostUserEvent( const Link<void*,void>& rLink, void* pCaller = nullptr, bool bReferenceLink = false );
737
    void                                RemoveUserEvent( ImplSVEvent * nUserEvent );
738
739
                                        // returns the input language used for the last key stroke
740
                                        // may be LANGUAGE_DONTKNOW if not supported by the OS
741
    LanguageType                        GetInputLanguage() const;
742
743
    void                                SetStyle( WinBits nStyle );
744
    WinBits                             GetStyle() const;
745
    SAL_DLLPRIVATE WinBits              GetPrevStyle() const;
746
    void                                SetExtendedStyle( WindowExtendedStyle nExtendedStyle );
747
    WindowExtendedStyle                 GetExtendedStyle() const;
748
    void                                SetType( WindowType eType );
749
    WindowType                          GetType() const;
750
    std::string_view GetTypeName() const;
751
    bool IsFormControl() const;
752
    void SetFormControl(bool bFormControl);
753
    bool                                IsSystemWindow() const;
754
    SAL_DLLPRIVATE bool                 IsDockingWindow() const;
755
    bool                                IsDialog() const;
756
    bool                                IsMenuFloatingWindow() const;
757
    bool                                IsNativeFrame() const;
758
    bool                                IsTopWindow() const;
759
    SystemWindow*                       GetSystemWindow() const;
760
761
    /// Can the widget derived from this Window do the double-buffering via RenderContext properly?
762
    bool                                SupportsDoubleBuffering() const;
763
    /// Enable/disable double-buffering of the frame window and all its children.
764
    void                                RequestDoubleBuffering(bool bRequest);
765
766
    void                                EnableAllResize();
767
768
    void                                SetBorderStyle( WindowBorderStyle nBorderStyle );
769
    WindowBorderStyle                   GetBorderStyle() const;
770
    /// Get the left, top, right and bottom widths of the window border
771
    void                                GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
772
                                                   sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
773
    Size                                CalcWindowSize( const Size& rOutSz ) const;
774
    SAL_DLLPRIVATE Size                 CalcOutputSize( const Size& rWinSz ) const;
775
    tools::Long                                CalcTitleWidth() const;
776
777
    void                                EnableClipSiblings( bool bClipSiblings = true );
778
779
    void                                EnableChildTransparentMode( bool bEnable = true );
780
    bool                                IsChildTransparentModeEnabled() const;
781
782
    void                                SetMouseTransparent( bool bTransparent );
783
    bool                                IsMouseTransparent() const;
784
    void                                SetPaintTransparent( bool bTransparent );
785
    bool                                IsPaintTransparent() const;
786
    void                                SetDialogControlStart( bool bStart );
787
    SAL_DLLPRIVATE bool                 IsDialogControlStart() const;
788
    void                                SetDialogControlFlags( DialogControlFlags nFlags );
789
    SAL_DLLPRIVATE DialogControlFlags   GetDialogControlFlags() const;
790
791
    struct PointerState
792
    {
793
        sal_Int32 mnState;    // the button state
794
        Point     maPos;      // mouse position in output coordinates
795
    };
796
    PointerState                        GetPointerState();
797
    bool                                IsMouseOver() const;
798
799
    void                                SetInputContext( const InputContext& rInputContext );
800
    const InputContext&                 GetInputContext() const;
801
    void                                PostExtTextInputEvent(VclEventId nType, const OUString& rText);
802
    SAL_DLLPRIVATE void                 EndExtTextInput();
803
    void                                SetCursorRect( const tools::Rectangle* pRect = nullptr, tools::Long nExtTextInputWidth = 0 );
804
    SAL_DLLPRIVATE const tools::Rectangle* GetCursorRect() const;
805
    SAL_DLLPRIVATE tools::Long          GetCursorExtTextInputWidth() const;
806
807
    void                                SetCompositionCharRect( const tools::Rectangle* pRect, tools::Long nCompositionLength, bool bVertical = false );
808
809
    SAL_DLLPRIVATE void                 UpdateSettings( const AllSettings& rSettings, bool bChild = false );
810
    SAL_DLLPRIVATE void                 NotifyAllChildren( DataChangedEvent& rDCEvt );
811
812
    void                                SetPointFont(vcl::RenderContext& rRenderContext, const vcl::Font& rFont, bool bUseRenderContextDPI = false);
813
    vcl::Font                           GetPointFont(vcl::RenderContext const & rRenderContext) const;
814
    void                                SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::Font& rFont);
815
    SAL_DLLPRIVATE tools::Long          GetDrawPixel( ::OutputDevice const * pDev, tools::Long nPixels ) const;
816
    vcl::Font                           GetDrawPixelFont( ::OutputDevice const * pDev ) const;
817
818
    void SetControlFont();
819
    void SetControlFont( const vcl::Font& rFont );
820
    vcl::Font GetControlFont() const;
821
    bool IsControlFont() const;
822
    void ApplyControlFont(vcl::RenderContext& rRenderContext, const vcl::Font& rDefaultFont);
823
824
    void SetControlForeground();
825
    void SetControlForeground(const Color& rColor);
826
    const Color& GetControlForeground() const;
827
    bool IsControlForeground() const;
828
    void ApplyControlForeground(vcl::RenderContext& rRenderContext, const Color& rDefaultColor);
829
830
    void SetControlBackground();
831
    void SetControlBackground( const Color& rColor );
832
    const Color& GetControlBackground() const;
833
    bool IsControlBackground() const;
834
    void ApplyControlBackground(vcl::RenderContext& rRenderContext, const Color& rDefaultColor);
835
836
    void                                SetParentClipMode( ParentClipMode nMode = ParentClipMode::NONE );
837
    SAL_DLLPRIVATE ParentClipMode       GetParentClipMode() const;
838
839
    SAL_DLLPRIVATE void                 SetWindowRegionPixel();
840
    SAL_DLLPRIVATE void                 SetWindowRegionPixel( const vcl::Region& rRegion );
841
    vcl::Region                         GetWindowClipRegionPixel() const;
842
    vcl::Region                         GetPaintRegion() const;
843
    bool                                IsInPaint() const;
844
    // while IsInPaint returns true ExpandPaintClipRegion adds the
845
    // submitted region to the paint clip region so you can
846
    // paint additional parts of your window if necessary
847
    void                                ExpandPaintClipRegion( const vcl::Region& rRegion );
848
849
    void                                SetParent( vcl::Window* pNewParent );
850
    vcl::Window*                        GetParent() const;
851
    // return the dialog we are contained in or NULL if un-contained
852
    SAL_DLLPRIVATE Dialog*              GetParentDialog() const;
853
    bool                                IsAncestorOf( const vcl::Window& rWindow ) const;
854
855
    void                                Show( bool bVisible = true, ShowFlags nFlags = ShowFlags::NONE );
856
104k
    void                                Hide() { Show( false ); }
857
    bool                                IsVisible() const;
858
    bool                                IsReallyVisible() const;
859
    bool                                IsReallyShown() const;
860
    SAL_DLLPRIVATE bool                 IsInInitShow() const;
861
862
    void                                Enable( bool bEnable = true, bool bChild = true );
863
0
    void                                Disable( bool bChild = true ) { Enable( false, bChild ); }
864
    bool                                IsEnabled() const;
865
866
    void                                EnableInput( bool bEnable = true, bool bChild = true );
867
    SAL_DLLPRIVATE void                 EnableInput( bool bEnable, const vcl::Window* pExcludeWindow );
868
    bool                                IsInputEnabled() const;
869
870
    /** Override <code>EnableInput</code>. This can be necessary due to other people
871
        using EnableInput for whole window hierarchies.
872
873
        @param bAlways
874
        sets always enabled flag
875
876
        @param bChild
877
        if true children are recursively set to AlwaysEnableInput
878
    */
879
    void                                AlwaysEnableInput( bool bAlways, bool bChild = true );
880
881
    /** returns the current AlwaysEnableInput state
882
    @return
883
    true if window is in AlwaysEnableInput state
884
    */
885
    SAL_DLLPRIVATE bool                 IsAlwaysEnableInput() const;
886
887
    /** A window is in modal mode if one of its children or subchildren
888
        is a running modal window (a modal dialog)
889
890
        @returns sal_True if a child or subchild is a running modal window
891
    */
892
    bool                                IsInModalMode() const;
893
894
    SAL_DLLPRIVATE void                 SetActivateMode( ActivateModeFlags nMode );
895
    SAL_DLLPRIVATE ActivateModeFlags    GetActivateMode() const;
896
897
    void                                ToTop( ToTopFlags nFlags = ToTopFlags::NONE );
898
    void                                SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags );
899
    SAL_DLLPRIVATE void                 EnableAlwaysOnTop( bool bEnable = true );
900
    SAL_DLLPRIVATE bool                 IsAlwaysOnTopEnabled() const;
901
902
    virtual void                        setPosSizePixel( tools::Long nX, tools::Long nY,
903
                                                         tools::Long nWidth, tools::Long nHeight,
904
                                                         PosSizeFlags nFlags = PosSizeFlags::All );
905
    virtual void                        SetPosPixel( const Point& rNewPos );
906
    virtual Point                       GetPosPixel() const;
907
    virtual void                        SetSizePixel( const Size& rNewSize );
908
    virtual Size                        GetSizePixel() const;
909
    virtual void                        SetPosSizePixel( const Point& rNewPos,
910
                                                         const Size& rNewSize );
911
    virtual void                        SetOutputSizePixel( const Size& rNewSize );
912
    bool                                IsDefaultPos() const;
913
    SAL_DLLPRIVATE bool                 IsDefaultSize() const;
914
    Point                               GetOffsetPixelFrom(const vcl::Window& rWindow) const;
915
916
    // those conversion routines might deliver different results during UI mirroring
917
    Point                               OutputToScreenPixel( const Point& rPos ) const;
918
    Point                               ScreenToOutputPixel( const Point& rPos ) const;
919
    //  the normalized screen methods work independent from UI mirroring
920
    Point                               OutputToNormalizedScreenPixel( const Point& rPos ) const;
921
    SAL_DLLPRIVATE Point                NormalizedScreenToOutputPixel( const Point& rPos ) const;
922
    AbsoluteScreenPixelPoint            OutputToAbsoluteScreenPixel( const Point& rPos ) const;
923
    Point                               AbsoluteScreenToOutputPixel( const AbsoluteScreenPixelPoint& rPos ) const;
924
    AbsoluteScreenPixelRectangle        GetDesktopRectPixel() const;
925
    //  window extents including border and decoration, relative to passed in window
926
    tools::Rectangle                    GetWindowExtentsRelative(const vcl::Window& rRelativeWindow) const;
927
    //  window extents including border and decoration, in absolute screen coordinates
928
    AbsoluteScreenPixelRectangle        GetWindowExtentsAbsolute() const;
929
930
    SAL_DLLPRIVATE bool                 IsScrollable() const;
931
    virtual void                        Scroll( tools::Long nHorzScroll, tools::Long nVertScroll,
932
                                                ScrollFlags nFlags = ScrollFlags::NONE );
933
    void                                Scroll( tools::Long nHorzScroll, tools::Long nVertScroll,
934
                                                const tools::Rectangle& rRect, ScrollFlags nFlags = ScrollFlags::NONE );
935
    void                                Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE );
936
    void                                Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE );
937
    void                                Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE );
938
    /**
939
     * Notification about some rectangle of the output device got invalidated.Used for the main
940
     * document window.
941
     *
942
     * @param pRectangle If 0, that means the whole area, otherwise the area in logic coordinates.
943
     */
944
    virtual void                        LogicInvalidate(const tools::Rectangle* pRectangle);
945
946
    virtual bool                        InvalidateByForeignEditView(EditView* );
947
    /**
948
     * Notification about some rectangle of the output device got invalidated. Used for the
949
     * dialogs and floating windows (e.g. context menu, popup).
950
     *
951
     * @param pRectangle If 0, that means the whole area, otherwise the area in pixel coordinates.
952
     */
953
    virtual void                        PixelInvalidate(const tools::Rectangle* pRectangle);
954
    void                                Validate();
955
    SAL_DLLPRIVATE bool                 HasPaintEvent() const;
956
    void                                PaintImmediately();
957
958
    // toggles new docking support, enabled via toolkit
959
    void                                EnableDocking( bool bEnable = true );
960
    // retrieves the single dockingmanager instance
961
    static DockingManager*              GetDockingManager();
962
963
    void                                EnablePaint( bool bEnable );
964
    bool                                IsPaintEnabled() const;
965
    void                                SetUpdateMode( bool bUpdate );
966
    bool                                IsUpdateMode() const;
967
    void                                SetParentUpdateMode( bool bUpdate );
968
969
    void                                GrabFocus();
970
    bool                                HasFocus() const;
971
    bool                                HasChildPathFocus( bool bSystemWindow = false ) const;
972
    bool                                IsActive() const;
973
    bool                                HasActiveChildFrame() const;
974
    GetFocusFlags                       GetGetFocusFlags() const;
975
    void                                GrabFocusToDocument();
976
    VclPtr<vcl::Window>                 GetFocusedWindow() const;
977
978
    /**
979
     * Set this when you need to act as if the window has focus even if it
980
     * doesn't.  This is necessary for implementing tab stops inside floating
981
     * windows, but floating windows don't get focus from the system.
982
     */
983
    SAL_DLLPRIVATE void                 SetFakeFocus( bool bFocus );
984
985
    bool                                IsCompoundControl() const;
986
987
    SAL_DLLPRIVATE static VclPtr<vcl::Window> SaveFocus();
988
    SAL_DLLPRIVATE static void          EndSaveFocus(const VclPtr<vcl::Window>& xFocusWin);
989
990
    void                                LocalStartDrag();
991
    void                                CaptureMouse();
992
    void                                ReleaseMouse();
993
    bool                                IsMouseCaptured() const;
994
995
    virtual void                        SetPointer( PointerStyle );
996
    PointerStyle                        GetPointer() const;
997
    void                                EnableChildPointerOverwrite( bool bOverwrite );
998
    void                                SetPointerPosPixel( const Point& rPos );
999
    Point                               GetPointerPosPixel();
1000
    SAL_DLLPRIVATE Point                GetLastPointerPosPixel();
1001
    /// Similar to SetPointerPosPixel(), but sets the frame data's last mouse position instead.
1002
    void                                SetLastMousePos(const Point& rPos);
1003
    void                                ShowPointer( bool bVisible );
1004
    void                                EnterWait();
1005
    void                                LeaveWait();
1006
    bool                                IsWait() const;
1007
1008
    void                                SetCursor( vcl::Cursor* pCursor );
1009
    vcl::Cursor*                        GetCursor() const;
1010
1011
    void                                SetZoom( const double fZoom );
1012
    double                              GetZoom() const;
1013
    bool                                IsZoom() const;
1014
    tools::Long                                CalcZoom( tools::Long n ) const;
1015
1016
    virtual void                        SetText( const OUString& rStr );
1017
    virtual OUString                    GetText() const;
1018
    // return the actual text displayed
1019
    // this may have e.g. accelerators removed or portions
1020
    // replaced by ellipses
1021
    virtual OUString                    GetDisplayText() const;
1022
    // gets the visible background color. for transparent windows
1023
    // this may be the parent's background color; for controls
1024
    // this may be a child's background color (e.g. ListBox)
1025
    virtual const Wallpaper&            GetDisplayBackground() const;
1026
1027
    void                                SetHelpText( const OUString& rHelpText );
1028
    const OUString&                     GetHelpText() const;
1029
1030
    void                                SetQuickHelpText( const OUString& rHelpText );
1031
    const OUString&                     GetQuickHelpText() const;
1032
1033
    void                                SetHelpId( const OUString& );
1034
    const OUString&                     GetHelpId() const;
1035
1036
    sal_uInt16                          GetChildCount() const;
1037
    vcl::Window*                        GetChild( sal_uInt16 nChild ) const;
1038
    vcl::Window*                        GetWindow( GetWindowType nType ) const;
1039
    bool                                IsChild( const vcl::Window* pWindow ) const;
1040
    bool                                IsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow = false  ) const;
1041
1042
    /// Add all children to rAllChildren recursively.
1043
    SAL_DLLPRIVATE void                 CollectChildren(::std::vector<vcl::Window *>& rAllChildren );
1044
1045
    virtual void                        ShowFocus(const tools::Rectangle& rRect);
1046
    void                                HideFocus();
1047
1048
    void                                ShowTracking( const tools::Rectangle& rRect,
1049
                                                      ShowTrackFlags nFlags = ShowTrackFlags::Small );
1050
    void                                HideTracking();
1051
    void                                InvertTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlags );
1052
1053
    void                                StartTracking( StartTrackingFlags nFlags = StartTrackingFlags::NONE );
1054
    void                                EndTracking( TrackingEventFlags nFlags = TrackingEventFlags::NONE );
1055
    bool                                IsTracking() const;
1056
1057
    SAL_DLLPRIVATE void                 StartAutoScroll( StartAutoScrollFlags nFlags );
1058
    SAL_DLLPRIVATE void                 EndAutoScroll();
1059
1060
    bool                                HandleScrollCommand( const CommandEvent& rCmd,
1061
                                                             Scrollable* pHScrl,
1062
                                                             Scrollable* pVScrl );
1063
1064
    virtual const SystemEnvData*        GetSystemData() const;
1065
1066
    // API to set/query the component interfaces
1067
    virtual css::uno::Reference< css::awt::XVclWindowPeer >
1068
                                        GetComponentInterface( bool bCreate = true );
1069
1070
    void                                SetComponentInterface( css::uno::Reference< css::awt::XVclWindowPeer > const & xIFace );
1071
1072
    void                                SetUseFrameData(bool bUseFrameData);
1073
1074
    /// Interface to register for dialog / window tunneling.
1075
    void                                SetLOKNotifier(const vcl::ILibreOfficeKitNotifier* pNotifier, bool bParent = false);
1076
    const vcl::ILibreOfficeKitNotifier* GetLOKNotifier() const;
1077
    vcl::LOKWindowId                    GetLOKWindowId() const;
1078
1079
    /// This sets the lokWindowId without setting a notifier.
1080
    void                                SetLOKWindowId();
1081
1082
    /// Find the nearest parent with LOK Notifier; can be itself if this Window has LOK notifier set.
1083
    VclPtr<vcl::Window>                 GetParentWithLOKNotifier();
1084
1085
    /// Indicate that LOK is not going to use this dialog any more.
1086
    void                                ReleaseLOKNotifier();
1087
1088
    /// Find an existing Window based on the LOKWindowId.
1089
    static VclPtr<vcl::Window>          FindLOKWindow(vcl::LOKWindowId nWindowId);
1090
1091
    /// check if LOK Window container is empty
1092
    SAL_DLLPRIVATE static bool          IsLOKWindowsEmpty();
1093
1094
    /// Dumps itself and potentially its children to a property tree, to be written easily to JSON.
1095
    virtual void DumpAsPropertyTree(tools::JsonWriter&);
1096
1097
    /// Use OS specific way to bring user attention to current window
1098
    virtual void FlashWindow() const;
1099
1100
    void SetTaskBarProgress(int nCurrentProgress);
1101
    void SetTaskBarState(VclTaskBarStates eTaskBarState);
1102
1103
    /** @name Accessibility
1104
     */
1105
    ///@{
1106
public:
1107
    rtl::Reference<comphelper::OAccessible> GetAccessible(bool bCreate = true);
1108
    void SetAccessible(const rtl::Reference<comphelper::OAccessible>& rpAccessible);
1109
1110
    vcl::Window*                        GetAccessibleParentWindow() const;
1111
    sal_uInt16                          GetAccessibleChildWindowCount();
1112
    vcl::Window*                        GetAccessibleChildWindow( sal_uInt16 n );
1113
1114
    rtl::Reference<comphelper::OAccessible> GetAccessibleParent() const;
1115
    // Explicitly set an accessible parent (usually not needed)
1116
    void SetAccessibleParent(const rtl::Reference<comphelper::OAccessible>& rpParent);
1117
1118
    void                                SetAccessibleRole( sal_uInt16 nRole );
1119
    sal_uInt16                          GetAccessibleRole() const;
1120
1121
    void                                SetAccessibleName( const OUString& rName );
1122
    OUString                            GetAccessibleName() const;
1123
1124
    SAL_DLLPRIVATE void                 SetAccessibleDescription( const OUString& rDescr );
1125
    OUString                            GetAccessibleDescription() const;
1126
1127
    SAL_DLLPRIVATE void                 SetAccessibleRelationLabeledBy( vcl::Window* pLabeledBy );
1128
    vcl::Window*                        GetAccessibleRelationLabeledBy() const;
1129
1130
    SAL_DLLPRIVATE void                 SetAccessibleRelationLabelFor( vcl::Window* pLabelFor );
1131
    vcl::Window*                        GetAccessibleRelationLabelFor() const;
1132
1133
    vcl::Window*                        GetAccessibleRelationMemberOf() const;
1134
1135
    // to avoid sending accessibility events in cases like closing dialogs
1136
    // checks complete parent path
1137
    bool                                IsAccessibilityEventsSuppressed();
1138
1139
    KeyEvent                            GetActivationKey() const;
1140
1141
protected:
1142
    virtual rtl::Reference<comphelper::OAccessible> CreateAccessible();
1143
1144
    // These eventually are supposed to go when everything is converted to .ui
1145
    SAL_DLLPRIVATE vcl::Window*         getLegacyNonLayoutAccessibleRelationMemberOf() const;
1146
    SAL_DLLPRIVATE vcl::Window*         getLegacyNonLayoutAccessibleRelationLabeledBy() const;
1147
    SAL_DLLPRIVATE vcl::Window*         getLegacyNonLayoutAccessibleRelationLabelFor() const;
1148
1149
    // Let Label override the code part of GetAccessibleRelationLabelFor
1150
    virtual vcl::Window*                getAccessibleRelationLabelFor() const;
1151
    virtual sal_uInt16                  getDefaultAccessibleRole() const;
1152
    virtual OUString                    getDefaultAccessibleName() const;
1153
1154
    /*
1155
     * Advisory Sizing - what is a good size for this widget
1156
     *
1157
     * Retrieves the preferred size of a widget ignoring
1158
     * "width-request" and "height-request" properties.
1159
     *
1160
     * Implement this in sub-classes to tell layout
1161
     * the preferred widget size.
1162
     *
1163
     * Use get_preferred_size to retrieve this value
1164
     * cached and mediated via height and width requests
1165
     */
1166
    virtual Size GetOptimalSize() const;
1167
    /// clear OptimalSize cache
1168
    SAL_DLLPRIVATE void InvalidateSizeCache();
1169
private:
1170
1171
    SAL_DLLPRIVATE bool                 ImplIsAccessibleCandidate() const;
1172
    ///@}
1173
1174
    /*
1175
     * Retrieves the preferred size of a widget taking
1176
     * into account the "width-request" and "height-request" properties.
1177
     *
1178
     * Overrides the result of GetOptimalSize to honor the
1179
     * width-request and height-request properties.
1180
     *
1181
     * So the same as get_ungrouped_preferred_size except
1182
     * it ignores groups. A building block of get_preferred_size
1183
     * that access the size cache
1184
     *
1185
     * @see get_preferred_size
1186
     */
1187
    SAL_DLLPRIVATE Size get_ungrouped_preferred_size() const;
1188
public:
1189
    /*  records all DrawText operations within the passed rectangle;
1190
     *  a synchronous paint is sent to achieve this
1191
     */
1192
    void                                RecordLayoutData( vcl::ControlLayoutData* pLayout, const tools::Rectangle& rRect );
1193
1194
    // set and retrieve for Toolkit
1195
    VCLXWindow*                         GetWindowPeer() const;
1196
    void                                SetWindowPeer( css::uno::Reference< css::awt::XVclWindowPeer > const & xPeer, VCLXWindow* pVCLXWindow );
1197
1198
    // remember if it was generated by Toolkit
1199
    SAL_DLLPRIVATE bool                 IsCreatedWithToolkit() const;
1200
    void                                SetCreatedWithToolkit( bool b );
1201
1202
    // Drag and Drop interfaces
1203
    rtl::Reference<DNDListenerContainer> GetDropTarget();
1204
    css::uno::Reference< css::datatransfer::dnd::XDragSource > GetDragSource();
1205
1206
    // Clipboard/Selection interfaces
1207
    css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard();
1208
    /// Sets a custom clipboard for the window's frame, instead of using the system clipboard on demand
1209
    void SetClipboard(css::uno::Reference<css::datatransfer::clipboard::XClipboard> const & xClipboard);
1210
1211
    /*
1212
     * Widgets call this to inform their owner container that the widget wants
1213
     * to renegotiate its size. Should be called when a widget has a new size
1214
     * request. e.g. a FixedText Control gets a new label.
1215
     *
1216
     * akin to gtk_widget_queue_resize
1217
     */
1218
    virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout);
1219
1220
    /*
1221
     * Sets the "height-request" property
1222
     *
1223
     * Override for height request of the widget, or -1 if natural request
1224
     * should be used.
1225
     *
1226
     * @see get_preferred_size, set_width_request
1227
     */
1228
    void set_height_request(sal_Int32 nHeightRequest);
1229
    sal_Int32 get_height_request() const;
1230
1231
    /*
1232
     * Sets the "width-request" property
1233
     *
1234
     * Override for width request of the widget, or -1 if natural request
1235
     * should be used.
1236
     *
1237
     * @see get_preferred_size, set_height_request
1238
     */
1239
    void set_width_request(sal_Int32 nWidthRequest);
1240
    sal_Int32 get_width_request() const;
1241
1242
    /*
1243
     * Retrieves the preferred size of a widget taking
1244
     * into account the "width-request" and "height-request" properties.
1245
     *
1246
     * Overrides the result of GetOptimalSize to honor the
1247
     * width-request and height-request properties.
1248
     *
1249
     * @see GetOptimalSize
1250
     *
1251
     * akin to gtk_widget_get_preferred_size
1252
     */
1253
    Size get_preferred_size() const;
1254
1255
    /*
1256
     * How to horizontally align this widget
1257
     */
1258
    SAL_DLLPRIVATE VclAlign get_halign() const;
1259
    SAL_DLLPRIVATE void set_halign(VclAlign eAlign);
1260
1261
    /*
1262
     * How to vertically align this widget
1263
     */
1264
    SAL_DLLPRIVATE VclAlign get_valign() const;
1265
    SAL_DLLPRIVATE void set_valign(VclAlign eAlign);
1266
1267
    /*
1268
     * Whether the widget would like to use any available extra horizontal
1269
     * space.
1270
     */
1271
    bool get_hexpand() const;
1272
    void set_hexpand(bool bExpand);
1273
1274
    /*
1275
     * Whether the widget would like to use any available extra vertical
1276
     * space.
1277
     */
1278
    bool get_vexpand() const;
1279
    void set_vexpand(bool bExpand);
1280
1281
    /*
1282
     * Whether the widget would like to use any available extra space.
1283
     */
1284
    bool get_expand() const;
1285
    void set_expand(bool bExpand);
1286
1287
    /*
1288
     * Whether the widget should receive extra space when the parent grows
1289
     */
1290
    SAL_DLLPRIVATE bool get_fill() const;
1291
    SAL_DLLPRIVATE void set_fill(bool bFill);
1292
1293
    void set_border_width(sal_Int32 nBorderWidth);
1294
    SAL_DLLPRIVATE sal_Int32 get_border_width() const;
1295
1296
    SAL_DLLPRIVATE void set_margin_start(sal_Int32 nWidth);
1297
    SAL_DLLPRIVATE sal_Int32 get_margin_start() const;
1298
1299
    SAL_DLLPRIVATE void set_margin_end(sal_Int32 nWidth);
1300
    SAL_DLLPRIVATE sal_Int32 get_margin_end() const;
1301
1302
    void set_margin_top(sal_Int32 nWidth);
1303
    SAL_DLLPRIVATE sal_Int32 get_margin_top() const;
1304
1305
    SAL_DLLPRIVATE void set_margin_bottom(sal_Int32 nWidth);
1306
    SAL_DLLPRIVATE sal_Int32 get_margin_bottom() const;
1307
1308
    /*
1309
     * How the widget is packed with reference to the start or end of the parent
1310
     */
1311
    SAL_DLLPRIVATE VclPackType get_pack_type() const;
1312
    SAL_DLLPRIVATE void set_pack_type(VclPackType ePackType);
1313
1314
    /*
1315
     * The extra space to put between the widget and its neighbors
1316
     */
1317
    SAL_DLLPRIVATE sal_Int32 get_padding() const;
1318
    SAL_DLLPRIVATE void set_padding(sal_Int32 nPadding);
1319
1320
    /*
1321
     * The number of columns that the widget spans
1322
     */
1323
    SAL_DLLPRIVATE sal_Int32 get_grid_width() const;
1324
    SAL_DLLPRIVATE void set_grid_width(sal_Int32 nCols);
1325
1326
    /*
1327
     * The column number to attach the left side of the widget to
1328
     */
1329
    SAL_DLLPRIVATE sal_Int32 get_grid_left_attach() const;
1330
    SAL_DLLPRIVATE void set_grid_left_attach(sal_Int32 nAttach);
1331
1332
    /*
1333
     * The number of row that the widget spans
1334
     */
1335
    SAL_DLLPRIVATE sal_Int32 get_grid_height() const;
1336
    SAL_DLLPRIVATE void set_grid_height(sal_Int32 nRows);
1337
1338
    /*
1339
     * The row number to attach the top side of the widget to
1340
     */
1341
    SAL_DLLPRIVATE sal_Int32 get_grid_top_attach() const;
1342
    SAL_DLLPRIVATE void set_grid_top_attach(sal_Int32 nAttach);
1343
1344
    /*
1345
     * If true this child appears in a secondary layout group of children
1346
     * e.g. help buttons in a buttonbox
1347
     */
1348
    SAL_DLLPRIVATE bool get_secondary() const;
1349
    SAL_DLLPRIVATE void set_secondary(bool bSecondary);
1350
1351
    /*
1352
     * If true this child is exempted from homogeneous sizing
1353
     * e.g. special button in a buttonbox
1354
     */
1355
    SAL_DLLPRIVATE bool get_non_homogeneous() const;
1356
    SAL_DLLPRIVATE void set_non_homogeneous(bool bNonHomogeneous);
1357
1358
    /*
1359
     * Sets a widget property
1360
     *
1361
     * @return false if property is unknown
1362
     */
1363
    virtual bool set_property(const OUString &rKey, const OUString &rValue);
1364
1365
    /*
1366
     * Sets a font attribute
1367
     *
1368
     * @return false if attribute is unknown
1369
     */
1370
    SAL_DLLPRIVATE bool set_font_attribute(const OUString &rKey, std::u16string_view rValue);
1371
1372
    /*
1373
     * Adds this widget to the xGroup VclSizeGroup
1374
     *
1375
     */
1376
    SAL_DLLPRIVATE void add_to_size_group(const std::shared_ptr<VclSizeGroup>& xGroup);
1377
    SAL_DLLPRIVATE void remove_from_all_size_groups();
1378
1379
    /*
1380
     * add/remove mnemonic label
1381
     */
1382
    SAL_DLLPRIVATE void add_mnemonic_label(FixedText *pLabel);
1383
    SAL_DLLPRIVATE void remove_mnemonic_label(FixedText *pLabel);
1384
    SAL_DLLPRIVATE const std::vector<VclPtr<FixedText> >& list_mnemonic_labels() const;
1385
1386
    /*
1387
     * Move this widget to be the nNewPosition'd child of its parent
1388
     */
1389
    SAL_DLLPRIVATE void reorderWithinParent(sal_uInt16 nNewPosition);
1390
1391
    /**
1392
     * Sets an ID.
1393
     */
1394
    void set_id(const OUString& rID);
1395
1396
    /**
1397
     * Get the ID of the window.
1398
     */
1399
    const OUString& get_id() const;
1400
1401
1402
    //  Native Widget Rendering functions
1403
1404
1405
    // form controls must never use native widgets, this can be toggled here
1406
    void    EnableNativeWidget( bool bEnable = true );
1407
    bool    IsNativeWidgetEnabled() const;
1408
1409
    // a helper method for a Control's Draw method
1410
    void PaintToDevice( ::OutputDevice* pDevice, const Point& rPos );
1411
1412
    //  Keyboard access functions
1413
1414
    /** Query the states of keyboard indicators - Caps Lock, Num Lock and
1415
        Scroll Lock.  Use the following mask to retrieve the state of each
1416
        indicator:
1417
1418
            KeyIndicatorState::CAPS_LOCK
1419
            KeyIndicatorState::NUM_LOCK
1420
            KeyIndicatorState::SCROLL_LOCK
1421
      */
1422
    KeyIndicatorState GetIndicatorState() const;
1423
1424
    void SimulateKeyPress( sal_uInt16 nKeyCode ) const;
1425
1426
    virtual OUString GetSurroundingText() const;
1427
1428
    /**
1429
     * Return the non-normalized Selection, i.e. calling Selection::Min() on
1430
     * the returned Selection returns the selection anchor and Selection::Max()
1431
     * returns the cursor position.
1432
     */
1433
    virtual Selection GetSurroundingTextSelection() const;
1434
1435
    virtual bool DeleteSurroundingText(const Selection& rSelection);
1436
1437
    virtual FactoryFunction GetUITestFactory() const;
1438
1439
0
    virtual bool IsChart() const { return false; }
1440
0
    virtual bool IsStarMath() const { return false; }
1441
1442
    SAL_DLLPRIVATE void SetCommandHdl(const Link<const CommandEvent&, bool>& rLink);
1443
    SAL_DLLPRIVATE void SetHelpHdl(const Link<vcl::Window&, bool>& rLink);
1444
    SAL_DLLPRIVATE void SetMnemonicActivateHdl(const Link<vcl::Window&, bool>& rLink);
1445
    void SetModalHierarchyHdl(const Link<bool, void>& rLink);
1446
    SAL_DLLPRIVATE void SetDumpAsPropertyTreeHdl(const Link<tools::JsonWriter&, void>& rLink);
1447
1448
    Size                        GetOutputSizePixel() const;
1449
    SAL_DLLPRIVATE tools::Rectangle GetOutputRectPixel() const;
1450
1451
    Point                       LogicToPixel( const Point& rLogicPt ) const;
1452
    Size                        LogicToPixel( const Size& rLogicSize ) const;
1453
    tools::Rectangle            LogicToPixel( const tools::Rectangle& rLogicRect ) const;
1454
    vcl::Region                 LogicToPixel( const vcl::Region& rLogicRegion )const;
1455
    Point                       LogicToPixel( const Point& rLogicPt,
1456
                                              const MapMode& rMapMode ) const;
1457
    Size                        LogicToPixel( const Size& rLogicSize,
1458
                                              const MapMode& rMapMode ) const;
1459
    tools::Rectangle            LogicToPixel( const tools::Rectangle& rLogicRect,
1460
                                              const MapMode& rMapMode ) const;
1461
1462
    Point                       PixelToLogic( const Point& rDevicePt ) const;
1463
    Size                        PixelToLogic( const Size& rDeviceSize ) const;
1464
    tools::Rectangle                   PixelToLogic( const tools::Rectangle& rDeviceRect ) const;
1465
    tools::PolyPolygon          PixelToLogic( const tools::PolyPolygon& rDevicePolyPoly ) const;
1466
    SAL_DLLPRIVATE vcl::Region  PixelToLogic( const vcl::Region& rDeviceRegion ) const;
1467
    Point                       PixelToLogic( const Point& rDevicePt,
1468
                                              const MapMode& rMapMode ) const;
1469
    Size                        PixelToLogic( const Size& rDeviceSize,
1470
                                              const MapMode& rMapMode ) const;
1471
    tools::Rectangle            PixelToLogic( const tools::Rectangle& rDeviceRect,
1472
                                              const MapMode& rMapMode ) const;
1473
1474
    Size                        LogicToLogic( const Size&       rSzSource,
1475
                                              const MapMode*    pMapModeSource,
1476
                                              const MapMode*    pMapModeDest ) const;
1477
1478
    const AllSettings&          GetSettings() const;
1479
    void SetSettings( const AllSettings& rSettings );
1480
    void SetSettings( const AllSettings& rSettings, bool bChild );
1481
1482
    tools::Rectangle            GetTextRect( const tools::Rectangle& rRect,
1483
                                             const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak,
1484
                                             TextRectInfo* pInfo = nullptr,
1485
                                             const vcl::TextLayoutCommon* _pTextLayout = nullptr ) const;
1486
    float                       GetDPIScaleFactor() const;
1487
    tools::Long                 GetOutOffXPixel() const;
1488
    tools::Long                 GetOutOffYPixel() const;
1489
1490
    void                        EnableMapMode( bool bEnable = true );
1491
    bool                        IsMapModeEnabled() const;
1492
    SAL_DLLPRIVATE void         SetMapMode();
1493
    void                        SetMapMode( const MapMode& rNewMapMode );
1494
1495
    // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphicsLayout
1496
    virtual void                EnableRTL( bool bEnable = true);
1497
    bool                        IsRTLEnabled() const;
1498
1499
    void                        SetFont( const vcl::Font& rNewFont );
1500
    const vcl::Font&            GetFont() const;
1501
1502
    /** Width of the text.
1503
1504
        See also GetTextBoundRect() for more explanation + code examples.
1505
    */
1506
    tools::Long                 GetTextWidth( const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
1507
                                    vcl::text::TextLayoutCache const* = nullptr,
1508
                                    SalLayoutGlyphs const*const pLayoutCache = nullptr) const;
1509
1510
    /** Height where any character of the current font fits; in logic coordinates.
1511
1512
        See also GetTextBoundRect() for more explanation + code examples.
1513
    */
1514
    tools::Long                 GetTextHeight() const;
1515
    float                       approximate_digit_width() const;
1516
1517
    void                        SetTextColor( const Color& rColor );
1518
    const Color&                GetTextColor() const;
1519
1520
    void                        SetTextFillColor();
1521
    void                        SetTextFillColor( const Color& rColor );
1522
    Color                       GetTextFillColor() const;
1523
    SAL_DLLPRIVATE bool         IsTextFillColor() const;
1524
1525
    void                        SetTextLineColor();
1526
    void                        SetTextLineColor( const Color& rColor );
1527
    const Color&                GetTextLineColor() const;
1528
    bool                        IsTextLineColor() const;
1529
1530
    SAL_DLLPRIVATE void         SetOverlineColor();
1531
    SAL_DLLPRIVATE void         SetOverlineColor( const Color& rColor );
1532
    SAL_DLLPRIVATE const Color& GetOverlineColor() const;
1533
    SAL_DLLPRIVATE bool         IsOverlineColor() const;
1534
1535
    void                        SetTextAlign( TextAlign eAlign );
1536
    SAL_DLLPRIVATE TextAlign    GetTextAlign() const;
1537
1538
    /** Query the platform layer for control support
1539
     */
1540
    SAL_DLLPRIVATE bool         IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
1541
1542
    /** Query the native control's actual drawing region (including adornment)
1543
     */
1544
    SAL_DLLPRIVATE bool         GetNativeControlRegion(
1545
                                    ControlType nType,
1546
                                    ControlPart nPart,
1547
                                    const tools::Rectangle& rControlRegion,
1548
                                    ControlState nState,
1549
                                    const ImplControlValue& aValue,
1550
                                    tools::Rectangle &rNativeBoundingRegion,
1551
                                    tools::Rectangle &rNativeContentRegion ) const;
1552
protected:
1553
    SAL_DLLPRIVATE float        approximate_char_width() const;
1554
private:
1555
    SAL_DLLPRIVATE void         ImplEnableRTL(bool bEnable);
1556
};
1557
1558
}
1559
1560
#endif // INCLUDED_VCL_WINDOW_HXX
1561
1562
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */