diff options
author | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
commit | 117e22047c5752352342d64e3fb7ce00a4eb8113 (patch) | |
tree | e32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/llui/llradiogroup.h | |
parent | Second Life viewer sources 1.18.0.6 (diff) | |
download | meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2 meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz |
Second Life viewer sources 1.18.1.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/llradiogroup.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/linden/indra/llui/llradiogroup.h b/linden/indra/llui/llradiogroup.h index 0cd5901..3dec41d 100644 --- a/linden/indra/llui/llradiogroup.h +++ b/linden/indra/llui/llradiogroup.h | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include "lluictrl.h" | 36 | #include "lluictrl.h" |
37 | #include "llcheckboxctrl.h" | 37 | #include "llcheckboxctrl.h" |
38 | #include "llctrlselectioninterface.h" | ||
38 | 39 | ||
39 | class LLFontGL; | 40 | class LLFontGL; |
40 | 41 | ||
@@ -52,7 +53,7 @@ public: | |||
52 | }; | 53 | }; |
53 | 54 | ||
54 | class LLRadioGroup | 55 | class LLRadioGroup |
55 | : public LLUICtrl | 56 | : public LLUICtrl, public LLCtrlSelectionInterface |
56 | { | 57 | { |
57 | public: | 58 | public: |
58 | // Build a radio group. The number (0...n-1) of the currently selected | 59 | // Build a radio group. The number (0...n-1) of the currently selected |
@@ -83,7 +84,6 @@ public: | |||
83 | static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); | 84 | static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); |
84 | void setIndexEnabled(S32 index, BOOL enabled); | 85 | void setIndexEnabled(S32 index, BOOL enabled); |
85 | 86 | ||
86 | S32 getItemCount() { return mRadioButtons.size(); } | ||
87 | // return the index value of the selected item | 87 | // return the index value of the selected item |
88 | S32 getSelectedIndex() const; | 88 | S32 getSelectedIndex() const; |
89 | 89 | ||
@@ -107,6 +107,23 @@ public: | |||
107 | // button. | 107 | // button. |
108 | static void onClickButton(LLUICtrl* radio, void* userdata); | 108 | static void onClickButton(LLUICtrl* radio, void* userdata); |
109 | 109 | ||
110 | //======================================================================== | ||
111 | LLCtrlSelectionInterface* getSelectionInterface() { return (LLCtrlSelectionInterface*)this; }; | ||
112 | |||
113 | // LLCtrlSelectionInterface functions | ||
114 | /*virtual*/ S32 getItemCount() const { return mRadioButtons.size(); } | ||
115 | /*virtual*/ BOOL getCanSelect() const { return TRUE; } | ||
116 | /*virtual*/ BOOL selectFirstItem() { return setSelectedIndex(0); } | ||
117 | /*virtual*/ BOOL selectNthItem( S32 index ) { return setSelectedIndex(index); } | ||
118 | /*virtual*/ S32 getFirstSelectedIndex() { return getSelectedIndex(); } | ||
119 | /*virtual*/ BOOL setCurrentByID( const LLUUID& id ); | ||
120 | /*virtual*/ LLUUID getCurrentID(); // LLUUID::null if no items in menu | ||
121 | /*virtual*/ BOOL setSelectedByValue(LLSD value, BOOL selected); | ||
122 | /*virtual*/ LLSD getSimpleSelectedValue(); | ||
123 | /*virtual*/ BOOL isSelected(LLSD value); | ||
124 | /*virtual*/ BOOL operateOnSelection(EOperation op); | ||
125 | /*virtual*/ BOOL operateOnAll(EOperation op); | ||
126 | |||
110 | protected: | 127 | protected: |
111 | // protected function shared by the two constructors. | 128 | // protected function shared by the two constructors. |
112 | void init(BOOL border); | 129 | void init(BOOL border); |