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 INCLUDED_SFX2_SOURCE_INC_SPLITWIN_HXX
20 #define INCLUDED_SFX2_SOURCE_INC_SPLITWIN_HXX
22 #include <vcl/splitwin.hxx>
23 #include <sfx2/childwin.hxx>
24 #include <sfx2/dockwin.hxx>
30 class SfxDockingWindow
;
31 class SfxEmptySplitWin_Impl
;
36 VclPtr
<SfxDockingWindow
> pWin
; // SplitWindow has this window
38 bool bHide
; // SplitWindow had this window
41 class SfxSplitWindow
: public SplitWindow
43 friend class SfxEmptySplitWin_Impl
;
46 SfxChildAlignment eAlign
;
47 SfxWorkWindow
* pWorkWin
;
48 std::vector
<std::unique_ptr
<SfxDock_Impl
> >
51 VclPtr
<SfxEmptySplitWin_Impl
> pEmptyWin
;
52 VclPtr
<SfxDockingWindow
> pActive
;
54 void InsertWindow_Impl( SfxDock_Impl
const * pDockWin
,
60 DECL_LINK( TimerHdl
, Timer
*, void );
61 bool CursorIsOverRect() const;
62 void SetPinned_Impl( bool );
63 void SetFadeIn_Impl( bool );
64 void SaveConfig_Impl();
69 virtual void StartSplit() override
;
70 virtual void SplitResize() override
;
71 virtual void Split() override
;
72 virtual void MouseButtonDown ( const MouseEvent
& ) override
;
75 SfxSplitWindow( vcl::Window
* pParent
, SfxChildAlignment eAl
,
76 SfxWorkWindow
*pW
, bool bWithButtons
);
78 virtual ~SfxSplitWindow() override
;
79 virtual void dispose() override
;
81 void ReleaseWindow_Impl(SfxDockingWindow
const *pWin
, bool bSaveConfig
=true);
83 void InsertWindow( SfxDockingWindow
* pDockWin
,
86 void InsertWindow( SfxDockingWindow
* pDockWin
,
92 void MoveWindow( SfxDockingWindow
* pDockWin
,
98 void RemoveWindow( SfxDockingWindow
const * pDockWin
, bool bHide
=true);
100 void Lock( bool bLock
=true )
102 SetUpdateMode( !bLock
);
105 bool GetWindowPos( const SfxDockingWindow
* pWindow
,
106 sal_uInt16
& rLine
, sal_uInt16
& rPos
) const;
107 bool GetWindowPos( const Point
& rTestPos
,
108 sal_uInt16
& rLine
, sal_uInt16
& rPos
) const;
109 sal_uInt16
GetLineCount() const;
110 tools::Long
GetLineSize( sal_uInt16
) const;
111 sal_uInt16
GetWindowCount(sal_uInt16 nLine
) const;
112 sal_uInt16
GetWindowCount() const;
114 bool IsPinned() const { return bPinned
; }
115 bool IsFadeIn() const;
116 bool IsAutoHide( bool bSelf
) const;
117 SplitWindow
* GetSplitWindow();
119 virtual void FadeOut() override
;
120 virtual void FadeIn() override
;
121 void SetActiveWindow_Impl( SfxDockingWindow
* pWin
);
124 #endif // INCLUDED_SFX2_SOURCE_INC_SPLITWIN_HXX
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */