#include </home/zeitlin/src/wx/github/interface/wx/sizer.h>
wxStaticBoxSizer is a sizer derived from wxBoxSizer but adds a static box around the sizer.
The static box may be either created independently or the sizer may create it itself as a convenience. In any case, the sizer owns the wxStaticBox control and will delete it in the wxStaticBoxSizer destructor.
Note that since wxWidgets 2.9.1 you are encouraged to create the windows which are added to wxStaticBoxSizer as children of wxStaticBox itself, see this class documentation for more details.
Example of use of this class:
void MyFrame::CreateControls() { wxPanel *panel = new wxPanel(this); ... wxStaticBoxSizer *sz = new wxStaticBoxSizer(wxVERTICAL, panel, "Box"); sz->Add(new wxStaticText(sz->GetStaticBox(), wxID_ANY, "This window is a child of the staticbox")); ... }
Public Member Functions | |
wxStaticBoxSizer (wxStaticBox *box, int orient) | |
This constructor uses an already existing static box. | |
wxStaticBoxSizer (int orient, wxWindow *parent, const wxString &label=wxEmptyString) | |
This constructor creates a new static box with the given label and parent window. | |
wxStaticBox * | GetStaticBox () const |
Returns the static box associated with the sizer. | |
virtual wxSize | CalcMin () |
Implements the calculation of a box sizer's minimal. | |
virtual void | RecalcSizes () |
Implements the calculation of a box sizer's dimensions and then sets the size of its children (calling wxWindow::SetSize if the child is a window). |
wxStaticBoxSizer::wxStaticBoxSizer | ( | wxStaticBox * | box, |
int | orient | ||
) |
This constructor uses an already existing static box.
box | The static box to associate with the sizer (which will take its ownership). |
orient | Can be either wxVERTICAL or wxHORIZONTAL . |
wxStaticBoxSizer::wxStaticBoxSizer | ( | int | orient, |
wxWindow * | parent, | ||
const wxString & | label = wxEmptyString |
||
) |
This constructor creates a new static box with the given label and parent window.
virtual wxSize wxStaticBoxSizer::CalcMin | ( | ) | [virtual] |
Implements the calculation of a box sizer's minimal.
It is used internally only and must not be called by the user. Documented for information.
Reimplemented from wxBoxSizer.
wxStaticBox* wxStaticBoxSizer::GetStaticBox | ( | ) | const |
Returns the static box associated with the sizer.
virtual void wxStaticBoxSizer::RecalcSizes | ( | ) | [virtual] |
Implements the calculation of a box sizer's dimensions and then sets the size of its children (calling wxWindow::SetSize if the child is a window).
It is used internally only and must not be called by the user (call Layout() if you want to resize). Documented for information.
Reimplemented from wxBoxSizer.