本文整理汇总了C++中LLTextEditor::setFocus方法的典型用法代码示例。如果您正苦于以下问题:C++ LLTextEditor::setFocus方法的具体用法?C++ LLTextEditor::setFocus怎么用?C++ LLTextEditor::setFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLTextEditor
的用法示例。
在下文中一共展示了LLTextEditor::setFocus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: postBuild
BOOL LLFloaterTOS::postBuild()
{
childSetAction("Continue", onContinue, this);
childSetAction("Cancel", onCancel, this);
childSetCommitCallback("agree_chk", updateAgree, this);
if ( mType != TOS_TOS )
{
// this displays the critical message
LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
editor->setHandleEditKeysDirectly( TRUE );
editor->setEnabled( FALSE );
editor->setWordWrap(TRUE);
editor->setFocus(TRUE);
editor->setValue(LLSD(mMessage));
return TRUE;
}
// disable Agree to TOS radio button until the page has fully loaded
LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
tos_agreement->setEnabled( false );
// hide the SL text widget if we're displaying TOS with using a browser widget.
LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
editor->setVisible( FALSE );
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html");
bool use_web_browser = false;
//Check to see if the message is a link to display
std::string token = "http://";
std::string::size_type iIndex = mMessage.rfind(token);
//IF it has http:// in it, we use the web browser
if(iIndex != std::string::npos && mMessage.length() >= 2)
{
// it exists
use_web_browser = true;
}
else if (gHippoGridManager->getConnectedGrid()->isSecondLife())
{
//Its SL, use the browser for it as thats what it should do
use_web_browser = true;
}
if ( web_browser && use_web_browser)
{
web_browser->addObserver(this);
gResponsePtr = LLIamHere::build( this );
LLHTTPClient::get( getString( "real_url" ), gResponsePtr );
}
return TRUE;
}
示例2: postBuild
BOOL LLFloaterTOS::postBuild()
{
childSetAction("Continue", onContinue, this);
childSetAction("Cancel", onCancel, this);
childSetCommitCallback("agree_chk", updateAgree, this);
if ( mType != TOS_TOS )
{
llinfos << "tos_type != TOS_TOS" << llendl;
// this displays the critical message
LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
editor->setHandleEditKeysDirectly( TRUE );
editor->setEnabled( FALSE );
editor->setWordWrap(TRUE);
editor->setFocus(TRUE);
// editor->setValue(LLSD(mMessage));
editor->setValue(mMessage);
return TRUE;
}
// disable Agree to TOS radio button until the page has fully loaded
LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
tos_agreement->setEnabled( false );
// hide the SL text widget if we're displaying TOS with using a browser widget.
LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
editor->setVisible(FALSE);
LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html");
if ( web_browser )
{
// start to observe it so we see navigate complete events
web_browser->addObserver( this );
gResponsePtr = LLIamHereTOS::build( this );
LLHTTPClient::head( getString( "real_url" ), gResponsePtr );
}
return TRUE;
}