diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-01 18:19:45 -0700 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-01 18:19:45 -0700 |
commit | dde2153014cd7d7b8fa704f7067a41344bfbb1c2 (patch) | |
tree | f7633ccef179644660897c8bf3684abeda3545f8 /indra/llui/lluictrl.cpp | |
parent | 9b8b0571645f8b607ecc24221c807cc02a03692f (diff) | |
parent | 85ea690d47208f6dda020c8ff81021179fbdd0b8 (diff) |
merge of latest lindenlab/svn-imports-viewer-20
Diffstat (limited to 'indra/llui/lluictrl.cpp')
-rw-r--r-- | indra/llui/lluictrl.cpp | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 8807e26f6b..fe99d9c267 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -114,7 +114,6 @@ void LLUICtrl::initFromParams(const Params& p) } setTabStop(p.tab_stop); - setFocusLostCallback(p.focus_lost_callback()); if (p.initial_value.isProvided() && !p.control_name.isProvided()) @@ -763,6 +762,27 @@ LLUICtrl* LLUICtrl::getParentUICtrl() const return NULL; } +bool LLUICtrl::findHelpTopic(std::string& help_topic_out) +{ + LLUICtrl* ctrl = this; + + // search back through the control's parents for a panel + // with a help_topic string defined + while (ctrl) + { + LLPanel *panel = dynamic_cast<LLPanel *>(ctrl); + if (panel && !panel->getHelpTopic().empty()) + { + help_topic_out = panel->getHelpTopic(); + return true; // success + } + + ctrl = ctrl->getParentUICtrl(); + } + + return false; // no help topic found +} + // *TODO: Deprecate; for backwards compatability only: boost::signals2::connection LLUICtrl::setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data) { @@ -800,14 +820,7 @@ namespace LLInitParam return false; } - template<> - bool ParamCompare<LLUICtrl::focus_callback_t>::equals( - const LLUICtrl::focus_callback_t &a, - const LLUICtrl::focus_callback_t &b) - { - return false; - } - + template<> bool ParamCompare<LLUICtrl::enable_callback_t>::equals( const LLUICtrl::enable_callback_t &a, |