1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef _SFXSPLITWIN_HXX 28*cdf0e10cSrcweir #define _SFXSPLITWIN_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #ifndef _SPLITWIN_HXX //autogen 31*cdf0e10cSrcweir #include <vcl/splitwin.hxx> 32*cdf0e10cSrcweir #endif 33*cdf0e10cSrcweir #include <sfx2/childwin.hxx> 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir class SfxWorkWindow; 36*cdf0e10cSrcweir class SfxDockingWindow; 37*cdf0e10cSrcweir class SfxDockArr_Impl; 38*cdf0e10cSrcweir class SfxEmptySplitWin_Impl; 39*cdf0e10cSrcweir struct SfxDock_Impl; 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir class SfxSplitWindow : public SplitWindow 42*cdf0e10cSrcweir { 43*cdf0e10cSrcweir friend class SfxEmptySplitWin_Impl; 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir private: 46*cdf0e10cSrcweir SfxChildAlignment eAlign; 47*cdf0e10cSrcweir SfxWorkWindow* pWorkWin; 48*cdf0e10cSrcweir SfxDockArr_Impl* pDockArr; 49*cdf0e10cSrcweir sal_Bool bLocked; 50*cdf0e10cSrcweir sal_Bool bPinned; 51*cdf0e10cSrcweir SfxEmptySplitWin_Impl* pEmptyWin; 52*cdf0e10cSrcweir SfxDockingWindow* pActive; 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir void InsertWindow_Impl( SfxDock_Impl* pDockWin, 55*cdf0e10cSrcweir const Size& rSize, 56*cdf0e10cSrcweir sal_uInt16 nLine, 57*cdf0e10cSrcweir sal_uInt16 nPos, 58*cdf0e10cSrcweir sal_Bool bNewLine=sal_False ); 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir DECL_LINK( TimerHdl, Timer* ); 61*cdf0e10cSrcweir sal_Bool CursorIsOverRect( sal_Bool bForceAdding = sal_False ) const; 62*cdf0e10cSrcweir void SetPinned_Impl( sal_Bool ); 63*cdf0e10cSrcweir void SetFadeIn_Impl( sal_Bool ); 64*cdf0e10cSrcweir void SaveConfig_Impl(); 65*cdf0e10cSrcweir void FadeOut_Impl(); 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir protected: 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir virtual void StartSplit(); 70*cdf0e10cSrcweir virtual void SplitResize(); 71*cdf0e10cSrcweir virtual void Split(); 72*cdf0e10cSrcweir virtual void Command ( const CommandEvent& rCEvt ); 73*cdf0e10cSrcweir virtual void MouseButtonDown ( const MouseEvent& ); 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir public: 76*cdf0e10cSrcweir SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, 77*cdf0e10cSrcweir SfxWorkWindow *pW, sal_Bool bWithButtons, 78*cdf0e10cSrcweir WinBits nBits = WB_BORDER | WB_SIZEABLE | WB_3DLOOK ); 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir ~SfxSplitWindow(); 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir void ReleaseWindow_Impl(SfxDockingWindow *pWin, sal_Bool bSaveConfig=sal_True); 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir void InsertWindow( SfxDockingWindow* pDockWin, 85*cdf0e10cSrcweir const Size& rSize); 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir void InsertWindow( SfxDockingWindow* pDockWin, 88*cdf0e10cSrcweir const Size& rSize, 89*cdf0e10cSrcweir sal_uInt16 nLine, 90*cdf0e10cSrcweir sal_uInt16 nPos, 91*cdf0e10cSrcweir sal_Bool bNewLine=sal_False ); 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir void MoveWindow( SfxDockingWindow* pDockWin, 94*cdf0e10cSrcweir const Size& rSize, 95*cdf0e10cSrcweir sal_uInt16 nLine, 96*cdf0e10cSrcweir sal_uInt16 nPos, 97*cdf0e10cSrcweir sal_Bool bNewLine=sal_False ); 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir void RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide=sal_True); 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir void Lock( sal_Bool bLock=sal_True ) 102*cdf0e10cSrcweir { 103*cdf0e10cSrcweir bLocked = bLock; 104*cdf0e10cSrcweir SetUpdateMode( !bLock ); 105*cdf0e10cSrcweir } 106*cdf0e10cSrcweir using Window::IsLocked; 107*cdf0e10cSrcweir sal_Bool IsLocked() const { return bLocked; } 108*cdf0e10cSrcweir sal_Bool GetWindowPos( const SfxDockingWindow* pWindow, 109*cdf0e10cSrcweir sal_uInt16& rLine, sal_uInt16& rPos ) const; 110*cdf0e10cSrcweir sal_Bool GetWindowPos( const Point& rTestPos, 111*cdf0e10cSrcweir sal_uInt16& rLine, sal_uInt16& rPos ) const; 112*cdf0e10cSrcweir sal_uInt16 GetLineCount() const; 113*cdf0e10cSrcweir long GetLineSize( sal_uInt16 ) const; 114*cdf0e10cSrcweir sal_uInt16 GetWindowCount(sal_uInt16 nLine) const; 115*cdf0e10cSrcweir sal_uInt16 GetWindowCount() const; 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir sal_Bool IsPinned() const { return bPinned; } 118*cdf0e10cSrcweir sal_Bool IsFadeIn() const; 119*cdf0e10cSrcweir sal_Bool IsAutoHide( sal_Bool bSelf = sal_False ) const; 120*cdf0e10cSrcweir SplitWindow* GetSplitWindow(); 121*cdf0e10cSrcweir 122*cdf0e10cSrcweir virtual void AutoHide(); 123*cdf0e10cSrcweir virtual void FadeOut(); 124*cdf0e10cSrcweir virtual void FadeIn(); 125*cdf0e10cSrcweir void Show_Impl(); 126*cdf0e10cSrcweir void Pin_Impl( sal_Bool bPinned ); 127*cdf0e10cSrcweir sal_Bool ActivateNextChild_Impl( sal_Bool bForward = sal_True ); 128*cdf0e10cSrcweir void SetActiveWindow_Impl( SfxDockingWindow* pWin ); 129*cdf0e10cSrcweir }; 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir #endif // #ifndef _SFXSPLITWIN_HXX 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir 134