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() == MouseNotifyEvent::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() == MouseNotifyEvent::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() == MouseNotifyEvent::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() == MouseNotifyEvent::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() == MouseNotifyEvent::KEYINPUT) || (rNEvt.GetType() == MouseNotifyEvent::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() == MouseNotifyEvent::KEYINPUT );
195 }
196 }
197 else if ( (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) || (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS) )
198 {
200 if ( (rNEvt.GetWindow() == this) && (rNEvt.GetType() == MouseNotifyEvent::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 ( xWindow->isDisposed() )
228 return;
229
230 // If maEventListeners is empty, the XVCLWindow has not yet been initialized.
231 // Calling GetComponentInterface will do that.
232 if (mpWindowImpl->maEventListeners.empty() && pData)
233 xWindow->GetComponentInterface();
234
235 if (!mpWindowImpl->maEventListeners.empty())
236 {
237 // Copy the list, because this can be destroyed when calling a Link...
238 std::vector<Link<VclWindowEvent&,void>> aCopy( mpWindowImpl->maEventListeners );
239 // we use an iterating counter/flag and a set of deleted Link's to avoid O(n^2) behaviour
240 mpWindowImpl->mnEventListenersIteratingCount++;
241 auto& rWindowImpl = *mpWindowImpl;
243 [&rWindowImpl, &xWindow]()
244 {
245 if (!xWindow->isDisposed())
246 {
247 rWindowImpl.mnEventListenersIteratingCount--;
248 if (rWindowImpl.mnEventListenersIteratingCount == 0)
249 rWindowImpl.maEventListenersDeleted.clear();
250 }
251 }
252 );
253 for ( const Link<VclWindowEvent&,void>& rLink : aCopy )
254 {
255 if (xWindow->isDisposed()) break;
256 // check this hasn't been removed in some re-enterancy scenario fdo#47368
257 if( rWindowImpl.maEventListenersDeleted.find(rLink) == rWindowImpl.maEventListenersDeleted.end() )
258 rLink.Call( aEvent );
259 }
260 }
261
262 while ( xWindow )
263 {
264
265 if ( xWindow->isDisposed() )
266 return;
267
268 auto& rWindowImpl = *xWindow->mpWindowImpl;
269 if (!rWindowImpl.maChildEventListeners.empty())
270 {
271 // Copy the list, because this can be destroyed when calling a Link...
272 std::vector<Link<VclWindowEvent&,void>> aCopy( rWindowImpl.maChildEventListeners );
273 // we use an iterating counter/flag and a set of deleted Link's to avoid O(n^2) behaviour
274 rWindowImpl.mnChildEventListenersIteratingCount++;
276 [&rWindowImpl, &xWindow]()
277 {
278 if (!xWindow->isDisposed())
279 {
280 rWindowImpl.mnChildEventListenersIteratingCount--;
281 if (rWindowImpl.mnChildEventListenersIteratingCount == 0)
282 rWindowImpl.maChildEventListenersDeleted.clear();
283 }
284 }
285 );
286 for ( const Link<VclWindowEvent&,void>& rLink : aCopy )
287 {
288 if (xWindow->isDisposed())
289 return;
290 // Check this hasn't been removed in some re-enterancy scenario fdo#47368.
291 if( rWindowImpl.maChildEventListenersDeleted.find(rLink) == rWindowImpl.maChildEventListenersDeleted.end() )
292 rLink.Call( aEvent );
293 }
294 }
295
296 if ( xWindow->isDisposed() )
297 return;
298
299 xWindow = xWindow->GetParent();
300 }
301}
302
304{
305 mpWindowImpl->maEventListeners.push_back( rEventListener );
306}
307
309{
310 if (mpWindowImpl)
311 {
312 auto& rListeners = mpWindowImpl->maEventListeners;
313 rListeners.erase( std::remove(rListeners.begin(), rListeners.end(), rEventListener ), rListeners.end() );
314 if (mpWindowImpl->mnEventListenersIteratingCount)
315 mpWindowImpl->maEventListenersDeleted.insert(rEventListener);
316 }
317}
318
320{
321 mpWindowImpl->maChildEventListeners.push_back( rEventListener );
322}
323
325{
326 if (mpWindowImpl)
327 {
328 auto& rListeners = mpWindowImpl->maChildEventListeners;
329 rListeners.erase( std::remove(rListeners.begin(), rListeners.end(), rEventListener ), rListeners.end() );
330 if (mpWindowImpl->mnChildEventListenersIteratingCount)
331 mpWindowImpl->maChildEventListenersDeleted.insert(rEventListener);
332 }
333}
334
335ImplSVEvent * Window::PostUserEvent( const Link<void*,void>& rLink, void* pCaller, bool bReferenceLink )
336{
337 std::unique_ptr<ImplSVEvent> pSVEvent(new ImplSVEvent);
338 pSVEvent->mpData = pCaller;
339 pSVEvent->maLink = rLink;
340 pSVEvent->mpWindow = this;
341 pSVEvent->mbCall = true;
342 if (bReferenceLink)
343 {
344 pSVEvent->mpInstanceRef = static_cast<vcl::Window *>(rLink.GetInstance());
345 }
346
347 auto pTmpEvent = pSVEvent.get();
348 if (!mpWindowImpl->mpFrame->PostEvent( std::move(pSVEvent) ))
349 return nullptr;
350 return pTmpEvent;
351}
352
354{
355 SAL_WARN_IF( nUserEvent->mpWindow.get() != this, "vcl",
356 "Window::RemoveUserEvent(): Event doesn't send to this window or is already removed" );
357 SAL_WARN_IF( !nUserEvent->mbCall, "vcl",
358 "Window::RemoveUserEvent(): Event is already removed" );
359
360 if ( nUserEvent->mpWindow )
361 {
362 nUserEvent->mpWindow = nullptr;
363 }
364
365 nUserEvent->mbCall = false;
366}
367
368
369static MouseEvent ImplTranslateMouseEvent( const MouseEvent& rE, vcl::Window const * pSource, vcl::Window const * pDest )
370{
371 // the mouse event occurred in a different window, we need to translate the coordinates of
372 // the mouse cursor within that (source) window to the coordinates the mouse cursor would
373 // be in the destination window
374 Point aPos = pSource->OutputToScreenPixel( rE.GetPosPixel() );
375 return MouseEvent( pDest->ScreenToOutputPixel( aPos ), rE.GetClicks(), rE.GetMode(), rE.GetButtons(), rE.GetModifier() );
376}
377
379{
380 if( rNEvt.GetType() == MouseNotifyEvent::COMMAND )
381 {
382 const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
383 if ( pCEvt->GetCommand() != CommandEventId::ContextMenu )
384 // non context menu events are not to be notified up the chain
385 // so we return immediately
386 return;
387
388 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
389 {
390 // not interested: The event listeners are already called in ::Command,
391 // and calling them here a second time doesn't make sense
392 if ( rNEvt.GetWindow() != this )
393 {
394 CommandEvent aCommandEvent;
395
396 if ( !pCEvt->IsMouseEvent() )
397 {
398 aCommandEvent = *pCEvt;
399 }
400 else
401 {
402 // the mouse event occurred in a different window, we need to translate the coordinates of
403 // the mouse cursor within that window to the coordinates the mouse cursor would be in the
404 // current window
405 vcl::Window* pSource = rNEvt.GetWindow();
406 Point aPos = pSource->OutputToScreenPixel( pCEvt->GetMousePosPixel() );
407 aCommandEvent = CommandEvent( ScreenToOutputPixel( aPos ), pCEvt->GetCommand(), pCEvt->IsMouseEvent(), pCEvt->GetEventData() );
408 }
409
411 }
412 }
413 }
414
415 // #82968# notify event listeners for mouse and key events separately and
416 // not in PreNotify ( as for focus listeners )
417 // this allows for processing those events internally first and pass it to
418 // the toolkit later
419
420 VclPtr<vcl::Window> xWindow = this;
421
422 if( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE )
423 {
424 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
425 {
426 if ( rNEvt.GetWindow() == this )
428 else
429 {
430 MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
432 }
433 }
434 }
435 else if( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONUP )
436 {
437 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
438 {
439 if ( rNEvt.GetWindow() == this )
441 else
442 {
443 MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
445 }
446 }
447 }
448 else if( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN )
449 {
450 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
451 {
452 if ( rNEvt.GetWindow() == this )
454 else
455 {
456 MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
458 }
459 }
460 }
461 else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
462 {
463 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
465 }
466 else if( rNEvt.GetType() == MouseNotifyEvent::KEYUP )
467 {
468 if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
470 }
471
472 if ( xWindow->isDisposed() )
473 return;
474
475 // #106721# check if we're part of a compound control and notify
476 vcl::Window *pParent = ImplGetParent();
477 while( pParent )
478 {
479 if( pParent->IsCompoundControl() )
480 {
482 break;
483 }
484 pParent = pParent->ImplGetParent();
485 }
486}
487
489{
490 mpWindowImpl->mbReallyShown = true;
491 mpWindowImpl->mbInInitShow = true;
493 mpWindowImpl->mbInInitShow = false;
494
495 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
496 while ( pWindow )
497 {
498 if ( pWindow->mpWindowImpl->mbVisible )
499 pWindow->ImplCallInitShow();
500 pWindow = pWindow->mpWindowImpl->mpNext;
501 }
502
503 pWindow = mpWindowImpl->mpFirstChild;
504 while ( pWindow )
505 {
506 if ( pWindow->mpWindowImpl->mbVisible )
507 pWindow->ImplCallInitShow();
508 pWindow = pWindow->mpWindowImpl->mpNext;
509 }
510}
511
512
514{
515 mpWindowImpl->mbCallResize = false;
516
517 // Normally we avoid blanking on re-size unless people might notice:
518 if( GetBackground().IsGradient() )
519 Invalidate();
520
521 Resize();
522
523 // #88419# Most classes don't call the base class in Resize() and Move(),
524 // => Call ImpleResize/Move instead of Resize/Move directly...
526}
527
529{
530 mpWindowImpl->mbCallMove = false;
531
532 if( mpWindowImpl->mbFrame )
533 {
534 // update frame position
535 SalFrame *pParentFrame = nullptr;
536 vcl::Window *pParent = ImplGetParent();
537 while( pParent )
538 {
539 if( pParent->mpWindowImpl &&
540 pParent->mpWindowImpl->mpFrame != mpWindowImpl->mpFrame )
541 {
542 pParentFrame = pParent->mpWindowImpl->mpFrame;
543 break;
544 }
545 pParent = pParent->GetParent();
546 }
547
548 SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry();
549 mpWindowImpl->maPos = Point(g.x(), g.y());
550 if( pParentFrame )
551 {
552 g = pParentFrame->GetGeometry();
553 mpWindowImpl->maPos -= Point(g.x(), g.y());
554 }
555 // the client window and all its subclients have the same position as the borderframe
556 // this is important for floating toolbars where the borderwindow is a floating window
557 // which has another borderwindow (ie the system floating window)
558 vcl::Window *pClientWin = mpWindowImpl->mpClientWindow;
559 while( pClientWin )
560 {
561 pClientWin->mpWindowImpl->maPos = mpWindowImpl->maPos;
562 pClientWin = pClientWin->mpWindowImpl->mpClientWindow;
563 }
564 }
565
566 Move();
567
569}
570
572 vcl::Window* pOldOverlapWindow )
573{
574 ImplSVData* pSVData = ImplGetSVData();
575 vcl::Window* pNewRealWindow;
576 vcl::Window* pOldRealWindow;
577 bool bCallActivate = true;
578 bool bCallDeactivate = true;
579
580 if (!pOldOverlapWindow)
581 {
582 return;
583 }
584
585 pOldRealWindow = pOldOverlapWindow->ImplGetWindow();
586 if (!pNewOverlapWindow)
587 {
588 return;
589 }
590
591 pNewRealWindow = pNewOverlapWindow->ImplGetWindow();
592 if ( (pOldRealWindow->GetType() != WindowType::FLOATINGWINDOW) ||
593 pOldRealWindow->GetActivateMode() != ActivateModeFlags::NONE )
594 {
595 if ( (pNewRealWindow->GetType() == WindowType::FLOATINGWINDOW) &&
596 pNewRealWindow->GetActivateMode() == ActivateModeFlags::NONE)
597 {
598 pSVData->mpWinData->mpLastDeacWin = pOldOverlapWindow;
599 bCallDeactivate = false;
600 }
601 }
602 else if ( (pNewRealWindow->GetType() != WindowType::FLOATINGWINDOW) ||
603 pNewRealWindow->GetActivateMode() != ActivateModeFlags::NONE )
604 {
605 if (pSVData->mpWinData->mpLastDeacWin)
606 {
607 if (pSVData->mpWinData->mpLastDeacWin.get() == pNewOverlapWindow)
608 bCallActivate = false;
609 else
610 {
611 vcl::Window* pLastRealWindow = pSVData->mpWinData->mpLastDeacWin->ImplGetWindow();
612 pSVData->mpWinData->mpLastDeacWin->mpWindowImpl->mbActive = false;
614 if (pLastRealWindow != pSVData->mpWinData->mpLastDeacWin.get())
615 {
616 pLastRealWindow->mpWindowImpl->mbActive = true;
617 pLastRealWindow->Activate();
618 }
619 }
620 pSVData->mpWinData->mpLastDeacWin = nullptr;
621 }
622 }
623
624 if ( bCallDeactivate )
625 {
626 if( pOldOverlapWindow->mpWindowImpl->mbActive )
627 {
628 pOldOverlapWindow->mpWindowImpl->mbActive = false;
629 pOldOverlapWindow->Deactivate();
630 }
631 if ( pOldRealWindow != pOldOverlapWindow )
632 {
633 if( pOldRealWindow->mpWindowImpl->mbActive )
634 {
635 pOldRealWindow->mpWindowImpl->mbActive = false;
636 pOldRealWindow->Deactivate();
637 }
638 }
639 }
640 if ( !bCallActivate || pNewOverlapWindow->mpWindowImpl->mbActive )
641 return;
642
643 pNewOverlapWindow->mpWindowImpl->mbActive = true;
644 pNewOverlapWindow->Activate();
645
646 if ( pNewRealWindow != pNewOverlapWindow )
647 {
648 if( ! pNewRealWindow->mpWindowImpl->mbActive )
649 {
650 pNewRealWindow->mpWindowImpl->mbActive = true;
651 pNewRealWindow->Activate();
652 }
653 }
654}
655
656} /* namespace vcl */
657
658
660 const void* pEvent )
661{
662 mpWindow = pWindow;
663 mpData = const_cast<void*>(pEvent);
664 mnEventType = nEventType;
665}
666
667NotifyEvent::~NotifyEvent() = default;
668
669/* 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:814
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:1042
void SetFloatingMode(bool bFloatMode)
Definition: dockmgr.cxx:887
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
const MouseEvent * GetMouseEvent() const
Definition: event.hxx:324
void * mpData
Definition: event.hxx:292
MouseNotifyEvent mnEventType
Definition: event.hxx:293
NotifyEvent(MouseNotifyEvent nEventType, vcl::Window *pWindow, const void *pEvent=nullptr)
Definition: event.cxx:659
VclPtr< vcl::Window > mpWindow
Definition: event.hxx:291
MouseNotifyEvent 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:2808
const Wallpaper & GetBackground() const
Definition: window3.cxx:63
vcl::Window * GetParent() const
Definition: window2.cxx:1120
ActivateModeFlags GetActivateMode() const
Definition: window2.cxx:1160
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:308
bool HasChildPathFocus(bool bSystemWindow=false) const
Definition: window.cxx:3009
WindowType GetType() const
Definition: window2.cxx:997
SAL_DLLPRIVATE bool ImplDlgCtrl(const KeyEvent &rKEvt, bool bKeyInput)
Definition: dlgctrl.cxx:621
virtual void Resize()
Definition: window.cxx:1837
SAL_DLLPRIVATE bool ImplIsOverlapWindow() const
Definition: window2.cxx:949
bool IsCompoundControl() const
Definition: window2.cxx:1216
ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
Definition: event.cxx:335
static SAL_DLLPRIVATE void ImplCallFocusChangeActivate(vcl::Window *pNewOverlapWindow, vcl::Window *pOldOverlapWindow)
Definition: event.cxx:571
WinBits GetStyle() const
Definition: window2.cxx:976
SAL_DLLPRIVATE void ImplNotifyKeyMouseCommandEventListeners(NotifyEvent &rNEvt)
Definition: event.cxx:378
virtual void Move()
Definition: window.cxx:1835
virtual bool PreNotify(NotifyEvent &rNEvt)
Definition: event.cxx:52
SAL_DLLPRIVATE vcl::Window * ImplGetParent() const
Definition: window2.cxx:883
void ToTop(ToTopFlags nFlags=ToTopFlags::NONE)
Definition: stacking.cxx:418
SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged(vcl::Window *pWindow, bool bGetFocus)
Definition: dlgctrl.cxx:1091
void RemoveUserEvent(ImplSVEvent *nUserEvent)
Definition: event.cxx:353
SAL_DLLPRIVATE void CompatDataChanged(const DataChangedEvent &rDCEvt)
Definition: window.cxx:3905
virtual css::uno::Reference< css::awt::XWindowPeer > GetComponentInterface(bool bCreate=true)
Definition: window.cxx:3150
SAL_DLLPRIVATE void ImplCallMove()
Definition: event.cxx:528
void AddEventListener(const Link< VclWindowEvent &, void > &rEventListener)
Definition: event.cxx:303
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:483
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
Definition: event.cxx:319
virtual void Deactivate()
Definition: window.cxx:1841
virtual void DataChanged(const DataChangedEvent &rDCEvt)
Definition: event.cxx:36
virtual void Activate()
Definition: window.cxx:1839
SAL_DLLPRIVATE void ImplCallResize()
Definition: event.cxx:513
SAL_DLLPRIVATE void ImplCallInitShow()
Definition: event.cxx:488
virtual 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:853
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2814
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:324
SAL_DLLPRIVATE void ImplControlFocus(GetFocusFlags nFlags=GetFocusFlags::NONE)
Definition: dlgctrl.cxx:516
SAL_DLLPRIVATE void CompatStateChanged(StateChangedType nStateChange)
Definition: window.cxx:3897
MouseNotifyEvent
Definition: event.hxx:276
constexpr sal_uInt16 KEY_F10
Definition: keycodes.hxx:92
vcl::Window * getNonLayoutParent(vcl::Window *pWindow)
Definition: layout.cxx:2880
#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:369
ImplSVWinData * mpWinData
Definition: svdata.hxx:401
bool mbCall
Definition: svdata.hxx:464
VclPtr< vcl::Window > mpWindow
Definition: svdata.hxx:463
VclPtr< vcl::Window > mpLastDeacWin
Definition: svdata.hxx:257
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:76
DockingManager * ImplGetDockingManager()
Definition: svdata.cxx:315
VclEventId
Definition: vclevent.hxx:38
@ WindowMouseButtonDown
@ WindowMouseButtonUp
WinBits const WB_DIALOGCONTROL
WinBits const WB_DOCKABLE
WinBits const WB_NODIALOGCONTROL
WinBits const WB_TABSTOP