LLSlider Class Reference

#include <llslider.h>

Inheritance diagram for LLSlider:

Inheritance graph
[legend]
Collaboration diagram for LLSlider:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLSlider (const LLString &name, const LLRect &rect, void(*on_commit_callback)(LLUICtrl *ctrl, void *userdata), void *callback_userdata, F32 initial_value, F32 min_value, F32 max_value, F32 increment, BOOL volume, const LLString &control_name=LLString::null)
virtual EWidgetType getWidgetType () const
virtual LLString getWidgetTag () const
virtual LLXMLNodePtr getXML (bool save_children=true) const
void setValue (F32 value, BOOL from_event=FALSE)
F32 getValueF32 () const
virtual void setValue (const LLSD &value)
virtual LLSD getValue () const
virtual void setMinValue (LLSD min_value)
virtual void setMaxValue (LLSD max_value)
F32 getInitialValue () const
F32 getMinValue () const
F32 getMaxValue () const
F32 getIncrement () const
BOOL getVolumeSlider () const
void setMinValue (F32 min_value)
void setMaxValue (F32 max_value)
void setIncrement (F32 increment)
void setMouseDownCallback (void(*cb)(LLUICtrl *ctrl, void *userdata))
void setMouseUpCallback (void(*cb)(LLUICtrl *ctrl, void *userdata))
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleKeyHere (KEY key, MASK mask, BOOL called_from_parent)
virtual void draw ()

Static Public Member Functions

static LLViewfromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)

Protected Member Functions

void setValueAndCommit (F32 value)

Protected Attributes

F32 mValue
F32 mInitialValue
F32 mMinValue
F32 mMaxValue
F32 mIncrement
BOOL mVolumeSlider
S32 mMouseOffset
LLRect mDragStartThumbRect
LLRect mThumbRect
LLColor4 mTrackColor
LLColor4 mThumbOutlineColor
LLColor4 mThumbCenterColor
LLColor4 mDisabledThumbColor
void(* mMouseDownCallback )(LLUICtrl *ctrl, void *userdata)
void(* mMouseUpCallback )(LLUICtrl *ctrl, void *userdata)

Detailed Description

Definition at line 40 of file llslider.h.


Constructor & Destructor Documentation

LLSlider::LLSlider ( const LLString name,
const LLRect rect,
void(*)(LLUICtrl *ctrl, void *userdata)  on_commit_callback,
void callback_userdata,
F32  initial_value,
F32  min_value,
F32  max_value,
F32  increment,
BOOL  volume,
const LLString control_name = LLString::null 
)

Definition at line 47 of file llslider.cpp.

References getValueF32(), NULL, LLView::setControlName(), and setValue().

Referenced by fromXML().


Member Function Documentation

void LLSlider::draw (  )  [virtual]

Reimplemented from LLView.

Definition at line 250 of file llslider.cpp.

References LLView::draw(), f, FALSE, LLFocusMgr::getFocusColor(), LLFocusMgr::getFocusFlashAmt(), LLRectBase< Type >::getHeight(), LLImageProviderInterface::getUIImageByID(), LLView::getVisible(), LLRectBase< Type >::getWidth(), gFocusMgr, gl_draw_scaled_image_with_border(), gl_rect_2d(), gl_triangle_2d(), LLUICtrl::hasFocus(), LLView::hasMouseCapture(), lerp(), llround(), LLRectBase< Type >::mBottom, mDragStartThumbRect, LLView::mEnabled, LLRectBase< Type >::mLeft, LLView::mRect, mThumbCenterColor, mThumbOutlineColor, mThumbRect, mTrackColor, mVolumeSlider, NULL, S32, LLUI::sAssetsGroup, LLUUID::set(), LLUI::sImageProvider, LLRectBase< Type >::stretch(), TRACK_HEIGHT, and TRUE.

LLView * LLSlider::fromXML ( LLXMLNodePtr  node,
LLView parent,
LLUICtrlFactory factory 
) [static]

Definition at line 397 of file llslider.cpp.

References LLView::createRect(), FALSE, LLUICtrl::initFromXML(), LLSlider(), NULL, and TRUE.

F32 LLSlider::getIncrement (  )  const [inline]

Definition at line 72 of file llslider.h.

References mIncrement.

