From cd17687f01420952712a500107e0f93e7ab8d5f8 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:34 -0500 Subject: Second Life viewer sources 1.19.1.0 --- linden/indra/llui/llslider.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'linden/indra/llui/llslider.h') diff --git a/linden/indra/llui/llslider.h b/linden/indra/llui/llslider.h index 08ab600..506a6bd 100644 --- a/linden/indra/llui/llslider.h +++ b/linden/indra/llui/llslider.h @@ -35,7 +35,6 @@ #include "lluictrl.h" #include "v4color.h" -class LLUICtrlFactory; class LLImageGL; class LLSlider : public LLUICtrl @@ -50,16 +49,16 @@ public: F32 min_value, F32 max_value, F32 increment, - BOOL volume, + BOOL volume, //TODO: create a "volume" slider sub-class or just use image art, no? -MG const LLString& control_name = LLString::null ); - virtual EWidgetType getWidgetType() const; - virtual LLString getWidgetTag() const; + virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SLIDER_BAR; } + virtual LLString getWidgetTag() const { return LL_SLIDER_TAG; } virtual LLXMLNodePtr getXML(bool save_children = true) const; - static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); + static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); void setValue( F32 value, BOOL from_event = FALSE ); - F32 getValueF32() const; + F32 getValueF32() const { return mValue; } virtual void setValue(const LLSD& value ) { setValue((F32)value.asReal(), TRUE); } virtual LLSD getValue() const { return LLSD(getValueF32()); } @@ -71,9 +70,8 @@ public: F32 getMinValue() const { return mMinValue; } F32 getMaxValue() const { return mMaxValue; } F32 getIncrement() const { return mIncrement; } - BOOL getVolumeSlider() const { return mVolumeSlider; } - void setMinValue(F32 min_value) {mMinValue = min_value;} - void setMaxValue(F32 max_value) {mMaxValue = max_value;} + void setMinValue(F32 min_value) {mMinValue = min_value; updateThumbRect(); } + void setMaxValue(F32 max_value) {mMaxValue = max_value; updateThumbRect(); } void setIncrement(F32 increment) {mIncrement = increment;} void setMouseDownCallback( void (*cb)(LLUICtrl* ctrl, void* userdata) ) { mMouseDownCallback = cb; } void setMouseUpCallback( void (*cb)(LLUICtrl* ctrl, void* userdata) ) { mMouseUpCallback = cb; } @@ -84,11 +82,10 @@ public: virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); virtual void draw(); -protected: +private: void setValueAndCommit(F32 value); void updateThumbRect(); -protected: F32 mValue; F32 mInitialValue; F32 mMinValue; -- cgit v1.1