1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _SFXSPLITWIN_HXX
20 #define _SFXSPLITWIN_HXX
22 #include <vcl/splitwin.hxx>
23 #include <sfx2/childwin.hxx>
26 class SfxDockingWindow
;
27 class SfxDockArr_Impl
;
28 class SfxEmptySplitWin_Impl
;
31 class SfxSplitWindow
: public SplitWindow
33 friend class SfxEmptySplitWin_Impl
;
36 SfxChildAlignment eAlign
;
37 SfxWorkWindow
* pWorkWin
;
38 SfxDockArr_Impl
* pDockArr
;
41 SfxEmptySplitWin_Impl
* pEmptyWin
;
42 SfxDockingWindow
* pActive
;
44 void InsertWindow_Impl( SfxDock_Impl
* pDockWin
,
48 sal_Bool bNewLine
=sal_False
);
50 DECL_LINK( TimerHdl
, Timer
* );
51 sal_Bool
CursorIsOverRect( sal_Bool bForceAdding
= sal_False
) const;
52 void SetPinned_Impl( sal_Bool
);
53 void SetFadeIn_Impl( sal_Bool
);
54 void SaveConfig_Impl();
59 virtual void StartSplit();
60 virtual void SplitResize();
62 virtual void Command ( const CommandEvent
& rCEvt
);
63 virtual void MouseButtonDown ( const MouseEvent
& );
66 SfxSplitWindow( Window
* pParent
, SfxChildAlignment eAl
,
67 SfxWorkWindow
*pW
, sal_Bool bWithButtons
,
68 WinBits nBits
= WB_BORDER
| WB_SIZEABLE
| WB_3DLOOK
);
72 void ReleaseWindow_Impl(SfxDockingWindow
*pWin
, sal_Bool bSaveConfig
=sal_True
);
74 void InsertWindow( SfxDockingWindow
* pDockWin
,
77 void InsertWindow( SfxDockingWindow
* pDockWin
,
81 sal_Bool bNewLine
=sal_False
);
83 void MoveWindow( SfxDockingWindow
* pDockWin
,
87 sal_Bool bNewLine
=sal_False
);
89 void RemoveWindow( SfxDockingWindow
* pDockWin
, sal_Bool bHide
=sal_True
);
91 void Lock( sal_Bool bLock
=sal_True
)
94 SetUpdateMode( !bLock
);
96 using Window::IsLocked
;
97 sal_Bool
IsLocked() const { return bLocked
; }
98 sal_Bool
GetWindowPos( const SfxDockingWindow
* pWindow
,
99 sal_uInt16
& rLine
, sal_uInt16
& rPos
) const;
100 sal_Bool
GetWindowPos( const Point
& rTestPos
,
101 sal_uInt16
& rLine
, sal_uInt16
& rPos
) const;
102 sal_uInt16
GetLineCount() const;
103 long GetLineSize( sal_uInt16
) const;
104 sal_uInt16
GetWindowCount(sal_uInt16 nLine
) const;
105 sal_uInt16
GetWindowCount() const;
107 sal_Bool
IsPinned() const { return bPinned
; }
108 sal_Bool
IsFadeIn() const;
109 sal_Bool
IsAutoHide( sal_Bool bSelf
= sal_False
) const;
110 SplitWindow
* GetSplitWindow();
112 virtual void AutoHide();
113 virtual void FadeOut();
114 virtual void FadeIn();
116 void Pin_Impl( sal_Bool bPinned
);
117 sal_Bool
ActivateNextChild_Impl( sal_Bool bForward
= sal_True
);
118 void SetActiveWindow_Impl( SfxDockingWindow
* pWin
);
121 #endif // #ifndef _SFXSPLITWIN_HXX
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */