#include <uboxGeom.hpp>
Inheritance diagram for ubit::UWidth:
Public Member Functions | |
UWidth (float value=UNSPECIFIED) | |
UWidth (const UWidth &) | |
operator float () const | |
type conversion: returns value. | |
UWidth & | operator= (float v) |
UWidth & | operator= (const UFloat &v) |
UWidth & | operator= (const UWidth &v) |
virtual void | set (float) |
virtual void | set (const UWidth &) |
bool | operator== (float) const |
bool | operator== (const UWidth &) const |
bool | isResizable () const |
UWidth & | resizable (bool state=true) |
specify whether the width of a UBox depends on its parents. | |
bool | isAdjustable () const |
UWidth & | adjustable (bool=true) |
specify whether the width of a UBox depends on its content. | |
virtual void | update () |
updates parents graphics. | |
virtual void | putProp (UContext *, UControl *) |
[impl] changes corresponding value in the UContext | |
Static Public Attributes | |
static const int | UNSPECIFIED = -1 |
Protected Attributes | |
float | def_value |
float | actual_value |
bool | is_resizable |
bool | is_adjustable |
Friends | |
class | UViewLayoutImpl |
UWidth & | uwidth () |
UWidth & | uwidth (float v) |
UWidth & | uwidth (const UWidth &v) |
shortcut function: uwidth(val) returns *new UWith(val). |
specifies the width policy of the box(es) that contain(s) this property. By default, the box(ex) is(are) resizable() but not adjustable().
This property can be added to the attribute list of one or several containers that derive from UBox. It can also be inserted in the beginning of their child list (see UProp).
UWidth & ubit::UWidth::adjustable | ( | bool | = true |
) |
specify whether the width of a UBox depends on its content.
adjustable(true) means that the width of the UBox containers controlled by this property is automatically adjusted when their content changes (ie. when children are resized, removed, added).
adjustable(false) prevents this behavior. In this case, the width is determined the first time they appear on the screen and won't change afterwards
UWidth & ubit::UWidth::resizable | ( | bool | state = true |
) |
specify whether the width of a UBox depends on its parents.
resizable(true) means that the width of the UBox containers controlled by this property may be changed when their parents are resized (see uflex() for details)
resizable(false) prevents this behavior. Hovewer, it does not prevent width changes when the UScale is modified (even if this scale property belongs to a parent or a descendant, because scale is inherited)