diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-09-09 15:21:19 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-09-09 15:21:19 +0000 |
commit | 786ae2e125729212b4b253ca78e6f6f93359d6ef (patch) | |
tree | 0223499893ccdba46675cd297f835b9f1abc404f /vcl/source | |
parent | aab315f15e854ae1b0fde0fa8a22fd19dd8f8b79 (diff) |
INTEGRATION: CWS toolbars2 (1.16.24); FILE MERGED
2004/08/10 15:42:35 ssa 1.16.24.1: #i32190# provide SystemWindow::SetMaxOutputSizePixel()
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/dockwin.cxx | 50 |
1 files changed, 45 insertions, 5 deletions
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index da5ce5dd7a34..8f2a69b5e31e 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dockwin.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: obo $ $Date: 2004-07-06 13:48:34 $ + * last change: $Author: obo $ $Date: 2004-09-09 16:21:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -99,6 +99,28 @@ // ----------------------------------------------------------------------- +class DockingWindow::ImplData +{ +public: + ImplData(); + ~ImplData(); + + Window* mpParent; + Size maMaxOutSize; +}; + +DockingWindow::ImplData::ImplData() +{ + mpParent = NULL; + maMaxOutSize = Size( SHRT_MAX, SHRT_MAX ); +} + +DockingWindow::ImplData::~ImplData() +{ +} + +// ----------------------------------------------------------------------- + class ImplDockFloatWin : public FloatingWindow { private: @@ -318,7 +340,7 @@ BOOL DockingWindow::ImplStartDocking( const Point& rPos ) if ( mpFloatWin ) pWin = mpFloatWin; else - pWin = new ImplDockFloatWin( mpParent, mnFloatBits, NULL ); + pWin = new ImplDockFloatWin( mpImplData->mpParent, mnFloatBits, NULL ); pWin->GetBorder( mnDockLeft, mnDockTop, mnDockRight, mnDockBottom ); if ( !mpFloatWin ) delete pWin; @@ -359,6 +381,7 @@ BOOL DockingWindow::ImplStartDocking( const Point& rPos ) void DockingWindow::ImplInitData() { + mpImplData = new ImplData; mbDockWin = TRUE; mpFloatWin = NULL; @@ -379,7 +402,7 @@ void DockingWindow::ImplInit( Window* pParent, WinBits nStyle ) if ( !(nStyle & WB_NODIALOGCONTROL) ) nStyle |= WB_DIALOGCONTROL; - mpParent = pParent; + mpImplData->mpParent = pParent; mbDockable = (nStyle & WB_DOCKABLE) != 0; mnFloatBits = WB_BORDER | (nStyle & DOCKWIN_FLOATSTYLES); nStyle &= ~(DOCKWIN_FLOATSTYLES | WB_BORDER); @@ -493,6 +516,7 @@ DockingWindow::~DockingWindow() Show( FALSE, SHOW_NOFOCUSCHANGE ); SetFloatingMode( FALSE ); } + delete mpImplData; } // ----------------------------------------------------------------------- @@ -858,7 +882,7 @@ void DockingWindow::SetFloatingMode( BOOL bFloatMode ) ImplDockFloatWin* pWin = new ImplDockFloatWin( - mpParent, + mpImplData->mpParent, mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ? mnFloatBits | WB_SYSTEMWINDOW : mnFloatBits, this ); mpFloatWin = pWin; @@ -889,6 +913,7 @@ void DockingWindow::SetFloatingMode( BOOL bFloatMode ) pWin->RollDown(); pWin->SetRollUpOutputSizePixel( maRollUpOutSize ); pWin->SetMinOutputSizePixel( maMinOutSize ); + pWin->SetMaxOutputSizePixel( mpImplData->maMaxOutSize ); ToggleFloatingMode(); @@ -907,6 +932,7 @@ void DockingWindow::SetFloatingMode( BOOL bFloatMode ) mbRollUp = mpFloatWin->IsRollUp(); maRollUpOutSize = mpFloatWin->GetRollUpOutputSizePixel(); maMinOutSize = mpFloatWin->GetMinOutputSizePixel(); + mpImplData->maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel(); Window* pRealParent = mpRealParent; mpBorderWindow = NULL; @@ -1111,3 +1137,17 @@ BOOL DockingWindow::IsFloatingMode() const else return (mpFloatWin != NULL); } + +void DockingWindow::SetMaxOutputSizePixel( const Size& rSize ) +{ + if ( mpFloatWin ) + mpFloatWin->SetMaxOutputSizePixel( rSize ); + mpImplData->maMaxOutSize = rSize; +} + +const Size& DockingWindow::GetMaxOutputSizePixel() const +{ + if ( mpFloatWin ) + return mpFloatWin->GetMaxOutputSizePixel(); + return mpImplData->maMaxOutSize; +} |