LibreOffice Module vcl (master) 1
event.cxx
Go to the documentation of this file.
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#include <vcl/event.hxx>
21#include <vcl/window.hxx>
22#include <vcl/dockwin.hxx>
23#include <vcl/layout.hxx>
24#include <sal/log.hxx>
25
26#include <window.h>
27#include <svdata.hxx>
28#include <salframe.hxx>
29#include <config_features.h>
31
33
34namespace vcl {
35
37{
38}
39
41{
42 CompatDataChanged( rDCEvt );
43
44 vcl::Window* pChild = mpWindowImpl->mpFirstChild;
45 while ( pChild )
46 {
47 pChild->NotifyAllChildren( rDCEvt );
48 pChild = pChild->mpWindowImpl->mpNext;
49 }
50}
51
53{
54 bool bDone = false;
55 if ( mpWindowImpl->mpParent && !ImplIsOverlapWindow() )
56 bDone = mpWindowImpl->mpParent->CompatPreNotify( rNEvt );
57
58 if ( !bDone )
59 {
60 if( rNEvt.GetType() == NotifyEventType::GETFOCUS )
61 {
62 bool bCompoundFocusChanged = false;
63 if ( mpWindowImpl->mbCompoundControl && !mpWindowImpl->mbCompoundControlHasFocus && HasChildPathFocus() )
64 {
65 mpWindowImpl->mbCompoundControlHasFocus = true;
66 bCompoundFocusChanged = true;
67 }
68
69 if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) )
71 }
72 else if( rNEvt.GetType() == NotifyEventType::LOSEFOCUS )
73 {
74 bool bCompoundFocusChanged = false;
75 if ( mpWindowImpl->mbCompoundControl && mpWindowImpl->mbCompoundControlHasFocus && !HasChildPathFocus() )
76 {
77 mpWindowImpl->mbCompoundControlHasFocus = false ;
78 bCompoundFocusChanged = true;
79 }
80
81 if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) )
83 }
84
85 // #82968# mouse and key events will be notified after processing ( in ImplNotifyKeyMouseCommandEventListeners() )!
86 // see also ImplHandleMouseEvent(), ImplHandleKey()
87
88 }
89
90 return bDone;
91}
92
93namespace
94{
95 bool parentNotDialogControl(Window* pWindow)
96 {
97 vcl::Window* pParent = getNonLayoutParent(pWindow);
98 if (!pParent)
99 return true;
100 return ((pParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) != WB_DIALOGCONTROL);
101 }
102}
103
105{
106 bool bRet = false;
107
108 if (isDisposed())
109 return false;
110
111 // check for docking window
112 // but do nothing if window is docked and locked
114 if ((GetStyle() & WB_DOCKABLE) &&
115 pWrapper && ( pWrapper->IsFloatingMode() || !pWrapper->IsLocked() ))
116 {
117 const bool bDockingSupportCrippled = !StyleSettings::GetDockingFloatsSupported();
118
120 {
121 const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
122 bool bHit = pWrapper->GetDragArea().Contains( pMEvt->GetPosPixel() );
123 if ( pMEvt->IsLeft() )
124 {
125 if (!bDockingSupportCrippled && pMEvt->IsMod1() && (pMEvt->GetClicks() == 2))
126 {
127 // ctrl double click toggles floating mode
128 pWrapper->SetFloatingMode( !pWrapper->IsFloatingMode() );
129 return true;
130 }
131 else if ( pMEvt->GetClicks() == 1 && bHit)
132 {
133 // allow start docking during mouse move
134 pWrapper->ImplEnableStartDocking();
135 return true;
136 }
137 }
138 }
139 else if ( rNEvt.GetType() == NotifyEventType::MOUSEMOVE )
140 {
141 const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
142 bool bHit = pWrapper->GetDragArea().Contains( pMEvt->GetPosPixel() );
143 if ( pMEvt->IsLeft() )
144 {
145 // check if a single click initiated this sequence ( ImplStartDockingEnabled() )
146 // check if window is docked and
147 if( pWrapper->ImplStartDockingEnabled() && !pWrapper->IsFloatingMode() &&
148 !pWrapper->IsDocking() && bHit )
149 {
150 Point aPos = pMEvt->GetPosPixel();
151 vcl::Window* pWindow = rNEvt.GetWindow();
152 if ( pWindow != this )
153 {
154 aPos = pWindow->OutputToScreenPixel( aPos );
155 aPos = ScreenToOutputPixel( aPos );
156 }
157 pWrapper->ImplStartDocking( aPos );
158 }
159 return true;
160 }
161 }
162 else if( rNEvt.GetType() == NotifyEventType::KEYINPUT )
163 {
164 const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode();
165 if (rKey.GetCode() == KEY_F10 && rKey.GetModifier() &&
166 rKey.IsShift() && rKey.IsMod1() && !bDockingSupportCrippled)
167 {
168 pWrapper->SetFloatingMode( !pWrapper->IsFloatingMode() );
169 /* At this point the floating toolbar frame does not have the
170 * input focus since these frames don't get the focus per default
171 * To enable keyboard handling of this toolbar set the input focus
172 * to the frame. This needs to be done with ToTop since GrabFocus
173 * would not notice any change since "this" already has the focus.
174 */
175 if( pWrapper->IsFloatingMode() )
177 return true;
178 }
179 }
180 }
181
182 // manage the dialogs
184 {
185 // if the parent also has dialog control activated, the parent takes over control
186 if ( (rNEvt.GetType() == NotifyEventType::KEYINPUT) || (rNEvt.GetType() == NotifyEventType::KEYUP) )
187 {
188 // ScGridWindow has WB_DIALOGCONTROL set, so pressing tab in ScCheckListMenuControl won't
189 // get processed here by the toplevel DockingWindow of ScCheckListMenuControl by
190 // just checking if parentNotDialogControl is true
191 bool bTopLevelFloatingWindow = (pWrapper && pWrapper->IsFloatingMode());
192 if (ImplIsOverlapWindow() || parentNotDialogControl(this) || bTopLevelFloatingWindow)
193 {
194 bRet = ImplDlgCtrl( *rNEvt.GetKeyEvent(), rNEvt.GetType() == NotifyEventType::KEYINPUT );
195 }
196 }
197 else if ( (rNEvt.GetType() == NotifyEventType::GETFOCUS) || (rNEvt.GetType() == NotifyEventType::LOSEFOCUS) )
198 {
200 if ( (rNEvt.GetWindow() == this) && (rNEvt.GetType() == NotifyEventType::GETFOCUS) &&
201 !(GetStyle() & WB_TABSTOP) && !(mpWindowImpl->mnDlgCtrlFlags & DialogControlFlags::WantFocus) )
202 {
204 if ( pFirstChild )
205 pFirstChild->ImplControlFocus();
206 }
207 }
208 }
209
210 if ( !bRet )
211 {
212 if ( mpWindowImpl->mpParent && !ImplIsOverlapWindow() )
213 bRet = mpWindowImpl->mpParent->CompatNotify( rNEvt );
214 }
215
216 return bRet;
217}
218
219void Window::CallEventListeners( VclEventId nEvent, void* pData )
220{
221 VclWindowEvent aEvent( this, nEvent, pData );
222
223 VclPtr<vcl::Window> xWindow = this;
224
226
227 // if we have ObjectDying, then the bIsDisposed flag has already been set,
228 // but we still need to let listeners know.
229 const bool bIgnoreDisposed = nEvent == VclEventId::ObjectDying;
230
231 if ( !bIgnoreDisposed && xWindow->isDisposed() )
232 return;
233
234 // If maEventListeners is empty, the XVCLWindow has not yet been initialized.
235 // Calling GetComponentInterface will do that.
236 if (mpWindowImpl->maEventListeners.empty() && pData)
237 xWindow->GetComponentInterface();
238
239 if (!mpWindowImpl->maEventListeners.empty())
240 {
241 // Copy the list, because this can be destroyed when calling a Link...
242 std::vector<Link<VclWindowEvent&,void>> aCopy( mpWindowImpl->maEventListeners );
243 // we use an iterating counter/flag and a set of deleted Link's to avoid O(n^2) behaviour
244 mpWindowImpl->mnEventListenersIteratingCount++;
245 auto& rWindowImpl = *mpWindowImpl;
247 [&rWindowImpl, &xWindow, &bIgnoreDisposed]()
248 {
249 if (bIgnoreDisposed || !xWindow->isDisposed())
250 {
251 rWindowImpl.mnEventListenersIteratingCount--;
252 if (rWindowImpl.mnEventListenersIteratingCount == 0)
253 rWindowImpl.maEventListenersDeleted.clear();
254 }
255 }
256 );
257 for ( const Link<VclWindowEvent&,void>& rLink : aCopy )
258 {
259 if (!bIgnoreDisposed && xWindow->isDisposed()) break;
260 // check this hasn't been removed in some re-enterancy scenario fdo#47368
261 if( rWindowImpl.maEventListenersDeleted.find(rLink) == rWindowImpl.maEventListenersDeleted.end() )
262 rLink.Call( aEvent );
263 }
264 }
265
266 while ( xWindow )
267 {
268
269 if ( !bIgnoreDisposed && xWindow->isDisposed() )
270 return;
271
272 auto& rWindowImpl = *xWindow->mpWindowImpl;
273 if (!rWindowImpl.maChildEventListeners.empty())
274 {
275 // Copy the list, because this can be destroyed when calling a Link...
276 std::vector<Link<VclWindowEvent&,void>> aCopy( rWindowImpl.maChildEventListeners );
277 // we use an iterating counter/flag and a set of deleted Link's to avoid O(n^2) behaviour
278 rWindowImpl.mnChildEventListenersIteratingCount++;
280 [&rWindowImpl, &xWindow, &bIgnoreDisposed]()
281 {
282 if (bIgnoreDisposed || !xWindow->isDisposed())
283 {
284 rWindowImpl.mnChildEventListenersIteratingCount--;
285 if (rWindowImpl.mnChildEventListenersIteratingCount == 0)
286 rWindowImpl.maChildEventListenersDeleted.clear();
287 }
288 }
289 );
290 for ( const Link<VclWindowEvent&,void>& rLink : aCopy )
291 {
292 if (!bIgnoreDisposed && xWindow->isDisposed())
293 return;
294 // Check this hasn't been removed in some re-enterancy scenario fdo#47368.
295 if( rWindowImpl.maChildEventListenersDeleted.find(rLink) == rWindowImpl.maChildEventListenersDeleted.end() )
296 rLink.Call( aEvent );
297 }
298 }
299
300 if ( !bIgnoreDisposed && xWindow->isDisposed() )
301 return;
302
303 xWindow = xWindow->GetParent();
304 }
305}
306
308{
309 mpWindowImpl->maEventListeners.push_back( rEventListener );
310}
311
313{
314 if (mpWindowImpl)
315 {
316 auto& rListeners = mpWindowImpl->maEventListeners;
317 rListeners.erase( std::remove(rListeners.begin(), rListeners.end(), rEventListener ), rListeners.end() );
318 if (mpWindowImpl->mnEventListenersIteratingCount)
319 mpWindowImpl->maEventListenersDeleted.insert(rEventListener);
320 }
321}
322
324{
325 mpWindowImpl->maChildEventListeners.push_back( rEventListener );
326}
327
329{
330 if (mpWindowImpl)
331 {
332 auto& rListeners = mpWindowImpl->maChildEventListeners;
333 rListeners.erase( std::remove(rListeners.begin(), rListeners.end(), rEventListener ), rListeners.end() );
334 if (mpWindowImpl->mnChildEventListenersIteratingCount)
335 mpWindowImpl->maChildEventListenersDeleted.insert(rEventListener);
336 }
337}
338
339ImplSVEvent * Window::PostUserEvent( const Link<void*,void>& rLink, void* pCaller, bool bReferenceLink )
340{
341 std::unique_ptr<ImplSVEvent> pSVEvent(new ImplSVEvent);
342 pSVEvent->mpData = pCaller;
343 pSVEvent->maLink = rLink;
344 pSVEvent->mpWindow = this;
345 pSVEvent->mbCall = true;
346 if (bReferenceLink)
347 {
348 pSVEvent->mpInstanceRef = static_cast<vcl::Window *>(rLink.GetInstance());
349 }
350
351 auto pTmpEvent = pSVEvent.get();
352 if (!mpWindowImpl->mpFrame->PostEvent( std::move(pSVEvent) ))
353 return nullptr;
354 return pTmpEvent;
355}
356
358{
359 SAL_WARN_IF( nUserEvent->mpWindow.get() != this, "vcl",
360 "Window::RemoveUserEvent(): Event doesn't send to this window or is already removed" );
361 SAL_WARN_IF( !nUserEvent->mbCall, "vcl",
362 "Window::RemoveUserEvent(): Event is already removed" );
363
364 if ( nUserEvent->mpWindow )
365 {
366 nUserEvent->mpWindow = nullptr;
367 }
368
369 nUserEvent->mbCall = false;
370}
371
372
373static MouseEvent ImplTranslateMouseEvent( const MouseEvent& rE, vcl::Window const * pSource, vcl::Window const * pDest )
374{
375 // the mouse event occurred in a different window, we need to translate the coordinates of
376 // the mouse cursor within that (source) window to the coordinates the mouse cursor would
377 // be in the destination window
378 Point aPos = pSource->OutputToScreenPixel( rE.GetPosPixel() );
379 return MouseEvent( pDest->ScreenToOutputPixel( aPos ), rE.GetClicks(), rE.GetMode(), rE.GetButtons(), rE.GetModifier() );
380}
381
383{
384 if( rNEvt.GetType() == NotifyEventType::COMMAND )
385 {
386 const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
387 if ( pCEvt->GetCommand() != CommandEventId::ContextMenu )
388 // non context menu events are not to be notified up the chain
389 // so we return immediately
390 return;
391
392 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
393 {
394 // not interested: The event listeners are already called in ::Command,
395 // and calling them here a second time doesn't make sense
396 if ( rNEvt.GetWindow() != this )
397 {
398 CommandEvent aCommandEvent;
399
400 if ( !pCEvt->IsMouseEvent() )
401 {
402 aCommandEvent = *pCEvt;
403 }
404 else
405 {
406 // the mouse event occurred in a different window, we need to translate the coordinates of
407 // the mouse cursor within that window to the coordinates the mouse cursor would be in the
408 // current window
409 vcl::Window* pSource = rNEvt.GetWindow();
410 Point aPos = pSource->OutputToScreenPixel( pCEvt->GetMousePosPixel() );
411 aCommandEvent = CommandEvent( ScreenToOutputPixel( aPos ), pCEvt->GetCommand(), pCEvt->IsMouseEvent(), pCEvt->GetEventData() );
412 }
413
415 }
416 }
417 }
418
419 // #82968# notify event listeners for mouse and key events separately and
420 // not in PreNotify ( as for focus listeners )
421 // this allows for processing those events internally first and pass it to
422 // the toolkit later
423
424 VclPtr<vcl::Window> xWindow = this;
425
426 if( rNEvt.GetType() == NotifyEventType::MOUSEMOVE )
427 {
428 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
429 {
430 if ( rNEvt.GetWindow() == this )
432 else
433 {
434 MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
436 }
437 }
438 }
439 else if( rNEvt.GetType() == NotifyEventType::MOUSEBUTTONUP )
440 {
441 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
442 {
443 if ( rNEvt.GetWindow() == this )
445 else
446 {
447 MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
449 }
450 }
451 }
452 else if( rNEvt.GetType() == NotifyEventType::MOUSEBUTTONDOWN )
453 {
454 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
455 {
456 if ( rNEvt.GetWindow() == this )
458 else
459 {
460 MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
462 }
463 }
464 }
465 else if( rNEvt.GetType() == NotifyEventType::KEYINPUT )
466 {
467 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
469 }
470 else if( rNEvt.GetType() == NotifyEventType::KEYUP )
471 {
472 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
474 }
475
476 if ( xWindow->isDisposed() )
477 return;
478
479 // #106721# check if we're part of a compound control and notify
480 vcl::Window *pParent = ImplGetParent();
481 while( pParent )
482 {
483 if( pParent->IsCompoundControl() )
484 {
486 break;
487 }
488 pParent = pParent->ImplGetParent();
489 }
490}
491
493{
494 mpWindowImpl->mbReallyShown = true;
495 mpWindowImpl->mbInInitShow = true;
497 mpWindowImpl->mbInInitShow = false;
498
499 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
500 while ( pWindow )
501 {
502 if ( pWindow->mpWindowImpl->mbVisible )
503 pWindow->ImplCallInitShow();
504 pWindow = pWindow->mpWindowImpl->mpNext;
505 }
506
507 pWindow = mpWindowImpl->mpFirstChild;
508 while ( pWindow )
509 {
510 if ( pWindow->mpWindowImpl->mbVisible )
511 pWindow->ImplCallInitShow();
512 pWindow = pWindow->mpWindowImpl->mpNext;
513 }
514}
515
516
518{
519 mpWindowImpl->mbCallResize = false;
520
521 // Normally we avoid blanking on re-size unless people might notice:
522 if( GetBackground().IsGradient() )
523 Invalidate();
524
525 Resize();
526
527 // #88419# Most classes don't call the base class in Resize() and Move(),
528 // => Call ImpleResize/Move instead of Resize/Move directly...
530}
531
533{
534 mpWindowImpl->mbCallMove = false;
535
536 if( mpWindowImpl->mbFrame )
537 {
538 // update frame position
539 SalFrame *pParentFrame = nullptr;
540 vcl::Window *pParent = ImplGetParent();
541 while( pParent )
542 {
543 if( pParent->mpWindowImpl &&
544 pParent->mpWindowImpl->mpFrame != mpWindowImpl->mpFrame )
545 {
546 pParentFrame = pParent->mpWindowImpl->mpFrame;
547 break;
548 }
549 pParent = pParent->GetParent();
550 }
551
552 SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry();
553 mpWindowImpl->maPos = Point(g.x(), g.y());
554 if( pParentFrame )
555 {
556 g = pParentFrame->GetGeometry();
557 mpWindowImpl->maPos -= Point(g.x(), g.y());
558 }
559 // the client window and all its subclients have the same position as the borderframe
560 // this is important for floating toolbars where the borderwindow is a floating window
561 // which has another borderwindow (ie the system floating window)
562 vcl::Window *pClientWin = mpWindowImpl->mpClientWindow;
563 while( pClientWin )
564 {
565 pClientWin->mpWindowImpl->maPos = mpWindowImpl->maPos;
566 pClientWin = pClientWin->mpWindowImpl->mpClientWindow;
567 }
568 }
569
570 Move();
571
573}
574
576 vcl::Window* pOldOverlapWindow )
577{
578 ImplSVData* pSVData = ImplGetSVData();
579 vcl::Window* pNewRealWindow;
580 vcl::Window* pOldRealWindow;
581 bool bCallActivate = true;
582 bool bCallDeactivate = true;
583
584 if (!pOldOverlapWindow)
585 {
586 return;
587 }
588
589 pOldRealWindow = pOldOverlapWindow->ImplGetWindow();
590 if (!pNewOverlapWindow)
591 {
592 return;
593 }
594
595 pNewRealWindow = pNewOverlapWindow->ImplGetWindow();
596 if ( (pOldRealWindow->GetType() != WindowType::FLOATINGWINDOW) ||
597 pOldRealWindow->GetActivateMode() != ActivateModeFlags::NONE )
598 {
599 if ( (pNewRealWindow->GetType() == WindowType::FLOATINGWINDOW) &&
600 pNewRealWindow->GetActivateMode() == ActivateModeFlags::NONE)
601 {
602 pSVData->mpWinData->mpLastDeacWin = pOldOverlapWindow;
603 bCallDeactivate = false;
604 }
605 }
606 else if ( (pNewRealWindow->GetType() != WindowType::FLOATINGWINDOW) ||
607 pNewRealWindow->GetActivateMode() != ActivateModeFlags::NONE )
608 {
609 if (pSVData->mpWinData->mpLastDeacWin)
610 {
611 if (pSVData->mpWinData->mpLastDeacWin.get() == pNewOverlapWindow)
612 bCallActivate = false;
613 else
614 {
615 vcl::Window* pLastRealWindow = pSVData->mpWinData->mpLastDeacWin->ImplGetWindow();
616 pSVData->mpWinData->mpLastDeacWin->mpWindowImpl->mbActive = false;
618 if (pLastRealWindow != pSVData->mpWinData->mpLastDeacWin.get())
619 {
620 pLastRealWindow->mpWindowImpl->mbActive = true;
621 pLastRealWindow->Activate();
622 }
623 }
624 pSVData->mpWinData->mpLastDeacWin = nullptr;
625 }
626 }
627
628 if ( bCallDeactivate )
629 {
630 if( pOldOverlapWindow->mpWindowImpl->mbActive )
631 {
632 pOldOverlapWindow->mpWindowImpl->mbActive = false;
633 pOldOverlapWindow->Deactivate();
634 }
635 if ( pOldRealWindow != pOldOverlapWindow )
636 {
637 if( pOldRealWindow->mpWindowImpl->mbActive )
638 {
639 pOldRealWindow->mpWindowImpl->mbActive = false;
640 pOldRealWindow->Deactivate();
641 }
642 }
643 }
644 if ( !bCallActivate || pNewOverlapWindow->mpWindowImpl->mbActive )
645 return;
646
647 pNewOverlapWindow->mpWindowImpl->mbActive = true;
648 pNewOverlapWindow->Activate();
649
650 if ( pNewRealWindow != pNewOverlapWindow )
651 {
652 if( ! pNewRealWindow->mpWindowImpl->mbActive )
653 {
654 pNewRealWindow->mpWindowImpl->mbActive = true;
655 pNewRealWindow->Activate();
656 }
657 }
658}
659
660} /* namespace vcl */
661
662
664 const void* pEvent )
665{
666 mpWindow = pWindow;
667 mpData = const_cast<void*>(pEvent);
668 mnEventType = nEventType;
669}
670
671NotifyEvent::~NotifyEvent() = default;
672
673/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AnyEventRef aEvent
static void ImplCallEventListeners(VclSimpleEvent &rEvent)
Send event to all VCL application event listeners.
Definition: svapp.cxx:692
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
void * GetEventData() const
bool IsMouseEvent() const
ImplDockingWindowWrapper * GetDockingWindowWrapper(const vcl::Window *pWin)
Definition: dockmgr.cxx:280
ImplDockingWindowWrapper.
const tools::Rectangle & GetDragArea() const
bool IsFloatingMode() const
Definition: dockmgr.cxx:1039
void SetFloatingMode(bool bFloatMode)
Definition: dockmgr.cxx:884
void ImplStartDocking(const Point &rPos)
Definition: dockmgr.cxx:511
const vcl::KeyCode & GetKeyCode() const
Definition: event.hxx:57
bool IsMod1() const
Definition: event.hxx:160
MouseEventModifiers GetMode() const
Definition: event.hxx:124
sal_uInt16 GetModifier() const
Definition: event.hxx:156
sal_uInt16 GetClicks() const
Definition: event.hxx:126
sal_uInt16 GetButtons() const
Definition: event.hxx:147
const Point & GetPosPixel() const
Definition: event.hxx:123
bool IsLeft() const
Definition: event.hxx:149
const KeyEvent * GetKeyEvent() const
Definition: event.hxx:316
vcl::Window * GetWindow() const
Definition: event.hxx:309
const CommandEvent * GetCommandEvent() const
Definition: event.hxx:332
NotifyEvent(NotifyEventType nEventType, vcl::Window *pWindow, const void *pEvent=nullptr)
Definition: event.cxx:663
const MouseEvent * GetMouseEvent() const
Definition: event.hxx:324
NotifyEventType mnEventType
Definition: event.hxx:293
void * mpData
Definition: event.hxx:292
VclPtr< vcl::Window > mpWindow
Definition: event.hxx:291
NotifyEventType GetType() const
Definition: event.hxx:308
A SalFrame is a system window (e.g. an X11 window).
Definition: salframe.hxx:115
SalFrameGeometry GetGeometry() const
static bool GetDockingFloatsSupported()
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
bool isDisposed() const
bool Contains(const Point &rPOINT) const
bool IsMod1() const
Definition: keycod.hxx:56
sal_uInt16 GetCode() const
Definition: keycod.hxx:49
sal_uInt16 GetModifier() const
Definition: keycod.hxx:52
bool IsShift() const
Definition: keycod.hxx:54
constexpr sal_Int32 y() const
constexpr sal_Int32 x() const
Point OutputToScreenPixel(const Point &rPos) const
Definition: window.cxx:2806
const Wallpaper & GetBackground() const
Definition: window3.cxx:63
vcl::Window * GetParent() const
Definition: window2.cxx:1123
ActivateModeFlags GetActivateMode() const
Definition: window2.cxx:1163
SAL_DLLPRIVATE vcl::Window * ImplGetDlgWindow(sal_uInt16 n, GetDlgWindowType nType, sal_uInt16 nStart=0, sal_uInt16 nEnd=0xFFFF, sal_uInt16 *pIndex=nullptr)
Definition: dlgctrl.cxx:205
void RemoveEventListener(const Link< VclWindowEvent &, void > &rEventListener)
Definition: event.cxx:312
bool HasChildPathFocus(bool bSystemWindow=false) const
Definition: window.cxx:3004
WindowType GetType() const
Definition: window2.cxx:1000
SAL_DLLPRIVATE bool ImplDlgCtrl(const KeyEvent &rKEvt, bool bKeyInput)
Definition: dlgctrl.cxx:621
virtual void Resize()
Definition: window.cxx:1835
SAL_DLLPRIVATE bool ImplIsOverlapWindow() const
Definition: window2.cxx:962
bool IsCompoundControl() const
Definition: window2.cxx:1219
ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
Definition: event.cxx:339
static SAL_DLLPRIVATE void ImplCallFocusChangeActivate(vcl::Window *pNewOverlapWindow, vcl::Window *pOldOverlapWindow)
Definition: event.cxx:575
WinBits GetStyle() const
Definition: window2.cxx:979
SAL_DLLPRIVATE void ImplNotifyKeyMouseCommandEventListeners(NotifyEvent &rNEvt)
Definition: event.cxx:382
virtual void Move()
Definition: window.cxx:1833
virtual bool PreNotify(NotifyEvent &rNEvt)
Definition: event.cxx:52
SAL_DLLPRIVATE vcl::Window * ImplGetParent() const
Definition: window2.cxx:896
void ToTop(ToTopFlags nFlags=ToTopFlags::NONE)
Definition: stacking.cxx:419
SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged(vcl::Window *pWindow, bool bGetFocus)
Definition: dlgctrl.cxx:1091
void RemoveUserEvent(ImplSVEvent *nUserEvent)
Definition: event.cxx:357
SAL_DLLPRIVATE void CompatDataChanged(const DataChangedEvent &rDCEvt)
Definition: window.cxx:3906
SAL_DLLPRIVATE void ImplCallMove()
Definition: event.cxx:532
void AddEventListener(const Link< VclWindowEvent &, void > &rEventListener)
Definition: event.cxx:307
virtual css::uno::Reference< css::awt::XVclWindowPeer > GetComponentInterface(bool bCreate=true)
Definition: window.cxx:3145
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:484
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
Definition: event.cxx:323
virtual void Deactivate()
Definition: window.cxx:1839
virtual void DataChanged(const DataChangedEvent &rDCEvt)
Definition: event.cxx:36
virtual void Activate()
Definition: window.cxx:1837
SAL_DLLPRIVATE void ImplCallResize()
Definition: event.cxx:517
SAL_DLLPRIVATE void ImplCallInitShow()
Definition: event.cxx:492
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Definition: paint.cxx:1143
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: event.cxx:219
vcl::Window * ImplGetWindow() const
if this is a proxy return the client, otherwise itself
Definition: window2.cxx:866
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2812
virtual bool EventNotify(NotifyEvent &rNEvt)
Definition: event.cxx:104
void NotifyAllChildren(DataChangedEvent &rDCEvt)
Definition: event.cxx:40
void RemoveChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
Definition: event.cxx:328
SAL_DLLPRIVATE void ImplControlFocus(GetFocusFlags nFlags=GetFocusFlags::NONE)
Definition: dlgctrl.cxx:516
SAL_DLLPRIVATE void CompatStateChanged(StateChangedType nStateChange)
Definition: window.cxx:3898
NotifyEventType
Definition: event.hxx:276
constexpr sal_uInt16 KEY_F10
Definition: keycodes.hxx:92
vcl::Window * getNonLayoutParent(vcl::Window *pWindow)
Definition: layout.cxx:2968
#define SAL_WARN_IF(condition, area, stream)
std::unique_ptr< sal_Int32[]> pData
static MouseEvent ImplTranslateMouseEvent(const MouseEvent &rE, vcl::Window const *pSource, vcl::Window const *pDest)
Definition: event.cxx:373
ImplSVWinData * mpWinData
Definition: svdata.hxx:400
bool mbCall
Definition: svdata.hxx:466
VclPtr< vcl::Window > mpWindow
Definition: svdata.hxx:465
VclPtr< vcl::Window > mpLastDeacWin
Definition: svdata.hxx:253
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:77
DockingManager * ImplGetDockingManager()
Definition: svdata.cxx:316
VclEventId
Definition: vclevent.hxx:38
@ WindowMouseButtonDown
@ WindowMouseButtonUp
WinBits const WB_DIALOGCONTROL
Definition: wintypes.hxx:113
WinBits const WB_DOCKABLE
Definition: wintypes.hxx:162
WinBits const WB_NODIALOGCONTROL
Definition: wintypes.hxx:114
WinBits const WB_TABSTOP
Definition: wintypes.hxx:140