本文整理汇总了C++中LLFloaterIMPanel::setFocus方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloaterIMPanel::setFocus方法的具体用法?C++ LLFloaterIMPanel::setFocus怎么用?C++ LLFloaterIMPanel::setFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFloaterIMPanel
的用法示例。
在下文中一共展示了LLFloaterIMPanel::setFocus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createFloater
// create a floater and update internal representation for
// consistency. Returns the pointer, caller (the class instance since
// it is a private method) is not responsible for deleting the
// pointer. Add the floater to this but do not select it.
LLFloaterIMPanel* LLIMMgr::createFloater(
const LLUUID& session_id,
const LLUUID& other_participant_id,
const std::string& session_label,
const EInstantMessage& dialog,
const std::vector<LLUUID>& ids,
bool user_initiated)
{
if (session_id.isNull())
{
LL_WARNS() << "Creating LLFloaterIMPanel with null session ID" << LL_ENDL;
}
LL_INFOS() << "LLIMMgr::createFloater: from " << other_participant_id
<< " in session " << session_id << LL_ENDL;
LLFloaterIMPanel* floater = new LLFloaterIMPanel(session_label, session_id, other_participant_id, dialog, ids);
LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END;
LLFloaterChatterBox::getInstance(LLSD())->addFloater(floater, FALSE, i_pt);
static LLCachedControl<bool> tear_off("OtherChatsTornOff");
if (tear_off)
{
LLFloaterChatterBox::getInstance(LLSD())->removeFloater(floater); // removal sets up relationship for re-attach
gFloaterView->addChild(floater); // reparent to floater view
LLFloater* focused_floater = gFloaterView->getFocusedFloater(); // obtain the focused floater
floater->open(); // make the new chat floater appear
static LLCachedControl<bool> minimize("OtherChatsTornOffAndMinimized");
if (focused_floater != NULL) // there was a focused floater
{
floater->setMinimized(minimize); // so minimize this one, for now, if desired
focused_floater->setFocus(true); // and work around focus being removed by focusing on the last
}
else if (minimize)
{
floater->setFocus(false); // work around focus being granted to new floater
floater->setMinimized(true);
}
}
mFloaters.insert(floater->getHandle());
return floater;
}