Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::GuiSlider< Value > Class Template Reference

Slider. More...

#include <GuiSlider.h>

Inherits G3D::_GuiSliderBase.

List of all members.

Public Member Functions

const GuiCaptioncaption () const
bool enabled () const
bool focused () const
Value maxValue () const
Value minValue () const
bool mouseOver () const
void moveBy (float dx, float dy)
void moveBy (const Vector2 &delta)
void moveRightOf (const GuiControl *control)
const Rect2Drect () const
void setCaption (const GuiCaption &text)
void setEnabled (bool e)
void setFocused (bool b)
void setHeight (float h)
void setPosition (float x, float y)
void setPosition (const Vector2 &v)
virtual void setRect (const Rect2D &rect)
void setSize (float x, float y)
void setSize (const Vector2 &v)
void setVisible (bool b)
void setWidth (float w)
GuiSkinRef skin () const
bool visible () const

Protected Member Functions

void fireActionEvent ()
float floatValue () const
 GuiSlider (GuiWindow *gui, GuiPane *parent, const GuiCaption &text, const Pointer< Value > &value, Value minValue, Value maxValue, bool horizontal)
virtual bool onEvent (const GEvent &event)
virtual void render (RenderDevice *rd, const GuiSkinRef &skin) const
void setFloatValue (float f)

Protected Attributes

GuiCaption m_caption
Rect2D m_clickRect
Vector2 m_dragStart
float m_dragStartValue
bool m_enabled
GuiWindowm_gui
bool m_horizontal
bool m_inDrag
Value m_maxValue
Value m_minValue
GuiPanem_parent
Rect2D m_rect
Pointer< Value > m_value
bool m_visible

Friends

class GuiPane
class GuiWindow


Detailed Description

template<class Value>
class G3D::GuiSlider< Value >

Slider.

See GuiWindow for an example of creating a slider.


Constructor & Destructor Documentation

template<class Value>
G3D::GuiSlider< Value >::GuiSlider ( GuiWindow gui,
GuiPane parent,
const GuiCaption text,
const Pointer< Value > &  value,
Value  minValue,
Value  maxValue,
bool  horizontal 
) [inline, protected]


Member Function Documentation

const GuiCaption& G3D::GuiControl::caption (  )  const [inherited]

bool G3D::GuiControl::enabled (  )  const [inherited]

void G3D::GuiControl::fireActionEvent (  )  [protected, inherited]

Fires an action event.

template<class Value>
float G3D::GuiSlider< Value >::floatValue (  )  const [inline, protected, virtual]

Get value on the range 0 - 1.

Implements G3D::_GuiSliderBase.

bool G3D::GuiControl::focused (  )  const [inherited]

template<class Value>
Value G3D::GuiSlider< Value >::maxValue (  )  const [inline]

template<class Value>
Value G3D::GuiSlider< Value >::minValue (  )  const [inline]

bool G3D::GuiControl::mouseOver (  )  const [inherited]

void G3D::GuiControl::moveBy ( float  dx,
float  dy 
) [inherited]

void G3D::GuiControl::moveBy ( const Vector2 delta  )  [inherited]

void G3D::GuiControl::moveRightOf ( const GuiControl control  )  [inherited]

If these two controls have the same parent, move this one immediately to the right of the argument.

virtual bool G3D::_GuiSliderBase::onEvent ( const GEvent event  )  [protected, virtual, inherited]

Events are only delivered to a control when the control that control has the key focus (which is transferred during a mouse down).

Reimplemented from G3D::GuiControl.

const Rect2D& G3D::GuiControl::rect (  )  const [inherited]

virtual void G3D::_GuiSliderBase::render ( RenderDevice rd,
const GuiSkinRef skin 
) const [protected, virtual, inherited]

Implements G3D::GuiControl.

void G3D::GuiControl::setCaption ( const GuiCaption text  )  [inherited]

void G3D::GuiControl::setEnabled ( bool  e  )  [inherited]

template<class Value>
void G3D::GuiSlider< Value >::setFloatValue ( float  f  )  [inline, protected, virtual]

Set value on the range 0 - 1.

Implements G3D::_GuiSliderBase.

void G3D::GuiControl::setFocused ( bool  b  )  [inherited]

Grab or release keyboard focus.

void G3D::GuiControl::setHeight ( float  h  )  [inherited]

void G3D::GuiControl::setPosition ( float  x,
float  y 
) [inherited]

void G3D::GuiControl::setPosition ( const Vector2 v  )  [inherited]

virtual void G3D::GuiControl::setRect ( const Rect2D rect  )  [virtual, inherited]

If you explicitly change the rectangle of a control, the containing pane may clip its borders.

Call pack() on the containing pane (or window) to resize that container appropriately.

Reimplemented in G3D::GuiCheckBox, G3D::GuiDropDownList, G3D::GuiPane, G3D::GuiRadioButton, and G3D::GuiTextBox.

void G3D::GuiControl::setSize ( float  x,
float  y 
) [inherited]

void G3D::GuiControl::setSize ( const Vector2 v  )  [inherited]

void G3D::GuiControl::setVisible ( bool  b  )  [inherited]

void G3D::GuiControl::setWidth ( float  w  )  [inherited]

GuiSkinRef G3D::GuiControl::skin (  )  const [inherited]

bool G3D::GuiControl::visible (  )  const [inherited]


Friends And Related Function Documentation

template<class Value>
friend class GuiPane [friend]

Reimplemented from G3D::_GuiSliderBase.

template<class Value>
friend class GuiWindow [friend]

Reimplemented from G3D::GuiControl.


Member Data Documentation

GuiCaption G3D::GuiControl::m_caption [protected, inherited]

Rect2D G3D::GuiControl::m_clickRect [protected, inherited]

Rect bounds used for mouse actions.

Updated by setRect.

Vector2 G3D::_GuiSliderBase::m_dragStart [protected, inherited]

Position from which the mouse drag started, relative to m_gui.m_clientRect.

When dragging the thumb, the cursor may not be centered on the thumb the way it is when the mouse clicks on the track.

float G3D::_GuiSliderBase::m_dragStartValue [protected, inherited]

bool G3D::GuiControl::m_enabled [protected, inherited]

GuiWindow* G3D::GuiControl::m_gui [protected, inherited]

The window that ultimately contains this control.

bool G3D::_GuiSliderBase::m_horizontal [protected, inherited]

bool G3D::_GuiSliderBase::m_inDrag [protected, inherited]

template<class Value>
Value G3D::GuiSlider< Value >::m_maxValue [protected]

template<class Value>
Value G3D::GuiSlider< Value >::m_minValue [protected]

GuiPane* G3D::GuiControl::m_parent [protected, inherited]

Parent pane.

Rect2D G3D::GuiControl::m_rect [protected, inherited]

Rect bounds used for rendering and layout.

Relative to the enclosing pane's clientRect.

template<class Value>
Pointer<Value> G3D::GuiSlider< Value >::m_value [protected]

bool G3D::GuiControl::m_visible [protected, inherited]


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:46 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo