Updated LLFocusMgr to use boost::signals2 instead of vanilla function pointers. Also removed top-focus handling from lluictrl because it doesn't belong there.

This commit is contained in:
Shyotl
2012-02-18 01:58:02 -06:00
parent ae7b12f230
commit 1810a7c7f9
38 changed files with 298 additions and 316 deletions

View File

@@ -127,7 +127,7 @@ LLMultiSliderCtrl::LLMultiSliderCtrl(const std::string& name, const LLRect& rect
&LLLineEditor::prevalidateFloat );
mEditor->setFollowsLeft();
mEditor->setFollowsBottom();
mEditor->setFocusReceivedCallback( &LLMultiSliderCtrl::onEditorGainFocus, this );
mEditor->setFocusReceivedCallback( boost::bind(&LLMultiSliderCtrl::onFocusReceived, this) );
mEditor->setIgnoreTab(TRUE);
// don't do this, as selecting the entire text is single clicking in some cases
// and double clicking in others
@@ -151,16 +151,6 @@ LLMultiSliderCtrl::~LLMultiSliderCtrl()
// Children all cleaned up by default view destructor.
}
// static
void LLMultiSliderCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata )
{
LLMultiSliderCtrl* self = (LLMultiSliderCtrl*) userdata;
llassert( caller == self->mEditor );
self->onFocusReceived();
}
void LLMultiSliderCtrl::setValue(const LLSD& value)
{
mMultiSlider->setValue(value);