]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/sizer.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: provide wxSizer class for layounting
4 // Author: Robert Roebling and Robin Dunn
8 // Copyright: (c) Robin Dunn, Dirk Holtwick and Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "sizer.h"
21 #include "wx/window.h"
23 #include "wx/dialog.h"
25 //---------------------------------------------------------------------------
27 //---------------------------------------------------------------------------
33 //---------------------------------------------------------------------------
35 //---------------------------------------------------------------------------
37 class WXDLLEXPORT wxSizerItem
: public wxObject
41 wxSizerItem( int width
, int height
, int option
, int flag
, int border
);
44 wxSizerItem( wxWindow
*window
, int option
, int flag
, int border
);
47 wxSizerItem( wxSizer
*sizer
, int option
, int flag
, int border
);
49 virtual wxSize
GetSize();
50 virtual wxSize
CalcMin();
51 virtual void SetDimension( wxPoint pos
, wxSize size
);
57 wxWindow
*GetWindow() const
59 wxSizer
*GetSizer() const
78 //---------------------------------------------------------------------------
80 //---------------------------------------------------------------------------
82 class WXDLLEXPORT wxSizer
: public wxObject
88 virtual void Add( wxWindow
*window
, int option
= 0, int flag
= 0, int border
= 0 );
89 virtual void Add( wxSizer
*sizer
, int option
= 0, int flag
= 0, int border
= 0 );
90 virtual void Add( int width
, int height
, int option
= 0, int flag
= 0, int border
= 0 );
92 void SetDimension( int x
, int y
, int width
, int height
);
97 { return m_position
; }
101 virtual void RecalcSizes() = 0;
102 virtual wxSize
CalcMin() = 0;
104 virtual void Layout();
106 void Fit( wxWindow
*window
);
107 void SetSizeHints( wxWindow
*window
);
114 wxSize
GetMinWindowSize( wxWindow
*window
);
117 //---------------------------------------------------------------------------
119 //---------------------------------------------------------------------------
121 class WXDLLEXPORT wxBoxSizer
: public wxSizer
124 wxBoxSizer( int orient
);