#include <box.h>
Inheritance diagram for wftk::Box:
Public Types | |
typedef std::list< ScreenArea * > | ChildList |
internal type | |
enum | Orientation { LEFT_TO_RIGHT, RIGHT_TO_LEFT, TOP_TO_BOTTOM, BOTTOM_TO_TOP } |
The orientation of the box. More... | |
Public Member Functions | |
Box (Orientation) | |
create a box with a particular orientation | |
Orientation | orientation () const |
get the box's orientation | |
void | setOrientation (Orientation) |
set the box's orientation | |
iterator | begin () |
the beginning of the box's list of children | |
iterator | end () |
the end of the box's list of children | |
void | pack (ScreenArea *, const iterator &) |
add a child to the box (better to use packFront() and packBack()) | |
void | erase (const iterator &) |
remove a child from the box | |
void | packFront (ScreenArea *sa) |
Add a child ScreenArea to the front of the box. | |
void | packBack (ScreenArea *sa) |
add a child ScreenArea to the back of the box | |
void | clear () |
remove all children from the box | |
iterator | find (ScreenArea &) |
find a child in the box (O(N), but N won't be too large in any reasonable case) | |
Protected Member Functions | |
virtual void | setPackingInfo () |
recalculate the object's prefered size | |
virtual void | handleResize (Uint16 w, Uint16 h) |
Calculate new shape for shaped widgets, call to setShape() after a resize. |
Boxes have an Orientation, either vertical or horizontal. Elements (ScreenAreas) inside the box are ordered within the box using the packBack() and packFront() methods.
If you want to mix horizontal and vertical alignments, use boxes within boxes with varying alignments for each.
|
The orientation of the box. Possible values: LEFT_TO_RIGHT, RIGHT_TO_LEFT, TOP_TO_BOTTOM, BOTTOM_TO_TOP |
|
add a child ScreenArea to the back of the box Boxes have a notion of Orientation, which defines the order and direction that contained Widgets are drawn. Screen areas at the 'back' of the container are drawn first, with areas at the 'front' of the container following, in the direction specified by the Orientation of this Box. Screen areas contained in this box do not overlap. |
|
Add a child ScreenArea to the front of the box. Boxes have a notion of Orientation, which defines the order and direction that contained Widgets are drawn. Screen areas at the 'back' of the container are drawn first, with areas at the 'front' of the container following, in the direction specified by the Orientation of this Box. Screen areas contained in this box do not overlap. |
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.