本文整理汇总了C++中LLFloater::canClose方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloater::canClose方法的具体用法?C++ LLFloater::canClose怎么用?C++ LLFloater::canClose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFloater
的用法示例。
在下文中一共展示了LLFloater::canClose方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleKeyHere
BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask)
{
if (key == 'W' && mask == MASK_CONTROL)
{
LLFloater* floater = getActiveFloater();
// is user closeable and is system closeable
if (floater && floater->canClose() && floater->isCloseable())
{
floater->closeFloater();
// EXT-5695 (Tabbed IM window loses focus if close any tabs by Ctrl+W)
// bring back focus on tab container if there are any tab left
if(mTabContainer->getTabCount() > 0)
{
mTabContainer->setFocus(TRUE);
}
}
return TRUE;
}
return LLFloater::handleKeyHere(key, mask);
}
示例2: handleKeyHere
BOOL LLFloaterChatterBox::handleKeyHere(KEY key, MASK mask)
{
if (key == 'W' && mask == MASK_CONTROL)
{
LLFloater* floater = getActiveFloater();
// is user closeable and is system closeable
if (floater && floater->canClose())
{
if (floater->isCloseable())
{
floater->close();
}
else
{
// close chatterbox window if frontmost tab is reserved, non-closeable tab
// such as contacts or near me
close();
}
}
return TRUE;
}
return LLMultiFloater::handleKeyHere(key, mask);
}