1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef SD_PANE_DOCKING_WINDOW_HXX
25 #define SD_PANE_DOCKING_WINDOW_HXX
26 
27 #include <sfx2/titledockwin.hxx>
28 #include <sfx2/viewfrm.hxx>
29 
30 #include <boost/scoped_ptr.hpp>
31 #include <boost/shared_ptr.hpp>
32 
33 class ToolBox;
34 class SplitWindow;
35 
36 namespace sd {
37 
38     class PaneDockingWindow : public ::sfx2::TitledDockingWindow
39 {
40 public:
41     /** Create a new docking window.
42         @param pBindings
43             Used, among others, to determine the ViewShellBase and
44             PaneManager that manage the new docking window.
45         @param pChildWindow
46             This child window is the logical container for the new docking
47             window.
48         @param pParent
49             The parent window of the new docking window.
50         @param rResId
51             The resource is used to determine initial size and attributes.
52         @param rsTitle
53             the initial title
54     */
55     PaneDockingWindow (
56         SfxBindings *pBindings,
57         SfxChildWindow *pChildWindow,
58         ::Window* pParent,
59         const ResId& rResId,
60         const ::rtl::OUString& rsTitle);
61 
62     virtual ~PaneDockingWindow (void);
63 	virtual void StateChanged( StateChangedType nType );
64     virtual void MouseButtonDown (const MouseEvent& rEvent);
65     /** When docked the given range is passed to the parent SplitWindow.
66     */
67     void SetValidSizeRange (const Range aValidSizeRange);
68 
69     enum Orientation { HorizontalOrientation, VerticalOrientation, UnknownOrientation };
70     /** When the PaneDockingWindow is docked and managed by a split window
71         it can derive its orientation from the orientation of the split
72         window and return either HorizontalOrientation or
73         VerticalOrientation.
74         Otherwise UnknownOrientation is returned.
75     */
76     Orientation GetOrientation (void) const;
77 
78     /** The current height of the title bar.
79     */
80     sal_Int32 mnTitleBarHeight;
81 
82 };
83 
84 } // end of namespace ::sd
85 
86 #endif
87