ubit::USlider Class Reference

Slider widget. More...

#include <uslider.hpp>

Inheritance diagram for ubit::USlider:

ubit::UBox ubit::UGroup ubit::UControl ubit::UBrick ubit::UObject List of all members.

Public Member Functions

 USlider (const UArgs &=UArgs::none)
 creates a new slider.
 USlider (UFloat &value, const UArgs &=UArgs::none)
 creates a new slider with a model value.
bool isVertical () const
bool isHorizontal () const
float getValue () const
 returns the current value (a float between 0 and 100).
USlidersetValue (float val)
 changes the current value (a float between 0 and 100).
UFloatvalue ()
 return the internal value model.
virtual UBoxcreateKnob ()
 [impl] creates the knob; may be redefined by subclasses.
virtual UBoxcreateRail ()
 [impl] creates the rail; may be redefined by subclasses.

Static Public Member Functions

static UStylecreateStyle ()
 < important: all subclasses MUST contain this declaration. static function that returns the UStyle of this class (see details!).
static USliderStyle * createSliderStyle ()

Protected Member Functions

void constructs ()
virtual void gotoPos (UMouseEvent &)
virtual void actionCB (UEvent &)
virtual void changeCB (UEvent &)

Protected Attributes

uptr< UFloatpvalue
uptr< UBoxprail
uptr< UBoxpknob
uptr< UPospknob_pos
uptr< UPosChooserpknob_chooser

Friends

USlideruslider (const UArgs &a=UArgs::none)
 shortcut that creates a new slider (that is horizontal by default).
USlideruslider (UFloat &value, const UArgs &a=UArgs::none)
 shortcut that creates a new slider (that is horizontal by default) with a model value.
USlideruhslider (const UArgs &a=UArgs::none)
 shortcut that creates a new horizontal slider
USlideruvslider (const UArgs &a=UArgs::none)
 shortcut that creates a new vertical slider

Detailed Description

Slider widget.

the value is a percentage in the range [0., 100.]

Geometry:

Callbacks


Constructor & Destructor Documentation

ubit::USlider::USlider ( const UArgs = UArgs::none  ) 

creates a new slider.

Default orientation is horizontal. new USlider(UOrient::vertical) creates a vertical slider. The slider's value is in the range [0., 100.]

ubit::USlider::USlider ( UFloat value,
const UArgs = UArgs::none 
)

creates a new slider with a model value.

the slider is synchronized with this value. Several widgets (eg. sliders) that share the same value are synchronized. Default orientation is horizontal. new USlider(value, UOrient::vertical) creates a vertical slider. The slider's value is in the range [0., 100.]


Member Function Documentation

static UStyle* ubit::USlider::createStyle (  )  [static]

< important: all subclasses MUST contain this declaration. static function that returns the UStyle of this class (see details!).

this macro defines the UClass that corresponds to this class and:

Reimplemented from ubit::UBox.

USlider& ubit::USlider::setValue ( float  val  ) 

changes the current value (a float between 0 and 100).

UOn::change and UOn::action callbacks are fired when the value is changed (see class USlider).

UFloat& ubit::USlider::value (  ) 

return the internal value model.

UOn::change and UOn::action callbacks are fired when the value is changed (see class USlider). this object can be shared but can't be deleted.


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