Arranges items in a 1-dimensional box. More...
#include <Sizer.h>
Public Member Functions | |
BoxSizer (bool pHorizontal) | |
virtual void | OnCalcSizes () |
virtual void | OnRectChanged (int x, int y, int w, int h) |
virtual size_t | GetItemCount () |
virtual ISizer * | GetItem (size_t i) |
BoxSizer * | SetPadding (int pad) |
BoxSizer * | SetOuterPadding (int pad) |
BoxSizer * | Add (ISizer *sizer, int proportion=0) |
BoxSizer * | Add (HWND window, int proportion=0) |
BoxSizer * | AddStretchSpace (int proportion) |
void | RemoveAll () |
BoxSizer * | StretchItemInMinorDirection (bool stretch) |
![]() | |
void | CalcSizes () |
SizerSize | GetMinSize () |
void | Move (int x, int y, int w, int h) |
void | Move (const SizerPoint &p, const SizerSize &s) |
void | Move (const SizerRect &r) |
SizerRect | GetRect () const |
void | WmSize (UINT type, int cx, int cy) |
void | WmGetMinMaxInfo (HWND window, MINMAXINFO *mmi) |
Additional Inherited Members | |
![]() | |
bool | dirty |
SizerRect | rect |
SizerSize | minimumSize |
Arranges items in a 1-dimensional box.
BoxSizer::BoxSizer | ( | bool | pHorizontal | ) |
pHorizontal | Orientation of the sizer, either horizontal or vertical. |
Push a sizer to the end of the box.
|
inline |
Shortcut to add a window.
|
inline |
Better way of saying Add(NULL, proportion).
|
inlinevirtual |
i | Index of the sizer item to get. GetItemCount() returns the maximum for this index. |
Reimplemented from ISizer.
|
inlinevirtual |
|
virtual |
Calculates sizes, but does not move the sizer in any way.
Implements ISizer.
|
virtual |
Moves the sizer and all children.
This function will always be called, even if the sizer is not dirty.
Implements ISizer.
void BoxSizer::RemoveAll | ( | ) |
Removes all items.
BoxSizer * BoxSizer::SetOuterPadding | ( | int | pad | ) |
Set padding around this sizer.
BoxSizer * BoxSizer::SetPadding | ( | int | pad | ) |
Set padding between items.
BoxSizer * BoxSizer::StretchItemInMinorDirection | ( | bool | stretch | ) |
Default is True.
stretch | True if item should be stretch inside this sizer, False if items should keep their default size. |