本文整理汇总了C++中LLFloaterIMPanel::setInputFocus方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloaterIMPanel::setInputFocus方法的具体用法?C++ LLFloaterIMPanel::setInputFocus怎么用?C++ LLFloaterIMPanel::setInputFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFloaterIMPanel
的用法示例。
在下文中一共展示了LLFloaterIMPanel::setInputFocus方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addSession
// Adds a session using the given session_id. If the session already exists
// the dialog type is assumed correct. Returns the uuid of the session.
LLUUID LLIMMgr::addSession(
const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id,
const LLDynamicArray<LLUUID>& ids)
{
if (0 == ids.getLength())
{
return LLUUID::null;
}
LLUUID session_id = computeSessionID(
dialog,
other_participant_id);
LLFloaterIMPanel* floater = findFloaterBySession(session_id);
if(!floater)
{
// On creation, use the first element of ids as the
// "other_participant_id"
floater = createFloater(
session_id,
other_participant_id,
name,
ids,
dialog,
TRUE);
if ( !floater ) return LLUUID::null;
noteOfflineUsers(floater, ids);
LLFloaterChatterBox::showInstance(session_id);
// Only warn for regular IMs - not group IMs
if( dialog == IM_NOTHING_SPECIAL )
{
noteMutedUsers(floater, ids);
}
}
else
{
floater->open();
}
//mTabContainer->selectTabPanel(panel);
floater->setInputFocus(TRUE);
return floater->getSessionID();
}
示例2: addSession
// This adds a session to the talk view. The name is the local name of
// the session, dialog specifies the type of session. If the session
// exists, it is brought forward. Specifying id = NULL results in an
// im session to everyone. Returns the uuid of the session.
LLUUID LLIMMgr::addSession(
const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id)
{
LLUUID session_id = computeSessionID(dialog, other_participant_id);
LLFloaterIMPanel* floater = findFloaterBySession(session_id);
if(!floater)
{
std::vector<LLUUID> ids;
ids.push_back(other_participant_id);
floater = createFloater(session_id, other_participant_id, name, dialog, ids, true);
noteOfflineUsers(floater, ids);
LLFloaterChatterBox::showInstance(session_id);
// Only warn for regular IMs - not group IMs
if( dialog == IM_NOTHING_SPECIAL )
{
noteMutedUsers(floater, ids);
}
static LLCachedControl<bool> tear_off("OtherChatsTornOff");
if(tear_off)
{
// removal sets up relationship for re-attach
LLFloaterChatterBox::getInstance(LLSD())->removeFloater(floater);
// reparent to floater view
gFloaterView->addChild(floater);
gFloaterView->bringToFront(floater);
}
else
LLFloaterChatterBox::getInstance(LLSD())->showFloater(floater);
}
else
{
floater->open();
}
//mTabContainer->selectTabPanel(panel);
if(gSavedSettings.getBOOL("PhoenixIMAnnounceStealFocus"))
{
floater->setInputFocus(TRUE);
}
return floater->getSessionID();
}
示例3: addSession
// This adds a session to the talk view. The name is the local name of
// the session, dialog specifies the type of session. If the session
// exists, it is brought forward. Specifying id = NULL results in an
// im session to everyone. Returns the uuid of the session.
LLUUID LLIMMgr::addSession(
const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id)
{
//lggtodo
LLUUID session_id = computeSessionID(dialog, other_participant_id);
LLFloaterIMPanel* floater = findFloaterBySession(session_id);
if(!floater)
{
LLDynamicArray<LLUUID> ids;
ids.put(other_participant_id);
floater = createFloater(
session_id,
other_participant_id,
name,
ids,
dialog,
TRUE);
noteOfflineUsers(floater, ids);
LLFloaterChatterBox::showInstance(session_id);
// Only warn for regular IMs - not group IMs
if( dialog == IM_NOTHING_SPECIAL )
{
noteMutedUsers(floater, ids);
}
LLFloaterChatterBox::getInstance(LLSD())->showFloater(floater);
}
else
{
floater->open();
}
//mTabContainer->selectTabPanel(panel);
floater->setInputFocus(TRUE);
return floater->getSessionID();
}
示例4: onTabClick
// static
void LLFloaterIMPanel::onTabClick(void* userdata)
{
LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
self->setInputFocus(TRUE);
}