ubit::UWidth Class Reference

Box Width Policy. More...

#include <uboxGeom.hpp>

Inheritance diagram for ubit::UWidth:

ubit::UProp ubit::UBrick ubit::UObject ubit::UWidthChooser List of all members.

Public Member Functions

 UWidth (float value=UNSPECIFIED)
 UWidth (const UWidth &)
 operator float () const
 type conversion: returns value.
UWidthoperator= (float v)
UWidthoperator= (const UFloat &v)
UWidthoperator= (const UWidth &v)
virtual void set (float)
virtual void set (const UWidth &)
bool operator== (float) const
bool operator== (const UWidth &) const
bool isResizable () const
UWidthresizable (bool state=true)
 specify whether the width of a UBox depends on its parents.
bool isAdjustable () const
UWidthadjustable (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
UWidthuwidth ()
UWidthuwidth (float v)
UWidthuwidth (const UWidth &v)
 shortcut function: uwidth(val) returns *new UWith(val).

Detailed Description

Box Width Policy.

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).


Member Function Documentation

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)


The documentation for this class was generated from the following files:
Generated on Mon Jan 29 00:20:44 2007 for Ubit by  doxygen 1.4.7