diff options
Diffstat (limited to 'indra/llxml/llcontrol.h')
-rw-r--r-- | indra/llxml/llcontrol.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index e402061e1f..9a3a40e476 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -92,11 +92,13 @@ typedef enum e_control_type class LLControlVariable : public LLRefCount { + LOG_CLASS(LLControlVariable); + friend class LLControlGroup; public: typedef boost::signals2::signal<bool(LLControlVariable* control, const LLSD&), boost_boolean_combiner> validate_signal_t; - typedef boost::signals2::signal<void(LLControlVariable* control, const LLSD&)> commit_signal_t; + typedef boost::signals2::signal<void(LLControlVariable* control, const LLSD&, const LLSD&)> commit_signal_t; private: std::string mName; @@ -144,11 +146,11 @@ public: void setHiddenFromSettingsEditor(bool hide); void setComment(const std::string& comment); - void firePropertyChanged() +private: + void firePropertyChanged(const LLSD &pPreviousValue) { - mCommitSignal(this, mValues.back()); + mCommitSignal(this, mValues.back(), pPreviousValue); } -private: LLSD getComparableValue(const LLSD& value); bool llsd_compare(const LLSD& a, const LLSD & b); }; @@ -180,14 +182,17 @@ T convert_from_llsd(const LLSD& sd, eControlType type, const std::string& contro //const U32 STRING_CACHE_SIZE = 10000; class LLControlGroup : public LLInstanceTracker<LLControlGroup, std::string> { + LOG_CLASS(LLControlGroup); + protected: typedef std::map<std::string, LLControlVariablePtr > ctrl_name_table_t; ctrl_name_table_t mNameTable; std::string mTypeString[TYPE_COUNT]; +public: eControlType typeStringToEnum(const std::string& typestr); std::string typeEnumToString(eControlType typeenum); -public: + LLControlGroup(const std::string& name); ~LLControlGroup(); void cleanup(); @@ -385,7 +390,8 @@ class LLCachedControl { public: LLCachedControl(LLControlGroup& group, - const std::string& name, + const std::string& name, + const T& default_value, const std::string& comment = "Declared In Code") { |