1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: splitwin.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SFXSPLITWIN_HXX
31 #define _SFXSPLITWIN_HXX
33 #ifndef _SPLITWIN_HXX //autogen
34 #include <vcl/splitwin.hxx>
36 #include <sfx2/childwin.hxx>
39 class SfxDockingWindow
;
40 class SfxDockArr_Impl
;
41 class SfxEmptySplitWin_Impl
;
44 class SfxSplitWindow
: public SplitWindow
46 friend class SfxEmptySplitWin_Impl
;
49 SfxChildAlignment eAlign
;
50 SfxWorkWindow
* pWorkWin
;
51 SfxDockArr_Impl
* pDockArr
;
54 SfxEmptySplitWin_Impl
* pEmptyWin
;
55 SfxDockingWindow
* pActive
;
57 void InsertWindow_Impl( SfxDock_Impl
* pDockWin
,
61 BOOL bNewLine
=FALSE
);
63 DECL_LINK( TimerHdl
, Timer
* );
64 BOOL
CursorIsOverRect( BOOL bForceAdding
= FALSE
) const;
65 void SetPinned_Impl( BOOL
);
66 void SetFadeIn_Impl( BOOL
);
67 void SaveConfig_Impl();
72 virtual void StartSplit();
73 virtual void SplitResize();
75 virtual void Command ( const CommandEvent
& rCEvt
);
76 virtual void MouseButtonDown ( const MouseEvent
& );
79 SfxSplitWindow( Window
* pParent
, SfxChildAlignment eAl
,
80 SfxWorkWindow
*pW
, BOOL bWithButtons
,
81 WinBits nBits
= WB_BORDER
| WB_SIZEABLE
| WB_3DLOOK
);
85 void ReleaseWindow_Impl(SfxDockingWindow
*pWin
, BOOL bSaveConfig
=TRUE
);
87 void InsertWindow( SfxDockingWindow
* pDockWin
,
90 void InsertWindow( SfxDockingWindow
* pDockWin
,
94 BOOL bNewLine
=FALSE
);
96 void MoveWindow( SfxDockingWindow
* pDockWin
,
100 BOOL bNewLine
=FALSE
);
102 void RemoveWindow( SfxDockingWindow
* pDockWin
, BOOL bHide
=TRUE
);
104 void Lock( BOOL bLock
=TRUE
)
107 SetUpdateMode( !bLock
);
109 using Window::IsLocked
;
110 BOOL
IsLocked() const { return bLocked
; }
111 BOOL
GetWindowPos( const SfxDockingWindow
* pWindow
,
112 USHORT
& rLine
, USHORT
& rPos
) const;
113 BOOL
GetWindowPos( const Point
& rTestPos
,
114 USHORT
& rLine
, USHORT
& rPos
) const;
115 USHORT
GetLineCount() const;
116 long GetLineSize( USHORT
) const;
117 USHORT
GetWindowCount(USHORT nLine
) const;
118 USHORT
GetWindowCount() const;
120 BOOL
IsPinned() const { return bPinned
; }
121 BOOL
IsFadeIn() const;
122 BOOL
IsAutoHide( BOOL bSelf
= FALSE
) const;
123 SplitWindow
* GetSplitWindow();
125 virtual void AutoHide();
126 virtual void FadeOut();
127 virtual void FadeIn();
129 void Pin_Impl( BOOL bPinned
);
130 BOOL
ActivateNextChild_Impl( BOOL bForward
= TRUE
);
131 void SetActiveWindow_Impl( SfxDockingWindow
* pWin
);
134 #endif // #ifndef _SFXSPLITWIN_HXX