Referenced by LLSliderCtrl::getXML(), getXML(), and handleKeyHere().

F32 LLSlider::getInitialValue (  )  const [inline]

Definition at line 69 of file llslider.h.

References mInitialValue.

Referenced by LLSliderCtrl::getXML(), and getXML().

F32 LLSlider::getMaxValue (  )  const [inline]

Definition at line 71 of file llslider.h.

References mMaxValue.

Referenced by LLSliderCtrl::getMaxValue(), LLSliderCtrl::getXML(), and getXML().

F32 LLSlider::getMinValue (  )  const [inline]

Definition at line 70 of file llslider.h.

References mMinValue.

Referenced by LLSliderCtrl::getMinValue(), LLSliderCtrl::getXML(), and getXML().

virtual LLSD LLSlider::getValue (  )  const [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 64 of file llslider.h.

References getValueF32().

Referenced by LLPanelDeviceSettings::refresh().

F32 LLSlider::getValueF32 (  )  const

Definition at line 133 of file llslider.cpp.

References mValue.

Referenced by getValue(), LLSliderCtrl::getValueF32(), handleKeyHere(), LLSlider(), and LLSliderCtrl::setValue().

BOOL LLSlider::getVolumeSlider (  )  const [inline]

Definition at line 73 of file llslider.h.

References mVolumeSlider.

Referenced by getXML().

LLString LLSlider::getWidgetTag (  )  const [virtual]

Implements LLView.

Definition at line 89 of file llslider.cpp.

References LL_SLIDER_TAG.

EWidgetType LLSlider::getWidgetType (  )  const [virtual]

Implements LLView.

Definition at line 84 of file llslider.cpp.

References WIDGET_TYPE_SLIDER_BAR.

LLXMLNodePtr LLSlider::getXML ( bool  save_children = true  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 382 of file llslider.cpp.

References getIncrement(), getInitialValue(), getMaxValue(), getMinValue(), getVolumeSlider(), LLUICtrl::getXML(), and TRUE.

BOOL LLSlider::handleHover ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 138 of file llslider.cpp.

References LLView::getName(), LLRectBase< Type >::getWidth(), LLView::getWindow(), LLView::hasMouseCapture(), llclamp(), lldebugst, llendl, mMaxValue, mMinValue, mMouseOffset, LLView::mRect, S32, LLWindow::setCursor(), setValueAndCommit(), t, THUMB_WIDTH, TRUE, and UI_CURSOR_ARROW.

BOOL LLSlider::handleKeyHere ( KEY  key,
MASK  mask,
BOOL  called_from_parent 
) [virtual]

Reimplemented from LLView.

Definition at line 223 of file llslider.cpp.

References FALSE, getIncrement(), getValueF32(), LLView::getVisible(), KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, LLView::mEnabled, setValueAndCommit(), and TRUE.

BOOL LLSlider::handleMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 185 of file llslider.cpp.

References LLUICtrl::getIsChrome(), gFocusMgr, make_ui_sound(), MASK_CONTROL, LLUICtrl::mCallbackUserData, mDragStartThumbRect, mInitialValue, LLRectBase< Type >::mLeft, mMouseDownCallback, mMouseOffset, mThumbRect, LLRectBase< Type >::pointInRect(), LLUICtrl::setFocus(), LLFocusMgr::setMouseCapture(), setValueAndCommit(), THUMB_WIDTH, and TRUE.

BOOL LLSlider::handleMouseUp ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 162 of file llslider.cpp.

References FALSE, gFocusMgr, LLView::hasMouseCapture(), make_ui_sound(), LLUICtrl::mCallbackUserData, mMouseUpCallback, NULL, LLFocusMgr::setMouseCapture(), and TRUE.

void LLSlider::setIncrement ( F32  increment  )  [inline]

Definition at line 76 of file llslider.h.

References mIncrement.

Referenced by LLSliderCtrl::setIncrement().

void LLSlider::setMaxValue ( F32  max_value  )  [inline]

Definition at line 75 of file llslider.h.

References mMaxValue.

virtual void LLSlider::setMaxValue ( LLSD  max_value  )  [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 67 of file llslider.h.

References LLSD::asReal().

Referenced by LLSliderCtrl::setMaxValue().

void LLSlider::setMinValue ( F32  min_value  )  [inline]

Definition at line 74 of file llslider.h.

References mMinValue.

virtual void LLSlider::setMinValue ( LLSD  min_value  )  [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 66 of file llslider.h.

References LLSD::asReal().

Referenced by LLSliderCtrl::setMinValue().

void LLSlider::setMouseDownCallback ( void(*)(LLUICtrl *ctrl, void *userdata)  cb  )  [inline]

Definition at line 77 of file llslider.h.

References mMouseDownCallback.

Referenced by LLSliderCtrl::setSliderMouseDownCallback().

void LLSlider::setMouseUpCallback ( void(*)(LLUICtrl *ctrl, void *userdata)  cb  )  [inline]

Definition at line 78 of file llslider.h.

References mMouseUpCallback.

Referenced by LLSliderCtrl::setSliderMouseUpCallback().

virtual void LLSlider::setValue ( const LLSD value  )  [inline, virtual]

Reimplemented from LLView.

Definition at line 63 of file llslider.h.

References LLSD::asReal(), setValue(), and TRUE.

void LLSlider::setValue ( F32  value,
BOOL  from_event = FALSE 
)

Definition at line 94 of file llslider.cpp.

References LLRectBase< Type >::getWidth(), llclamp(), mIncrement, LLRectBase< Type >::mLeft, mMaxValue, mMinValue, LLView::mRect, LLRectBase< Type >::mRight, mThumbRect, mValue, S32, LLView::setControlValue(), t, THUMB_WIDTH, and x.

Referenced by LLSlider(), LLPanelDeviceSettings::postBuild(), LLSliderCtrl::setValue(), setValue(), and setValueAndCommit().

void LLSlider::setValueAndCommit ( F32  value  )  [protected]

Definition at line 121 of file llslider.cpp.

References mValue, LLUICtrl::onCommit(), and setValue().

Referenced by handleHover(), handleKeyHere(), and handleMouseDown().


Member Data Documentation

LLColor4 LLSlider::mDisabledThumbColor [protected]

Definition at line 104 of file llslider.h.

LLRect LLSlider::mDragStartThumbRect [protected]

Definition at line 98 of file llslider.h.

Referenced by draw(), and handleMouseDown().

F32 LLSlider::mIncrement [protected]

Definition at line 94 of file llslider.h.

Referenced by getIncrement(), setIncrement(), and setValue().

F32 LLSlider::mInitialValue [protected]

Definition at line 91 of file llslider.h.

Referenced by getInitialValue(), and handleMouseDown().

F32 LLSlider::mMaxValue [protected]

Definition at line 93 of file llslider.h.

Referenced by getMaxValue(), handleHover(), setMaxValue(), and setValue().

F32 LLSlider::mMinValue [protected]

Definition at line 92 of file llslider.h.

Referenced by getMinValue(), handleHover(), setMinValue(), and setValue().

void(* LLSlider::mMouseDownCallback)(LLUICtrl *ctrl, void *userdata) [protected]

Referenced by handleMouseDown(), and setMouseDownCallback().

S32 LLSlider::mMouseOffset [protected]

Definition at line 97 of file llslider.h.

Referenced by handleHover(), and handleMouseDown().

void(* LLSlider::mMouseUpCallback)(LLUICtrl *ctrl, void *userdata) [protected]

Referenced by handleMouseUp(), and setMouseUpCallback().

LLColor4 LLSlider::mThumbCenterColor [protected]

Definition at line 103 of file llslider.h.

Referenced by draw().

LLColor4 LLSlider::mThumbOutlineColor [protected]

Definition at line 102 of file llslider.h.

Referenced by draw().

LLRect LLSlider::mThumbRect [protected]

Definition at line 100 of file llslider.h.

Referenced by draw(), handleMouseDown(), and setValue().

LLColor4 LLSlider::mTrackColor [protected]

Definition at line 101 of file llslider.h.

Referenced by draw().

F32 LLSlider::mValue [protected]

Definition at line 90 of file llslider.h.

Referenced by getValueF32(), setValue(), and setValueAndCommit().

BOOL LLSlider::mVolumeSlider [protected]

Definition at line 96 of file llslider.h.

Referenced by draw(), and getVolumeSlider().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:46 2010 for Second Life Viewer by  doxygen 1.4.7