31#include <com/sun/star/awt/XTopWindow.hpp>
32#include <com/sun/star/awt/XVclWindowPeer.hpp>
40using ::com::sun::star::awt::XTopWindow;
44 std::unique_ptr<ImplCalcToTopData>
mpNext;
92 pFirstOverlapParent->
mpWindowImpl->mpFirstOverlap =
this;
120 if (
mpWindowImpl->mpFrameData->mpFirstOverlap.get() ==
this )
125 while ( pTempWin->
mpWindowImpl->mpNextOverlap.get() !=
this )
155 if ( bRemoveFrameData )
165 sal_uInt16 nChildCount = 0;
169 if (nChildCount == nNewPosition)
187 mpWindowImpl->mpParent->mpWindowImpl->mpLastChild =
this;
192 mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild =
this;
207 mpWindowImpl->mpParent->mpWindowImpl->mpLastChild =
this;
227 if ( !aInvalidateRegion.
IsEmpty() )
231 pData->mpWindow =
this;
265 if (
mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap.get() !=
this )
297 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap =
this;
302 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap =
this;
307 mpWindowImpl->mpOverlapWindow->ImplSetClipFlagOverlapWindows();
319 pOverlapWindow =
this;
325 aStartData.
mpNext =
nullptr;
326 pCurData = &aStartData;
331 pCurData = pCurData->
mpNext.get();
332 pTempOverlapWindow = pTempOverlapWindow->
mpWindowImpl->mpOverlapWindow;
337 while ( pTempOverlapWindow )
341 pCurData = pCurData->
mpNext.get();
342 pTempOverlapWindow = pTempOverlapWindow->
mpWindowImpl->mpNext;
346 pTempOverlapWindow = pOverlapWindow;
350 pTempOverlapWindow = pTempOverlapWindow->
mpWindowImpl->mpOverlapWindow;
354 pCurData = aStartData.
mpNext.get();
358 pCurData = pCurData->
mpNext.get();
385 if ( bReallyVisible )
392 while ( pOverlapWindow )
407 while ( pOverlapWindow )
412 pOverlapWindow->
Show(
false );
433 mpWindowImpl->mpBorderWindow->SetZOrder( pRefWindow, nFlags );
440 pRefWindow =
mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
442 pRefWindow =
mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild;
448 pRefWindow =
mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap;
450 pRefWindow =
mpWindowImpl->mpParent->mpWindowImpl->mpLastChild;
454 while ( pRefWindow && pRefWindow->
mpWindowImpl->mpBorderWindow )
456 if (!pRefWindow || pRefWindow ==
this ||
mpWindowImpl->mbFrame)
476 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap =
this;
489 mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild =
this;
514 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap =
this;
527 mpWindowImpl->mpParent->mpWindowImpl->mpLastChild =
this;
543 bool bInitWinClipRegion =
mpWindowImpl->mbInitWinClipRegion;
553 if ( bInitWinClipRegion )
563 pWindow =
mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
570 if ( pWindow ==
this )
573 if ( aWinRect.
Overlaps( aCompRect ) )
582 if ( pWindow !=
this )
585 if ( aWinRect.
Overlaps( aCompRect ) )
601 mpWindowImpl->mpBorderWindow->EnableAlwaysOnTop( bEnable );
619 if(
mpWindowImpl->mpWinData->mnIsTopWindow == sal_uInt16(~0))
624 pThisWin->
mpWindowImpl->mpWinData->mnIsTopWindow = xTopWindow.is() ? 1 : 0;
636 while ( pTempWindow )
653 while ( pTempWindow )
675 if ( pWindow ==
this )
692 if ( pWindow ==
this )
702 if (
this == pWindow )
709 bool bBecameReallyInvisible =
mpWindowImpl->mbReallyVisible;
795 while ( pOverlapWindow )
799 pOverlapWindow = pNextOverlapWindow;
834 SAL_WARN_IF( !pNewParent,
"vcl",
"Window::SetParent(): pParent == NULL" );
835 SAL_WARN_IF( pNewParent ==
this,
"vcl",
"someone tried to reparent a window to itself" );
837 if( !pNewParent || pNewParent ==
this )
843 bool bChangeTaskPaneList =
false;
847 if( pNewSysWin && pNewSysWin != pSysWin )
849 bChangeTaskPaneList =
true;
858 if(
p != rList.end() )
884 pOldOverlapWindow =
nullptr;
888 if (
mpWindowImpl->mpOverlapWindow.get() != pNewOverlapWindow )
891 pOldOverlapWindow =
nullptr;
932 while ( pOverlapWindow )
936 pOverlapWindow = pNextOverlapWindow;
940 else if ( pOldOverlapWindow )
946 pOldOverlapWindow->
mpWindowImpl->mpLastFocusWindow =
nullptr;
949 while ( pOverlapWindow )
954 pOverlapWindow = pNextOverlapWindow;
972 if ( bFocusOverlapWin )
987 if( bChangeTaskPaneList )
1007 sal_uInt16 nChildCount = 0;
1023 sal_uInt16 nChildCount = 0;
1027 if ( nChild == nChildCount )
1071 return mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpOverlapWindow;
1074 return this->ImplGetWindow();
1094 const ::std::list< VclPtr<vcl::Window> >& rTopWindows(
mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren );
1095 ::std::list< VclPtr<vcl::Window> >::const_iterator myPos =
1096 ::std::find( rTopWindows.begin(), rTopWindows.end(),
this );
1097 if ( ( myPos == rTopWindows.end() ) || ( ++myPos == rTopWindows.end() ) )
1116 if ( pWindow ==
this )
1127 if (
this == pWindow )
1135 while( pFrameWindow )
1144 pFrameWindow->
mpWindowImpl->mpFrame->SetParent( pParentFrame );
1146 pFrameWindow = pFrameWindow->
mpWindowImpl->mpFrameData->mpNextFrame;
static vcl::Window * GetFocusWindow()
Get the currently focused window.
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
virtual void ReleaseGraphics(bool bRelease=true)=0
Release the graphics device, and remove it from the graphics device list.
A SalFrame is a system window (e.g. an X11 window).
SAL_DLLPRIVATE bool ImplIsInTaskPaneList(vcl::Window *pWin)
TaskPaneList * GetTaskPaneList()
void AddWindow(vcl::Window *pWindow)
void RemoveWindow(vcl::Window *pWindow)
SAL_DLLPRIVATE bool ImplIsWindowOrChild(const vcl::Window *pWindow, bool bSystemWindow=false) const
bool IsReallyVisible() const
void SetZOrder(vcl::Window *pRefWindow, ZOrderFlags nFlags)
vcl::Window * GetParent() const
void EnableAlwaysOnTop(bool bEnable=true)
SAL_DLLPRIVATE void ImplStartToTop(ToTopFlags nFlags)
SAL_DLLPRIVATE vcl::Window * ImplFindWindow(const Point &rFramePos)
bool HasChildPathFocus(bool bSystemWindow=false) const
SAL_DLLPRIVATE bool ImplIsAccessibleCandidate() const
bool IsChild(const vcl::Window *pWindow) const
sal_uInt16 GetChildCount() const
WindowType GetType() const
SAL_DLLPRIVATE ::std::vector< VclPtr< vcl::Window > > & ImplGetOwnerDrawList()
SAL_DLLPRIVATE void ImplGenerateMouseMove()
SAL_DLLPRIVATE bool ImplIsOverlapWindow() const
SAL_DLLPRIVATE void ImplCalcToTop(ImplCalcToTopData *pPrevData)
vcl::Window * GetWindow(GetWindowType nType) const
SAL_DLLPRIVATE void ImplUpdateWindowPtr()
SAL_DLLPRIVATE bool ImplIsChild(const vcl::Window *pWindow, bool bSystemWindow=false) const
SAL_DLLPRIVATE void ImplHideAllOverlaps()
void reorderWithinParent(sal_uInt16 nNewPosition)
SAL_DLLPRIVATE void ImplCalcOverlapRegionOverlaps(const vcl::Region &rInterRegion, vcl::Region &rRegion) const
void SetParent(vcl::Window *pNewParent)
SAL_DLLPRIVATE void ImplInsertWindow(vcl::Window *pParent)
SAL_DLLPRIVATE bool ImplUpdatePos()
SAL_DLLPRIVATE void ImplUpdateSysObjPos()
static SAL_DLLPRIVATE void ImplCallFocusChangeActivate(vcl::Window *pNewOverlapWindow, vcl::Window *pOldOverlapWindow)
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
SAL_DLLPRIVATE bool ImplSetClipFlag(bool bSysObjOnlySmaller=false)
SAL_DLLPRIVATE void ImplUpdateWindowPtr(vcl::Window *pWindow)
SAL_DLLPRIVATE vcl::Window * ImplGetParent() const
SAL_DLLPRIVATE void ImplResetReallyVisible()
void ToTop(ToTopFlags nFlags=ToTopFlags::NONE)
SAL_DLLPRIVATE vcl::Window * ImplGetFirstOverlapWindow()
::OutputDevice const * GetOutDev() const
SAL_DLLPRIVATE void ImplRemoveWindow(bool bRemoveFrameData)
SAL_DLLPRIVATE void ImplToTop(ToTopFlags nFlags)
SAL_DLLPRIVATE vcl::Window * ImplGetTopmostFrameWindow()
SystemWindow * GetSystemWindow() const
bool IsAlwaysOnTopEnabled() const
SAL_DLLPRIVATE ImplWinData * ImplGetWinData() const
virtual css::uno::Reference< css::awt::XVclWindowPeer > GetComponentInterface(bool bCreate=true)
std::unique_ptr< WindowImpl > mpWindowImpl
bool IsSystemWindow() const
SAL_DLLPRIVATE void ImplFocusToTop(ToTopFlags nFlags, bool bReallyVisible)
virtual WindowHitTest ImplHitTest(const Point &rFramePos)
bool IsWindowOrChild(const vcl::Window *pWindow, bool bSystemWindow=false) const
SAL_DLLPRIVATE void ImplToBottomChild()
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
tools::Rectangle GetOutputRectPixel() const
css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget()
vcl::Window * ImplGetWindow() const
if this is a proxy return the client, otherwise itself
SAL_DLLPRIVATE void ImplShowAllOverlaps()
SAL_DLLPRIVATE vcl::Window * ImplGetClientWindow() const
vcl::Window * GetChild(sal_uInt16 nChild) const
bool IsAncestorOf(const vcl::Window &rWindow) const
SAL_DLLPRIVATE void ImplInvalidateFrameRegion(const vcl::Region *pRegion, InvalidateFlags nFlags)
SAL_DLLPRIVATE bool ImplIsRealParentPath(const vcl::Window *pWindow) const
SAL_DLLPRIVATE void ImplSetFrameParent(const vcl::Window *pParent)
SAL_DLLPRIVATE void ImplUpdateOverlapWindowPtr(bool bNewFrame)
#define SAL_WARN_IF(condition, area, stream)
std::unique_ptr< sal_Int32[]> pData
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
static SystemWindow * ImplGetLastSystemWindow(vcl::Window *pWin)
std::unique_ptr< vcl::Region > mpInvalidateRegion
std::unique_ptr< ImplCalcToTopData > mpNext
VclPtr< vcl::Window > mpWindow
ImplSVFrameData maFrameData
VclPtr< vcl::Window > mpFirstFrame
::std::list< VclPtr< vcl::Window > > maTopWindowChildren
ImplSVData * ImplGetSVData()
@ Children
The child windows are invalidated, too.
@ NoTransparent
The parent window is not invalidated.
WinBits const WB_OWNERDRAWDECORATION
WinBits const WB_SYSTEMFLOATWIN