diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/llxml/llcontrol.h | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/llxml/llcontrol.h')
-rw-r--r-- | linden/indra/llxml/llcontrol.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/linden/indra/llxml/llcontrol.h b/linden/indra/llxml/llcontrol.h index 7b327ef..ba0a1c7 100644 --- a/linden/indra/llxml/llcontrol.h +++ b/linden/indra/llxml/llcontrol.h | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -38,6 +39,8 @@ | |||
38 | #include "llstring.h" | 39 | #include "llstring.h" |
39 | #include "llrect.h" | 40 | #include "llrect.h" |
40 | 41 | ||
42 | #include "llcontrolgroupreader.h" | ||
43 | |||
41 | #include <vector> | 44 | #include <vector> |
42 | 45 | ||
43 | // *NOTE: boost::visit_each<> generates warning 4675 on .net 2003 | 46 | // *NOTE: boost::visit_each<> generates warning 4675 on .net 2003 |
@@ -92,7 +95,8 @@ private: | |||
92 | std::string mName; | 95 | std::string mName; |
93 | std::string mComment; | 96 | std::string mComment; |
94 | eControlType mType; | 97 | eControlType mType; |
95 | bool mPersist; | 98 | bool mPersist; |
99 | bool mHideFromSettingsEditor; | ||
96 | std::vector<LLSD> mValues; | 100 | std::vector<LLSD> mValues; |
97 | 101 | ||
98 | signal_t mSignal; | 102 | signal_t mSignal; |
@@ -100,7 +104,7 @@ private: | |||
100 | public: | 104 | public: |
101 | LLControlVariable(const std::string& name, eControlType type, | 105 | LLControlVariable(const std::string& name, eControlType type, |
102 | LLSD initial, const std::string& comment, | 106 | LLSD initial, const std::string& comment, |
103 | bool persist = true); | 107 | bool persist = true, bool hidefromsettingseditor = false); |
104 | 108 | ||
105 | virtual ~LLControlVariable(); | 109 | virtual ~LLControlVariable(); |
106 | 110 | ||
@@ -117,6 +121,7 @@ public: | |||
117 | bool isDefault() { return (mValues.size() == 1); } | 121 | bool isDefault() { return (mValues.size() == 1); } |
118 | bool isSaveValueDefault(); | 122 | bool isSaveValueDefault(); |
119 | bool isPersisted() { return mPersist; } | 123 | bool isPersisted() { return mPersist; } |
124 | bool isHiddenFromSettingsEditor() { return mHideFromSettingsEditor; } | ||
120 | LLSD get() const { return getValue(); } | 125 | LLSD get() const { return getValue(); } |
121 | LLSD getValue() const { return mValues.back(); } | 126 | LLSD getValue() const { return mValues.back(); } |
122 | LLSD getDefault() const { return mValues.front(); } | 127 | LLSD getDefault() const { return mValues.front(); } |
@@ -126,6 +131,7 @@ public: | |||
126 | void setValue(const LLSD& value, bool saved_value = TRUE); | 131 | void setValue(const LLSD& value, bool saved_value = TRUE); |
127 | void setDefaultValue(const LLSD& value); | 132 | void setDefaultValue(const LLSD& value); |
128 | void setPersist(bool state); | 133 | void setPersist(bool state); |
134 | void setHiddenFromSettingsEditor(bool hide); | ||
129 | void setComment(const std::string& comment); | 135 | void setComment(const std::string& comment); |
130 | 136 | ||
131 | void firePropertyChanged() | 137 | void firePropertyChanged() |
@@ -139,7 +145,7 @@ private: | |||
139 | }; | 145 | }; |
140 | 146 | ||
141 | //const U32 STRING_CACHE_SIZE = 10000; | 147 | //const U32 STRING_CACHE_SIZE = 10000; |
142 | class LLControlGroup | 148 | class LLControlGroup : public LLControlGroupReader |
143 | { | 149 | { |
144 | protected: | 150 | protected: |
145 | typedef std::map<std::string, LLPointer<LLControlVariable> > ctrl_name_table_t; | 151 | typedef std::map<std::string, LLPointer<LLControlVariable> > ctrl_name_table_t; |
@@ -163,7 +169,7 @@ public: | |||
163 | }; | 169 | }; |
164 | void applyToAll(ApplyFunctor* func); | 170 | void applyToAll(ApplyFunctor* func); |
165 | 171 | ||
166 | BOOL declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist); | 172 | BOOL declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor = FALSE); |
167 | BOOL declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist = TRUE); | 173 | BOOL declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist = TRUE); |
168 | BOOL declareS32(const std::string& name, S32 initial_val, const std::string& comment, BOOL persist = TRUE); | 174 | BOOL declareS32(const std::string& name, S32 initial_val, const std::string& comment, BOOL persist = TRUE); |
169 | BOOL declareF32(const std::string& name, F32 initial_val, const std::string& comment, BOOL persist = TRUE); | 175 | BOOL declareF32(const std::string& name, F32 initial_val, const std::string& comment, BOOL persist = TRUE); |