#include <wx/sizer.h>
The basic idea behind a box sizer is that windows will most often be laid out in rather simple basic geometry, typically in a row or a column or several hierarchies of either.
For more information, please see Programming with wxBoxSizer.
Public Member Functions | |
wxBoxSizer (int orient) | |
Constructor for a wxBoxSizer. | |
virtual wxSizerItem * | AddSpacer (int size) |
Adds non-stretchable space to the main orientation of the sizer only. | |
virtual wxSize | CalcMin () |
Implements the calculation of a box sizer's minimal. | |
int | GetOrientation () const |
Returns the orientation of the box sizer, either wxVERTICAL or wxHORIZONTAL. | |
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). |
wxBoxSizer::wxBoxSizer | ( | int | orient | ) |
Constructor for a wxBoxSizer.
orient may be either of wxVERTICAL or wxHORIZONTAL for creating either a column sizer or a row sizer.
virtual wxSizerItem* wxBoxSizer::AddSpacer | ( | int | size | ) | [virtual] |
Adds non-stretchable space to the main orientation of the sizer only.
More readable way of calling:
if ( wxBoxSizer::IsVertical() ) { wxBoxSizer::Add(0, size, 0). } else { wxBoxSizer::Add(size, 0, 0). }
Reimplemented from wxSizer.
virtual wxSize wxBoxSizer::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.
Implements wxSizer.
int wxBoxSizer::GetOrientation | ( | ) | const |
Returns the orientation of the box sizer, either wxVERTICAL or wxHORIZONTAL.
void wxBoxSizer::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.
Implements wxSizer.
![]() |
[ top ] |