CWS-TOOLING: integrate CWS os150
[LibreOffice.git] / sd / source / ui / toolpanel / ToolPanelDescriptor.hxx
blob4ac31ef53e232473a24580cf162012aed5bcb447
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef SD_TOOL_PANEL_DESCRIPTOR_HXX
29 #define SD_TOOL_PANEL_DESCRIPTOR_HXX
31 #include <tools/string.hxx>
32 #include <tools/gen.hxx>
33 #include <memory>
35 class Window;
37 namespace sd { namespace toolpanel {
40 /** Collection of information the describes entries of the tool
41 panel. A descriptor owns the control it is associated with.
43 class ToolPanelDescriptor
45 public:
46 /** Create a new descriptor for the given control.
47 @param pControl
49 ToolPanelDescriptor (::std::auto_ptr< ::Window> pControl,
50 const String& rTitle);
52 ~ToolPanelDescriptor (void);
54 /** Return the height of the title bar.
55 @return
56 The title bar height is returned in pixels.
58 int GetTitleBarHeight (void) const;
61 void SetPositionAndSize (const Point& aPosition,
62 const Size& aSize);
63 void SetPositionAndSize (const Rectangle& aBox);
64 void SetWeight (double nWeight);
66 Window* GetControl (void) const;
67 const String& GetTitle (void) const;
68 const Rectangle& GetTitleBox (void) const;
69 Rectangle GetPositionAndSize (void) const;
70 double GetWeight (void) const;
72 int GetTotalHeight (void) const;
73 int GetWindowHeight (void) const;
75 private:
76 ::std::auto_ptr< ::Window> mpControl;
77 String msTitle;
78 Rectangle maTitleBox;
79 double mnWeight;
80 int mnTotalHeight;
82 /// Do not use! Assignment operator is not supported.
83 const ToolPanelDescriptor& operator= (
84 const ToolPanelDescriptor& aDescriptor);
87 } } // end of namespace ::sd::toolpanel
89 #endif