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)
124 if (!bDockingSupportCrippled && pMEvt->
IsMod1() && (pMEvt->
GetClicks() == 2))
130 else if ( pMEvt->
GetClicks() == 1 && bHit)
151 if ( pWindow !=
this )
190 bool bTopLevelFloatingWindow = (pWrapper && pWrapper->
IsFloatingMode());
237 std::vector<Link<VclWindowEvent&,void>> aCopy(
mpWindowImpl->maEventListeners );
242 [&rWindowImpl, &xWindow]()
246 rWindowImpl.mnEventListenersIteratingCount--;
247 if (rWindowImpl.mnEventListenersIteratingCount == 0)
248 rWindowImpl.maEventListenersDeleted.clear();
256 if( rWindowImpl.maEventListenersDeleted.find(rLink) == rWindowImpl.maEventListenersDeleted.end() )
257 rLink.Call( aEvent );
268 if (!rWindowImpl.maChildEventListeners.empty())
271 std::vector<Link<VclWindowEvent&,void>> aCopy( rWindowImpl.maChildEventListeners );
273 rWindowImpl.mnChildEventListenersIteratingCount++;
275 [&rWindowImpl, &xWindow]()
279 rWindowImpl.mnChildEventListenersIteratingCount--;
280 if (rWindowImpl.mnChildEventListenersIteratingCount == 0)
281 rWindowImpl.maChildEventListenersDeleted.clear();
290 if( rWindowImpl.maChildEventListenersDeleted.find(rLink) == rWindowImpl.maChildEventListenersDeleted.end() )
291 rLink.Call( aEvent );
304 mpWindowImpl->maEventListeners.push_back( rEventListener );
312 rListeners.erase( std::remove(rListeners.begin(), rListeners.end(), rEventListener ), rListeners.end() );
314 mpWindowImpl->maEventListenersDeleted.insert(rEventListener);
320 mpWindowImpl->maChildEventListeners.push_back( rEventListener );
328 rListeners.erase( std::remove(rListeners.begin(), rListeners.end(), rEventListener ), rListeners.end() );
330 mpWindowImpl->maChildEventListenersDeleted.insert(rEventListener);
336 std::unique_ptr<ImplSVEvent> pSVEvent(
new ImplSVEvent);
337 pSVEvent->mpData = pCaller;
338 pSVEvent->maLink = rLink;
339 pSVEvent->mpWindow =
this;
340 pSVEvent->mbCall =
true;
344 assert(dynamic_cast<vcl::Window *>(
345 static_cast<OutputDevice *>(rLink.GetInstance())) ==
347 pSVEvent->mpInstanceRef =
static_cast<vcl::Window *
>(rLink.GetInstance());
350 auto pTmpEvent = pSVEvent.get();
351 if (!
mpWindowImpl->mpFrame->PostEvent( std::move(pSVEvent) ))
359 "Window::RemoveUserEvent(): Event doesn't send to this window or is already removed" );
361 "Window::RemoveUserEvent(): Event is already removed" );
368 nUserEvent->
mbCall =
false;
401 aCommandEvent = *pCEvt;
579 bool bCallActivate =
true;
580 bool bCallDeactivate =
true;
582 if (!pOldOverlapWindow)
588 if (!pNewOverlapWindow)
594 if ( (pOldRealWindow->
GetType() != WindowType::FLOATINGWINDOW) ||
597 if ( (pNewRealWindow->
GetType() == WindowType::FLOATINGWINDOW) &&
601 bCallDeactivate =
false;
604 else if ( (pNewRealWindow->
GetType() != WindowType::FLOATINGWINDOW) ||
610 bCallActivate =
false;
626 if ( bCallDeactivate )
633 if ( pOldRealWindow != pOldOverlapWindow )
642 if ( !bCallActivate || pNewOverlapWindow->
mpWindowImpl->mbActive )
648 if ( pNewRealWindow != pNewOverlapWindow )
665 mpData =
const_cast<void*
>(pEvent);
void ImplEnableStartDocking()
vcl::Window * ImplGetWindow() const
if this is a proxy return the client, otherwise itself
const Wallpaper & GetBackground() const
ActivateModeFlags GetActivateMode() const
SAL_DLLPRIVATE void ImplCallResize()
SalFrameGeometry GetGeometry() const
const CommandEvent * GetCommandEvent() const
void NotifyAllChildren(DataChangedEvent &rDCEvt)
WinBits const WB_NODIALOGCONTROL
MouseEventModifiers GetMode() const
SAL_DLLPRIVATE void ImplCallMove()
SAL_DLLPRIVATE void ImplCallInitShow()
void ImplStartDocking(const Point &rPos)
void CompatStateChanged(StateChangedType nStateChange)
sal_uInt16 GetCode() const
virtual void Deactivate()
void RemoveChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
const KeyEvent * GetKeyEvent() const
bool HasChildPathFocus(bool bSystemWindow=false) const
bool IsFloatingMode() const
MouseNotifyEvent mnEventType
SAL_DLLPRIVATE bool ImplIsOverlapWindow() const
sal_uInt16 GetClicks() const
vcl::Window * GetWindow() const
virtual css::uno::Reference< css::awt::XWindowPeer > GetComponentInterface(bool bCreate=true)
sal_uInt16 GetButtons() const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
bool IsMouseEvent() const
sal_uInt16 GetModifier() const
void * GetEventData() const
SAL_DLLPRIVATE void ImplControlFocus(GetFocusFlags nFlags=GetFocusFlags::NONE)
SAL_DLLPRIVATE vcl::Window * ImplGetDlgWindow(sal_uInt16 n, GetDlgWindowType nType, sal_uInt16 nStart=0, sal_uInt16 nEnd=0xFFFF, sal_uInt16 *pIndex=nullptr)
static void ImplCallEventListeners(VclSimpleEvent &rEvent)
Send event to all VCL application event listeners.
WinBits const WB_DIALOGCONTROL
ImplSVData * ImplGetSVData()
SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged(vcl::Window *pWindow, bool bGetFocus)
SAL_DLLPRIVATE bool ImplDlgCtrl(const KeyEvent &rKEvt, bool bKeyInput)
virtual bool PreNotify(NotifyEvent &rNEvt)
virtual bool EventNotify(NotifyEvent &rNEvt)
void ToTop(ToTopFlags nFlags=ToTopFlags::NONE)
ImplDockingWindowWrapper.
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
SAL_DLLPRIVATE void ImplNotifyKeyMouseCommandEventListeners(NotifyEvent &rNEvt)
CommandEventId GetCommand() const
std::unique_ptr< WindowImpl > mpWindowImpl
SAL_DLLPRIVATE vcl::Window * ImplGetParent() const
MouseNotifyEvent GetType() const
VclPtr< vcl::Window > mpLastDeacWin
sal_uInt16 GetModifier() const
static SAL_DLLPRIVATE void ImplCallFocusChangeActivate(vcl::Window *pNewOverlapWindow, vcl::Window *pOldOverlapWindow)
Point ScreenToOutputPixel(const Point &rPos) const
constexpr sal_uInt16 KEY_F10
vcl::Window * GetParent() const
bool IsCompoundControl() const
void SetFloatingMode(bool bFloatMode)
const Point & GetMousePosPixel() const
void AddEventListener(const Link< VclWindowEvent &, void > &rEventListener)
void RemoveUserEvent(ImplSVEvent *nUserEvent)
A SalFrame is a system window (e.g. an X11 window).
const vcl::KeyCode & GetKeyCode() const
VclPtr< vcl::Window > mpWindow
DockingManager * ImplGetDockingManager()
static bool GetDockingFloatsSupported()
#define SAL_WARN_IF(condition, area, stream)
const MouseEvent * GetMouseEvent() const
bool ImplStartDockingEnabled() const
ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
ImplDockingWindowWrapper * GetDockingWindowWrapper(const vcl::Window *pWin)
const Point & GetPosPixel() const
VclPtr< vcl::Window > mpWindow
NotifyEvent(MouseNotifyEvent nEventType, vcl::Window *pWindow, const void *pEvent=nullptr)
static MouseEvent ImplTranslateMouseEvent(const MouseEvent &rE, vcl::Window const *pSource, vcl::Window const *pDest)
vcl::Window * getNonLayoutParent(vcl::Window *pWindow)
WindowType GetType() const
const tools::Rectangle & GetDragArea() const
reference_type * get() const
Get the body.
void RemoveEventListener(const Link< VclWindowEvent &, void > &rEventListener)
void CompatDataChanged(const DataChangedEvent &rDCEvt)
Point OutputToScreenPixel(const Point &rPos) const
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
virtual void DataChanged(const DataChangedEvent &rDCEvt)
ImplSVWinData * mpWinData