#include <llslider.h>
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 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 |
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) |
virtual void | draw () |
Static Public Member Functions | |
static LLView * | fromXML (LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory) |
Private Member Functions | |
void | setValueAndCommit (F32 value) |
void | updateThumbRect () |
Private Attributes | |
F32 | mValue |
F32 | mInitialValue |
F32 | mMinValue |
F32 | mMaxValue |
F32 | mIncrement |
BOOL | mVolumeSlider |
S32 | mMouseOffset |
LLRect | mDragStartThumbRect |
LLUIImage * | mThumbImage |
LLUIImage * | mTrackImage |
LLUIImage * | mTrackHighlightImage |
LLRect | mThumbRect |
LLColor4 | mTrackColor |
LLColor4 | mThumbOutlineColor |
LLColor4 | mThumbCenterColor |
void(* | mMouseDownCallback )(LLUICtrl *ctrl, void *userdata) |
void(* | mMouseUpCallback )(LLUICtrl *ctrl, void *userdata) |
Definition at line 40 of file llslider.h.
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 48 of file llslider.cpp.
References LLImageProviderInterface::getUIImage(), getValueF32(), mDragStartThumbRect, mThumbImage, mThumbRect, mTrackHighlightImage, mTrackImage, NULL, LLView::setControlName(), setValue(), LLUI::sImageProvider, and updateThumbRect().
Referenced by fromXML().
LLXMLNodePtr LLSlider::getXML | ( | bool | save_children = true |
) | const [virtual] |
Reimplemented from LLUICtrl.
Definition at line 289 of file llslider.cpp.
References getIncrement(), getInitialValue(), getMaxValue(), getMinValue(), LLUICtrl::getXML(), mVolumeSlider, and TRUE.
LLView * LLSlider::fromXML | ( | LLXMLNodePtr | node, | |
LLView * | parent, | |||
class LLUICtrlFactory * | factory | |||
) | [static] |
Reimplemented from LLUICtrl.
Definition at line 304 of file llslider.cpp.
References LLView::createRect(), FALSE, LLUICtrl::initFromXML(), LLSlider(), NULL, and TRUE.
Definition at line 90 of file llslider.cpp.
References llclamp(), mIncrement, mMaxValue, mMinValue, mValue, LLView::setControlValue(), and updateThumbRect().
Referenced by LLSlider(), LLPanelVoiceDeviceSettings::postBuild(), LLSliderCtrl::setValue(), setValue(), and setValueAndCommit().
F32 LLSlider::getValueF32 | ( | ) | const [inline] |
Definition at line 59 of file llslider.h.
References mValue.
Referenced by getValue(), LLSliderCtrl::getValueF32(), handleKeyHere(), LLSlider(), and LLSliderCtrl::setValue().
virtual void LLSlider::setValue | ( | const LLSD & | value | ) | [inline, virtual] |
Reimplemented from LLView.
Definition at line 61 of file llslider.h.
References LLSD::asReal(), setValue(), and TRUE.
virtual LLSD LLSlider::getValue | ( | ) | const [inline, virtual] |
Reimplemented from LLUICtrl.
Definition at line 62 of file llslider.h.
References getValueF32().
Referenced by LLPanelVoiceDeviceSettings::refresh().
virtual void LLSlider::setMinValue | ( | LLSD | min_value | ) | [inline, virtual] |
Reimplemented from LLUICtrl.
Definition at line 64 of file llslider.h.
References LLSD::asReal().
Referenced by LLSliderCtrl::setMinValue().
virtual void LLSlider::setMaxValue | ( | LLSD | max_value | ) | [inline, virtual] |
Reimplemented from LLUICtrl.
Definition at line 65 of file llslider.h.
References LLSD::asReal().
Referenced by LLSliderCtrl::setMaxValue().
F32 LLSlider::getInitialValue | ( | ) | const [inline] |
Definition at line 67 of file llslider.h.
References mInitialValue.
Referenced by LLSliderCtrl::getXML(), and getXML().
F32 LLSlider::getMinValue | ( | ) | const [inline] |
Definition at line 68 of file llslider.h.
References mMinValue.
Referenced by LLSliderCtrl::getMinValue(), LLSliderCtrl::getXML(), and getXML().
F32 LLSlider::getMaxValue | ( | ) | const [inline] |
Definition at line 69 of file llslider.h.
References mMaxValue.
Referenced by LLSliderCtrl::getMaxValue(), LLSliderCtrl::getXML(), and getXML().
F32 LLSlider::getIncrement | ( | ) | const [inline] |
Definition at line 70 of file llslider.h.
References mIncrement.
Referenced by LLSliderCtrl::getXML(), getXML(), and handleKeyHere().
void LLSlider::setMinValue | ( | F32 | min_value | ) | [inline] |
Definition at line 71 of file llslider.h.
References mMinValue, and updateThumbRect().
void LLSlider::setMaxValue | ( | F32 | max_value | ) | [inline] |
Definition at line 72 of file llslider.h.
References mMaxValue, and updateThumbRect().
void LLSlider::setIncrement | ( | F32 | increment | ) | [inline] |
Definition at line 73 of file llslider.h.
References mIncrement.
Referenced by LLSliderCtrl::setIncrement().
void LLSlider::setMouseDownCallback | ( | void(*)(LLUICtrl *ctrl, void *userdata) | cb | ) | [inline] |
Definition at line 74 of file llslider.h.
References mMouseDownCallback.
Referenced by LLSliderCtrl::setSliderMouseDownCallback().
void LLSlider::setMouseUpCallback | ( | void(*)(LLUICtrl *ctrl, void *userdata) | cb | ) | [inline] |
Definition at line 75 of file llslider.h.
References mMouseUpCallback.
Referenced by LLSliderCtrl::setSliderMouseUpCallback().
Reimplemented from LLView.
Definition at line 138 of file llslider.cpp.
References LLView::getName(), LLView::getRect(), LLRectBase< Type >::getWidth(), LLUIImage::getWidth(), LLView::getWindow(), LLView::hasMouseCapture(), llclamp(), lldebugst, llendl, mMaxValue, mMinValue, mMouseOffset, mThumbImage, S32, LLWindow::setCursor(), setValueAndCommit(), TRUE, and UI_CURSOR_ARROW.
Reimplemented from LLView.
Definition at line 163 of file llslider.cpp.
References FALSE, gFocusMgr, LLView::hasMouseCapture(), make_ui_sound(), LLUICtrl::mCallbackUserData, mMouseUpCallback, NULL, LLFocusMgr::setMouseCapture(), and TRUE.
Reimplemented from LLView.
Definition at line 186 of file llslider.cpp.
References LLUICtrl::getIsChrome(), LLUIImage::getWidth(), gFocusMgr, make_ui_sound(), MASK_CONTROL, LLUICtrl::mCallbackUserData, mDragStartThumbRect, mInitialValue, LLRectBase< Type >::mLeft, mMouseDownCallback, mMouseOffset, mThumbImage, mThumbRect, LLRectBase< Type >::pointInRect(), LLUICtrl::setFocus(), LLFocusMgr::setMouseCapture(), setValueAndCommit(), and TRUE.
Reimplemented from LLView.
Definition at line 224 of file llslider.cpp.
References FALSE, getIncrement(), getValueF32(), KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, setValueAndCommit(), and TRUE.
void LLSlider::draw | ( | void | ) | [virtual] |
Reimplemented from LLView.
Definition at line 248 of file llslider.cpp.
References LLView::draw(), LLUIImage::draw(), LLUIImage::drawBorder(), LLRectBase< Type >::getCenterX(), LLRectBase< Type >::getCenterY(), LLView::getEnabled(), LLFocusMgr::getFocusColor(), LLFocusMgr::getFocusFlashWidth(), LLUIImage::getHeight(), LLView::getLocalRect(), LLView::getRect(), LLRectBase< Type >::getWidth(), LLUIImage::getWidth(), gFocusMgr, LLUICtrl::hasFocus(), LLView::hasMouseCapture(), LLRectBase< Type >::mBottom, mDragStartThumbRect, LLRectBase< Type >::mLeft, mThumbCenterColor, mThumbImage, mThumbOutlineColor, mThumbRect, LLRectBase< Type >::mTop, mTrackColor, mTrackHighlightImage, mTrackImage, and updateThumbRect().
void LLSlider::setValueAndCommit | ( | F32 | value | ) | [private] |
Definition at line 126 of file llslider.cpp.
References mValue, LLUICtrl::onCommit(), and setValue().
Referenced by handleHover(), handleKeyHere(), and handleMouseDown().
void LLSlider::updateThumbRect | ( | ) | [private] |
Definition at line 109 of file llslider.cpp.
References LLRectBase< Type >::getCenterY(), LLUIImage::getHeight(), LLView::getLocalRect(), LLView::getRect(), LLRectBase< Type >::getWidth(), LLUIImage::getWidth(), LLRectBase< Type >::mBottom, LLRectBase< Type >::mLeft, mMaxValue, mMinValue, LLRectBase< Type >::mRight, mThumbImage, mThumbRect, LLRectBase< Type >::mTop, mValue, and S32.
Referenced by draw(), LLSlider(), setMaxValue(), setMinValue(), and setValue().
F32 LLSlider::mValue [private] |
Definition at line 87 of file llslider.h.
Referenced by getValueF32(), setValue(), setValueAndCommit(), and updateThumbRect().
F32 LLSlider::mInitialValue [private] |
F32 LLSlider::mMinValue [private] |
Definition at line 89 of file llslider.h.
Referenced by getMinValue(), handleHover(), setMinValue(), setValue(), and updateThumbRect().
F32 LLSlider::mMaxValue [private] |
Definition at line 90 of file llslider.h.
Referenced by getMaxValue(), handleHover(), setMaxValue(), setValue(), and updateThumbRect().
F32 LLSlider::mIncrement [private] |
Definition at line 91 of file llslider.h.
Referenced by getIncrement(), setIncrement(), and setValue().
BOOL LLSlider::mVolumeSlider [private] |
S32 LLSlider::mMouseOffset [private] |
LLRect LLSlider::mDragStartThumbRect [private] |
LLUIImage* LLSlider::mThumbImage [private] |
Definition at line 97 of file llslider.h.
Referenced by draw(), handleHover(), handleMouseDown(), LLSlider(), and updateThumbRect().
LLUIImage* LLSlider::mTrackImage [private] |
LLUIImage* LLSlider::mTrackHighlightImage [private] |
LLRect LLSlider::mThumbRect [private] |
Definition at line 101 of file llslider.h.
Referenced by draw(), handleMouseDown(), LLSlider(), and updateThumbRect().
LLColor4 LLSlider::mTrackColor [private] |
LLColor4 LLSlider::mThumbOutlineColor [private] |
LLColor4 LLSlider::mThumbCenterColor [private] |
void(* LLSlider::mMouseDownCallback)(LLUICtrl *ctrl, void *userdata) [private] |
Referenced by handleMouseDown(), and setMouseDownCallback().
void(* LLSlider::mMouseUpCallback)(LLUICtrl *ctrl, void *userdata) [private] |
Referenced by handleMouseUp(), and setMouseUpCallback().