1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SD_PANE_DOCKING_WINDOW_HXX
29 #define SD_PANE_DOCKING_WINDOW_HXX
30 
31 #include <sfx2/titledockwin.hxx>
32 #include <sfx2/viewfrm.hxx>
33 
34 #include <boost/scoped_ptr.hpp>
35 #include <boost/shared_ptr.hpp>
36 
37 class ToolBox;
38 class SplitWindow;
39 
40 namespace sd {
41 
42     class PaneDockingWindow : public ::sfx2::TitledDockingWindow
43 {
44 public:
45     /** Create a new docking window.
46         @param pBindings
47             Used, among others, to determine the ViewShellBase and
48             PaneManager that manage the new docking window.
49         @param pChildWindow
50             This child window is the logical container for the new docking
51             window.
52         @param pParent
53             The parent window of the new docking window.
54         @param rResId
55             The resource is used to determine initial size and attributes.
56         @param rsTitle
57             the initial title
58     */
59     PaneDockingWindow (
60         SfxBindings *pBindings,
61         SfxChildWindow *pChildWindow,
62         ::Window* pParent,
63         const ResId& rResId,
64         const ::rtl::OUString& rsTitle);
65 
66     virtual ~PaneDockingWindow (void);
67 	virtual void StateChanged( StateChangedType nType );
68     virtual void MouseButtonDown (const MouseEvent& rEvent);
69     /** When docked the given range is passed to the parent SplitWindow.
70     */
71     void SetValidSizeRange (const Range aValidSizeRange);
72 
73     enum Orientation { HorizontalOrientation, VerticalOrientation, UnknownOrientation };
74     /** When the PaneDockingWindow is docked and managed by a split window
75         it can derive its orientation from the orientation of the split
76         window and return either HorizontalOrientation or
77         VerticalOrientation.
78         Otherwise UnknownOrientation is returned.
79     */
80     Orientation GetOrientation (void) const;
81 
82     /** The current height of the title bar.
83     */
84     sal_Int32 mnTitleBarHeight;
85 
86 };
87 
88 } // end of namespace ::sd
89 
90 #endif
91