#include <uboxLayout.hpp>
Inheritance diagram for ubit::UHalign:
Public Types | |
INHERIT | |
LEFT | |
RIGHT | |
FLEX | |
CENTER | |
enum | { INHERIT, LEFT, RIGHT, FLEX, CENTER } |
Public Member Functions | |
UHalign (const UHalign &) | |
UHalign & | operator= (const UHalign &) |
bool | operator== (const UHalign &v) const |
virtual void | update () |
updates parents graphics. | |
virtual void | putProp (UContext *, UControl *) |
[impl] changes corresponding value in the UContext | |
Static Public Attributes | |
static UHalign | left |
static UHalign | right |
static UHalign | flex |
static UHalign | center |
Friends | |
UHalign & | uhalign (const UHalign &) |
UHalign & | uleft () |
UHalign & | uright () |
children following uleft() or uright() are laid out sequentially. | |
UHalign & | uhcenter () |
children following uhcenter() are centered. | |
UHalign & | uhflex () |
children following uhflex() have a "flexible" horizontal layout. |
specify the horizontal layout of the children that *follow* this brick. Possible values: UHalign::left, right, center, flex. Shortcut functions uleft(), uright(), uhcenter(), uhflex() can be used to improve source code readability.
Example:
uhbox( uleft() + ch1 + ch2 + uvflex() + ch3 + ch4 + uright() + ch5 )uleft() specifies the layout of ch1 and ch2, uhflex() the layout of ch3 and ch4 and uright() the layout of ch5.
UHalign& uhcenter | ( | ) | [friend] |
children following uhcenter() are centered.
uhcenter has no effect on children width (in contrast with uhflex()). uhcenter has the same effect as uleft if uhflex() appears in the same child list
UHalign& uhflex | ( | ) | [friend] |
children following uhflex() have a "flexible" horizontal layout.
these children will occupy the remaining space and will be resized (in the horizontal direction) when their parents are resized. These rules dont apply for children that are NOT resizable (see UWidth::resizable())