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