29#include <config_features.h>
56 bDone =
mpWindowImpl->mpParent->CompatPreNotify( rNEvt );
62 bool bCompoundFocusChanged =
false;
66 bCompoundFocusChanged =
true;
69 if ( bCompoundFocusChanged || ( rNEvt.
GetWindow() ==
this ) )
74 bool bCompoundFocusChanged =
false;
78 bCompoundFocusChanged =
true;
81 if ( bCompoundFocusChanged || ( rNEvt.
GetWindow() ==
this ) )
95 bool parentNotDialogControl(
Window* pWindow)
125 if (!bDockingSupportCrippled && pMEvt->
IsMod1() && (pMEvt->
GetClicks() == 2))
131 else if ( pMEvt->
GetClicks() == 1 && bHit)
152 if ( pWindow !=
this )
191 bool bTopLevelFloatingWindow = (pWrapper && pWrapper->
IsFloatingMode());
231 if ( !bIgnoreDisposed && xWindow->
isDisposed() )
242 std::vector<Link<VclWindowEvent&,void>> aCopy(
mpWindowImpl->maEventListeners );
247 [&rWindowImpl, &xWindow, &bIgnoreDisposed]()
249 if (bIgnoreDisposed || !xWindow->
isDisposed())
251 rWindowImpl.mnEventListenersIteratingCount--;
252 if (rWindowImpl.mnEventListenersIteratingCount == 0)
253 rWindowImpl.maEventListenersDeleted.clear();
259 if (!bIgnoreDisposed && xWindow->
isDisposed())
break;
261 if( rWindowImpl.maEventListenersDeleted.find(rLink) == rWindowImpl.maEventListenersDeleted.end() )
269 if ( !bIgnoreDisposed && xWindow->
isDisposed() )
273 if (!rWindowImpl.maChildEventListeners.empty())
276 std::vector<Link<VclWindowEvent&,void>> aCopy( rWindowImpl.maChildEventListeners );
278 rWindowImpl.mnChildEventListenersIteratingCount++;
280 [&rWindowImpl, &xWindow, &bIgnoreDisposed]()
282 if (bIgnoreDisposed || !xWindow->
isDisposed())
284 rWindowImpl.mnChildEventListenersIteratingCount--;
285 if (rWindowImpl.mnChildEventListenersIteratingCount == 0)
286 rWindowImpl.maChildEventListenersDeleted.clear();
292 if (!bIgnoreDisposed && xWindow->
isDisposed())
295 if( rWindowImpl.maChildEventListenersDeleted.find(rLink) == rWindowImpl.maChildEventListenersDeleted.end() )
300 if ( !bIgnoreDisposed && xWindow->
isDisposed() )
309 mpWindowImpl->maEventListeners.push_back( rEventListener );
317 rListeners.erase( std::remove(rListeners.begin(), rListeners.end(), rEventListener ), rListeners.end() );
319 mpWindowImpl->maEventListenersDeleted.insert(rEventListener);
325 mpWindowImpl->maChildEventListeners.push_back( rEventListener );
333 rListeners.erase( std::remove(rListeners.begin(), rListeners.end(), rEventListener ), rListeners.end() );
335 mpWindowImpl->maChildEventListenersDeleted.insert(rEventListener);
341 std::unique_ptr<ImplSVEvent> pSVEvent(
new ImplSVEvent);
342 pSVEvent->mpData = pCaller;
343 pSVEvent->maLink = rLink;
344 pSVEvent->mpWindow =
this;
345 pSVEvent->mbCall =
true;
351 auto pTmpEvent = pSVEvent.get();
352 if (!
mpWindowImpl->mpFrame->PostEvent( std::move(pSVEvent) ))
360 "Window::RemoveUserEvent(): Event doesn't send to this window or is already removed" );
362 "Window::RemoveUserEvent(): Event is already removed" );
369 nUserEvent->
mbCall =
false;
402 aCommandEvent = *pCEvt;
581 bool bCallActivate =
true;
582 bool bCallDeactivate =
true;
584 if (!pOldOverlapWindow)
590 if (!pNewOverlapWindow)
603 bCallDeactivate =
false;
612 bCallActivate =
false;
628 if ( bCallDeactivate )
635 if ( pOldRealWindow != pOldOverlapWindow )
644 if ( !bCallActivate || pNewOverlapWindow->
mpWindowImpl->mbActive )
650 if ( pNewRealWindow != pNewOverlapWindow )
667 mpData =
const_cast<void*
>(pEvent);
static void ImplCallEventListeners(VclSimpleEvent &rEvent)
Send event to all VCL application event listeners.
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
void * GetEventData() const
bool IsMouseEvent() const
ImplDockingWindowWrapper * GetDockingWindowWrapper(const vcl::Window *pWin)
ImplDockingWindowWrapper.
const tools::Rectangle & GetDragArea() const
bool IsFloatingMode() const
void ImplEnableStartDocking()
void SetFloatingMode(bool bFloatMode)
bool ImplStartDockingEnabled() const
void ImplStartDocking(const Point &rPos)
const vcl::KeyCode & GetKeyCode() const
void * GetInstance() const
MouseEventModifiers GetMode() const
sal_uInt16 GetModifier() const
sal_uInt16 GetClicks() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
const KeyEvent * GetKeyEvent() const
vcl::Window * GetWindow() const
const CommandEvent * GetCommandEvent() const
NotifyEvent(NotifyEventType nEventType, vcl::Window *pWindow, const void *pEvent=nullptr)
const MouseEvent * GetMouseEvent() const
NotifyEventType mnEventType
VclPtr< vcl::Window > mpWindow
NotifyEventType GetType() const
A SalFrame is a system window (e.g. an X11 window).
SalFrameGeometry GetGeometry() const
static bool GetDockingFloatsSupported()
reference_type * get() const
Get the body.
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
constexpr sal_Int32 y() const
constexpr sal_Int32 x() const
Point OutputToScreenPixel(const Point &rPos) const
const Wallpaper & GetBackground() const
vcl::Window * GetParent() const
ActivateModeFlags GetActivateMode() const
SAL_DLLPRIVATE vcl::Window * ImplGetDlgWindow(sal_uInt16 n, GetDlgWindowType nType, sal_uInt16 nStart=0, sal_uInt16 nEnd=0xFFFF, sal_uInt16 *pIndex=nullptr)
void RemoveEventListener(const Link< VclWindowEvent &, void > &rEventListener)
bool HasChildPathFocus(bool bSystemWindow=false) const
WindowType GetType() const
SAL_DLLPRIVATE bool ImplDlgCtrl(const KeyEvent &rKEvt, bool bKeyInput)
SAL_DLLPRIVATE bool ImplIsOverlapWindow() const
bool IsCompoundControl() const
ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static SAL_DLLPRIVATE void ImplCallFocusChangeActivate(vcl::Window *pNewOverlapWindow, vcl::Window *pOldOverlapWindow)
SAL_DLLPRIVATE void ImplNotifyKeyMouseCommandEventListeners(NotifyEvent &rNEvt)
virtual bool PreNotify(NotifyEvent &rNEvt)
SAL_DLLPRIVATE vcl::Window * ImplGetParent() const
void ToTop(ToTopFlags nFlags=ToTopFlags::NONE)
SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged(vcl::Window *pWindow, bool bGetFocus)
void RemoveUserEvent(ImplSVEvent *nUserEvent)
SAL_DLLPRIVATE void CompatDataChanged(const DataChangedEvent &rDCEvt)
SAL_DLLPRIVATE void ImplCallMove()
void AddEventListener(const Link< VclWindowEvent &, void > &rEventListener)
virtual css::uno::Reference< css::awt::XVclWindowPeer > GetComponentInterface(bool bCreate=true)
std::unique_ptr< WindowImpl > mpWindowImpl
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
virtual void Deactivate()
virtual void DataChanged(const DataChangedEvent &rDCEvt)
SAL_DLLPRIVATE void ImplCallResize()
SAL_DLLPRIVATE void ImplCallInitShow()
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
vcl::Window * ImplGetWindow() const
if this is a proxy return the client, otherwise itself
Point ScreenToOutputPixel(const Point &rPos) const
virtual bool EventNotify(NotifyEvent &rNEvt)
void NotifyAllChildren(DataChangedEvent &rDCEvt)
void RemoveChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
SAL_DLLPRIVATE void ImplControlFocus(GetFocusFlags nFlags=GetFocusFlags::NONE)
SAL_DLLPRIVATE void CompatStateChanged(StateChangedType nStateChange)
constexpr sal_uInt16 KEY_F10
vcl::Window * getNonLayoutParent(vcl::Window *pWindow)
#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)
ImplSVWinData * mpWinData
VclPtr< vcl::Window > mpWindow
VclPtr< vcl::Window > mpLastDeacWin
ImplSVData * ImplGetSVData()
DockingManager * ImplGetDockingManager()
WinBits const WB_DIALOGCONTROL
WinBits const WB_DOCKABLE
WinBits const WB_NODIALOGCONTROL