1*353d8f4dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*353d8f4dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*353d8f4dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*353d8f4dSAndrew Rist * distributed with this work for additional information 6*353d8f4dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*353d8f4dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*353d8f4dSAndrew Rist * "License"); you may not use this file except in compliance 9*353d8f4dSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*353d8f4dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*353d8f4dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*353d8f4dSAndrew Rist * software distributed under the License is distributed on an 15*353d8f4dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*353d8f4dSAndrew Rist * KIND, either express or implied. See the License for the 17*353d8f4dSAndrew Rist * specific language governing permissions and limitations 18*353d8f4dSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*353d8f4dSAndrew Rist *************************************************************/ 21*353d8f4dSAndrew Rist 22*353d8f4dSAndrew Rist 23cdf0e10cSrcweir #ifndef _SFXSPLITWIN_HXX 24cdf0e10cSrcweir #define _SFXSPLITWIN_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #ifndef _SPLITWIN_HXX //autogen 27cdf0e10cSrcweir #include <vcl/splitwin.hxx> 28cdf0e10cSrcweir #endif 29cdf0e10cSrcweir #include <sfx2/childwin.hxx> 30cdf0e10cSrcweir 31cdf0e10cSrcweir class SfxWorkWindow; 32cdf0e10cSrcweir class SfxDockingWindow; 33cdf0e10cSrcweir class SfxDockArr_Impl; 34cdf0e10cSrcweir class SfxEmptySplitWin_Impl; 35cdf0e10cSrcweir struct SfxDock_Impl; 36cdf0e10cSrcweir 37cdf0e10cSrcweir class SfxSplitWindow : public SplitWindow 38cdf0e10cSrcweir { 39cdf0e10cSrcweir friend class SfxEmptySplitWin_Impl; 40cdf0e10cSrcweir 41cdf0e10cSrcweir private: 42cdf0e10cSrcweir SfxChildAlignment eAlign; 43cdf0e10cSrcweir SfxWorkWindow* pWorkWin; 44cdf0e10cSrcweir SfxDockArr_Impl* pDockArr; 45cdf0e10cSrcweir sal_Bool bLocked; 46cdf0e10cSrcweir sal_Bool bPinned; 47cdf0e10cSrcweir SfxEmptySplitWin_Impl* pEmptyWin; 48cdf0e10cSrcweir SfxDockingWindow* pActive; 49cdf0e10cSrcweir 50cdf0e10cSrcweir void InsertWindow_Impl( SfxDock_Impl* pDockWin, 51cdf0e10cSrcweir const Size& rSize, 52cdf0e10cSrcweir sal_uInt16 nLine, 53cdf0e10cSrcweir sal_uInt16 nPos, 54cdf0e10cSrcweir sal_Bool bNewLine=sal_False ); 55cdf0e10cSrcweir 56cdf0e10cSrcweir DECL_LINK( TimerHdl, Timer* ); 57cdf0e10cSrcweir sal_Bool CursorIsOverRect( sal_Bool bForceAdding = sal_False ) const; 58cdf0e10cSrcweir void SetPinned_Impl( sal_Bool ); 59cdf0e10cSrcweir void SetFadeIn_Impl( sal_Bool ); 60cdf0e10cSrcweir void SaveConfig_Impl(); 61cdf0e10cSrcweir void FadeOut_Impl(); 62cdf0e10cSrcweir 63cdf0e10cSrcweir protected: 64cdf0e10cSrcweir 65cdf0e10cSrcweir virtual void StartSplit(); 66cdf0e10cSrcweir virtual void SplitResize(); 67cdf0e10cSrcweir virtual void Split(); 68cdf0e10cSrcweir virtual void Command ( const CommandEvent& rCEvt ); 69cdf0e10cSrcweir virtual void MouseButtonDown ( const MouseEvent& ); 70cdf0e10cSrcweir 71cdf0e10cSrcweir public: 72cdf0e10cSrcweir SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, 73cdf0e10cSrcweir SfxWorkWindow *pW, sal_Bool bWithButtons, 74cdf0e10cSrcweir WinBits nBits = WB_BORDER | WB_SIZEABLE | WB_3DLOOK ); 75cdf0e10cSrcweir 76cdf0e10cSrcweir ~SfxSplitWindow(); 77cdf0e10cSrcweir 78cdf0e10cSrcweir void ReleaseWindow_Impl(SfxDockingWindow *pWin, sal_Bool bSaveConfig=sal_True); 79cdf0e10cSrcweir 80cdf0e10cSrcweir void InsertWindow( SfxDockingWindow* pDockWin, 81cdf0e10cSrcweir const Size& rSize); 82cdf0e10cSrcweir 83cdf0e10cSrcweir void InsertWindow( SfxDockingWindow* pDockWin, 84cdf0e10cSrcweir const Size& rSize, 85cdf0e10cSrcweir sal_uInt16 nLine, 86cdf0e10cSrcweir sal_uInt16 nPos, 87cdf0e10cSrcweir sal_Bool bNewLine=sal_False ); 88cdf0e10cSrcweir 89cdf0e10cSrcweir void MoveWindow( SfxDockingWindow* pDockWin, 90cdf0e10cSrcweir const Size& rSize, 91cdf0e10cSrcweir sal_uInt16 nLine, 92cdf0e10cSrcweir sal_uInt16 nPos, 93cdf0e10cSrcweir sal_Bool bNewLine=sal_False ); 94cdf0e10cSrcweir 95cdf0e10cSrcweir void RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide=sal_True); 96cdf0e10cSrcweir Lock(sal_Bool bLock=sal_True)97cdf0e10cSrcweir void Lock( sal_Bool bLock=sal_True ) 98cdf0e10cSrcweir { 99cdf0e10cSrcweir bLocked = bLock; 100cdf0e10cSrcweir SetUpdateMode( !bLock ); 101cdf0e10cSrcweir } 102cdf0e10cSrcweir using Window::IsLocked; IsLocked() const103cdf0e10cSrcweir sal_Bool IsLocked() const { return bLocked; } 104cdf0e10cSrcweir sal_Bool GetWindowPos( const SfxDockingWindow* pWindow, 105cdf0e10cSrcweir sal_uInt16& rLine, sal_uInt16& rPos ) const; 106cdf0e10cSrcweir sal_Bool GetWindowPos( const Point& rTestPos, 107cdf0e10cSrcweir sal_uInt16& rLine, sal_uInt16& rPos ) const; 108cdf0e10cSrcweir sal_uInt16 GetLineCount() const; 109cdf0e10cSrcweir long GetLineSize( sal_uInt16 ) const; 110cdf0e10cSrcweir sal_uInt16 GetWindowCount(sal_uInt16 nLine) const; 111cdf0e10cSrcweir sal_uInt16 GetWindowCount() const; 112cdf0e10cSrcweir IsPinned() const113cdf0e10cSrcweir sal_Bool IsPinned() const { return bPinned; } 114cdf0e10cSrcweir sal_Bool IsFadeIn() const; 115cdf0e10cSrcweir sal_Bool IsAutoHide( sal_Bool bSelf = sal_False ) const; 116cdf0e10cSrcweir SplitWindow* GetSplitWindow(); 117cdf0e10cSrcweir 118cdf0e10cSrcweir virtual void AutoHide(); 119cdf0e10cSrcweir virtual void FadeOut(); 120cdf0e10cSrcweir virtual void FadeIn(); 121cdf0e10cSrcweir void Show_Impl(); 122cdf0e10cSrcweir void Pin_Impl( sal_Bool bPinned ); 123cdf0e10cSrcweir sal_Bool ActivateNextChild_Impl( sal_Bool bForward = sal_True ); 124cdf0e10cSrcweir void SetActiveWindow_Impl( SfxDockingWindow* pWin ); 125cdf0e10cSrcweir }; 126cdf0e10cSrcweir 127cdf0e10cSrcweir #endif // #ifndef _SFXSPLITWIN_HXX 128cdf0e10cSrcweir 129cdf0e10cSrcweir 130