Kaydet (Commit) 8f1e01fc authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Support non-ToolBox popup case in DockingManager, tdf#106762 prep

Change-Id: I54d4de28336b70dbd07923377e6cceb67079fa80
üst ad769c30
......@@ -111,6 +111,7 @@ private:
DECL_LINK( PopupModeEnd, FloatingWindow*, void );
void ImplEnableStartDocking() { mbStartDockingEnabled = true; }
bool ImplStartDockingEnabled() { return mbStartDockingEnabled; }
void ImplPreparePopupMode( FloatWinPopupFlags nFlags );
public:
ImplDockingWindowWrapper( const vcl::Window *pWindow );
......@@ -133,6 +134,7 @@ public:
void Unlock();
bool IsLocked() const { return mbLocked;}
void StartPopupMode( const tools::Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags );
void StartPopupMode( ToolBox* pParentToolBox, FloatWinPopupFlags nPopupModeFlags );
bool IsInPopupMode() const;
......@@ -187,6 +189,7 @@ public:
void Unlock( const vcl::Window *pWin );
bool IsLocked( const vcl::Window *pWin );
void StartPopupMode( const vcl::Window *pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags );
void StartPopupMode( ToolBox *pParentToolBox, const vcl::Window *pWin );
void StartPopupMode( ToolBox *pParentToolBox, const vcl::Window *pWin, FloatWinPopupFlags nPopupModeFlags );
......
......@@ -332,6 +332,13 @@ void DockingManager::SetFloatingMode( const vcl::Window *pWindow, bool bFloating
pWrapper->SetFloatingMode( bFloating );
}
void DockingManager::StartPopupMode( const vcl::Window *pWindow, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags )
{
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
if( pWrapper )
pWrapper->StartPopupMode( rRect, nFlags );
}
void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const vcl::Window *pWindow, FloatWinPopupFlags nFlags )
{
ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
......@@ -915,12 +922,8 @@ void ImplDockingWindowWrapper::ShowTitleButton( TitleButton nButton, bool bVisib
}
}
void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWinPopupFlags nFlags )
void ImplDockingWindowWrapper::ImplPreparePopupMode( FloatWinPopupFlags nFlags )
{
// do nothing if window is floating
if( IsFloatingMode() )
return;
GetWindow()->Show( false, ShowFlags::NoFocusChange );
// prepare reparenting
......@@ -966,6 +969,15 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
// set mpFloatWin not until all window positioning is done !!!
// (SetPosPixel etc. check for valid mpFloatWin pointer)
mpFloatWin = pWin;
}
void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWinPopupFlags nFlags )
{
// do nothing if window is floating
if( IsFloatingMode() )
return;
ImplPreparePopupMode( nFlags );
// if the subtoolbar was opened via keyboard make sure that key events
// will go into subtoolbar
......@@ -983,6 +995,17 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
}
}
void ImplDockingWindowWrapper::StartPopupMode( const tools::Rectangle& rRect, FloatWinPopupFlags nFlags )
{
// do nothing if window is floating
if( IsFloatingMode() )
return;
ImplPreparePopupMode( nFlags );
mpFloatWin->StartPopupMode( rRect, nFlags );
GetWindow()->Show();
}
IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd, FloatingWindow*, void)
{
GetWindow()->Show( false, ShowFlags::NoFocusChange );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment