#include <layouthelper.h>
The layout will register itself as a widget listener and relayout the widgets in the container dynamically on resize.
Definition at line 34 of file layouthelper.h.
Public Member Functions | |
LayoutHelper (gcn::Container *container) | |
Constructor. | |
~LayoutHelper () | |
Destructor. | |
Layout & | getLayout () |
Gets the layout handler. | |
void | reflowLayout (int w=0, int h=0) |
Computes the position of the widgets according to the current layout. | |
LayoutCell & | place (int x, int y, gcn::Widget *, int w=1, int h=1) |
Adds a widget to the container and sets it at given cell. | |
ContainerPlacer | getPlacer (int x, int y) |
Returns a proxy for adding widgets in an inner table of the layout. | |
void | widgetResized (const gcn::Event &event) |
Called whenever the managed container changes size. | |
Private Attributes | |
Layout | mLayout |
Layout handler. | |
gcn::Container * | mContainer |
Managed container. |
LayoutHelper::LayoutHelper | ( | gcn::Container * | container | ) |
LayoutHelper::~LayoutHelper | ( | ) |
Layout & LayoutHelper::getLayout | ( | ) |
void LayoutHelper::reflowLayout | ( | int | w = 0 , |
|
int | h = 0 | |||
) |
Computes the position of the widgets according to the current layout.
Resizes the managed container so that the layout fits.
w | if non-zero, force the container to this width. | |
h | if non-zero, force the container to this height. |
Definition at line 51 of file layouthelper.cpp.
LayoutCell & LayoutHelper::place | ( | int | x, | |
int | y, | |||
gcn::Widget * | wg, | |||
int | w = 1 , |
|||
int | h = 1 | |||
) |
Adds a widget to the container and sets it at given cell.
Definition at line 40 of file layouthelper.cpp.
ContainerPlacer LayoutHelper::getPlacer | ( | int | x, | |
int | y | |||
) |
Returns a proxy for adding widgets in an inner table of the layout.
Definition at line 46 of file layouthelper.cpp.
void LayoutHelper::widgetResized | ( | const gcn::Event & | event | ) |
Layout LayoutHelper::mLayout [private] |
gcn::Container* LayoutHelper::mContainer [private] |