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

@@ -153,8 +153,8 @@ BOOL LLChatBar::postBuild()
{
mInputEditor->setCallbackUserData(this);
mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke);
mInputEditor->setFocusLostCallback(&onInputEditorFocusLost, this);
mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus, this );
mInputEditor->setFocusLostCallback(boost::bind(&LLChatBar::onInputEditorFocusLost));
mInputEditor->setFocusReceivedCallback(boost::bind(&LLChatBar::onInputEditorGainFocus));
mInputEditor->setCommitOnFocusLost( FALSE );
mInputEditor->setRevertOnEsc( FALSE );
mInputEditor->setIgnoreTab(TRUE);
@@ -623,14 +623,14 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata )
}
// static
void LLChatBar::onInputEditorFocusLost( LLFocusableElement* caller, void* userdata)
void LLChatBar::onInputEditorFocusLost()
{
// stop typing animation
gAgent.stopTyping();
}
// static
void LLChatBar::onInputEditorGainFocus( LLFocusableElement* caller, void* userdata )
void LLChatBar::onInputEditorGainFocus()
{
LLFloaterChat::setHistoryCursorAndScrollToEnd();
}