update dev300-m58
[ooovba.git] / sd / source / ui / toolpanel / LayoutableWindow.hxx
blobe94f69df7dabef16c6bd8cc5a97eb6353a6fd9fe
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: LayoutableWindow.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SD_TOOLPANEL_I_LAYOUTABLE_WINDOW_HXX
32 #define SD_TOOLPANEL_I_LAYOUTABLE_WINDOW_HXX
34 #include <vcl/gen.hxx>
36 class Window;
38 namespace sd { namespace toolpanel {
41 /** This interface has to be implemented by windows that want to be
42 layouted by a ToolPanel, SubToolPanel, or ScrollablePanel object.
44 class LayoutableWindow
46 public:
47 /** Return the preferred size without constraints on either the
48 height or the width.
49 The size the window will later be set to may but does not have
50 to be equal to this size.
52 virtual Size GetPreferredSize (void) = 0;
54 /** Return the preferred width with the constraint, that the
55 window will be set to the given height.
56 The width the window will later be set to may but does not have
57 to be equal to this width.
59 virtual int GetPreferredWidth (int nHeight) = 0;
61 /** Return the preferred height with the constraint, that the
62 window will be set to the given width.
63 The height the window will later be set to may but does not have
64 to be equal to this height.
66 virtual int GetPreferredHeight (int nWidth) = 0;
68 /** Return wether the window is generally resizable. When used by
69 a VerticalLayouter then the width will always be resized and
70 the return value of this method determines whether the height
71 may be modified as well.
73 virtual bool IsResizable (void) = 0;
75 /** Return the window so that its size and position can be set.
77 virtual ::Window& GetWindow (void) = 0;
80 } } // end of namespace ::sd::toolpanel
82 #endif