aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llradiogroup.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:04 -0500
committerJacek Antonelli2008-08-15 23:45:04 -0500
commit117e22047c5752352342d64e3fb7ce00a4eb8113 (patch)
treee32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/llui/llradiogroup.h
parentSecond Life viewer sources 1.18.0.6 (diff)
downloadmeta-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.h21
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
39class LLFontGL; 40class LLFontGL;
40 41
@@ -52,7 +53,7 @@ public:
52}; 53};
53 54
54class LLRadioGroup 55class LLRadioGroup
55: public LLUICtrl 56: public LLUICtrl, public LLCtrlSelectionInterface
56{ 57{
57public: 58public:
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
110protected: 127protected:
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);