diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llui/llslider.h | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2 meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz |
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llui/llslider.h')
-rw-r--r-- | linden/indra/llui/llslider.h | 19 |
1 files changed, 8 insertions, 11 deletions
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 @@ | |||
35 | #include "lluictrl.h" | 35 | #include "lluictrl.h" |
36 | #include "v4color.h" | 36 | #include "v4color.h" |
37 | 37 | ||
38 | class LLUICtrlFactory; | ||
39 | class LLImageGL; | 38 | class LLImageGL; |
40 | 39 | ||
41 | class LLSlider : public LLUICtrl | 40 | class LLSlider : public LLUICtrl |
@@ -50,16 +49,16 @@ public: | |||
50 | F32 min_value, | 49 | F32 min_value, |
51 | F32 max_value, | 50 | F32 max_value, |
52 | F32 increment, | 51 | F32 increment, |
53 | BOOL volume, | 52 | BOOL volume, //TODO: create a "volume" slider sub-class or just use image art, no? -MG |
54 | const LLString& control_name = LLString::null ); | 53 | const LLString& control_name = LLString::null ); |
55 | 54 | ||
56 | virtual EWidgetType getWidgetType() const; | 55 | virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SLIDER_BAR; } |
57 | virtual LLString getWidgetTag() const; | 56 | virtual LLString getWidgetTag() const { return LL_SLIDER_TAG; } |
58 | virtual LLXMLNodePtr getXML(bool save_children = true) const; | 57 | virtual LLXMLNodePtr getXML(bool save_children = true) const; |
59 | static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); | 58 | static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); |
60 | 59 | ||
61 | void setValue( F32 value, BOOL from_event = FALSE ); | 60 | void setValue( F32 value, BOOL from_event = FALSE ); |
62 | F32 getValueF32() const; | 61 | F32 getValueF32() const { return mValue; } |
63 | 62 | ||
64 | virtual void setValue(const LLSD& value ) { setValue((F32)value.asReal(), TRUE); } | 63 | virtual void setValue(const LLSD& value ) { setValue((F32)value.asReal(), TRUE); } |
65 | virtual LLSD getValue() const { return LLSD(getValueF32()); } | 64 | virtual LLSD getValue() const { return LLSD(getValueF32()); } |
@@ -71,9 +70,8 @@ public: | |||
71 | F32 getMinValue() const { return mMinValue; } | 70 | F32 getMinValue() const { return mMinValue; } |
72 | F32 getMaxValue() const { return mMaxValue; } | 71 | F32 getMaxValue() const { return mMaxValue; } |
73 | F32 getIncrement() const { return mIncrement; } | 72 | F32 getIncrement() const { return mIncrement; } |
74 | BOOL getVolumeSlider() const { return mVolumeSlider; } | 73 | void setMinValue(F32 min_value) {mMinValue = min_value; updateThumbRect(); } |
75 | void setMinValue(F32 min_value) {mMinValue = min_value;} | 74 | void setMaxValue(F32 max_value) {mMaxValue = max_value; updateThumbRect(); } |
76 | void setMaxValue(F32 max_value) {mMaxValue = max_value;} | ||
77 | void setIncrement(F32 increment) {mIncrement = increment;} | 75 | void setIncrement(F32 increment) {mIncrement = increment;} |
78 | void setMouseDownCallback( void (*cb)(LLUICtrl* ctrl, void* userdata) ) { mMouseDownCallback = cb; } | 76 | void setMouseDownCallback( void (*cb)(LLUICtrl* ctrl, void* userdata) ) { mMouseDownCallback = cb; } |
79 | void setMouseUpCallback( void (*cb)(LLUICtrl* ctrl, void* userdata) ) { mMouseUpCallback = cb; } | 77 | void setMouseUpCallback( void (*cb)(LLUICtrl* ctrl, void* userdata) ) { mMouseUpCallback = cb; } |
@@ -84,11 +82,10 @@ public: | |||
84 | virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); | 82 | virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); |
85 | virtual void draw(); | 83 | virtual void draw(); |
86 | 84 | ||
87 | protected: | 85 | private: |
88 | void setValueAndCommit(F32 value); | 86 | void setValueAndCommit(F32 value); |
89 | void updateThumbRect(); | 87 | void updateThumbRect(); |
90 | 88 | ||
91 | protected: | ||
92 | F32 mValue; | 89 | F32 mValue; |
93 | F32 mInitialValue; | 90 | F32 mInitialValue; |
94 | F32 mMinValue; | 91 | F32 mMinValue; |