本文整理汇总了C++中LLUICtrl::onTabInto方法的典型用法代码示例。如果您正苦于以下问题:C++ LLUICtrl::onTabInto方法的具体用法?C++ LLUICtrl::onTabInto怎么用?C++ LLUICtrl::onTabInto使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLUICtrl
的用法示例。
在下文中一共展示了LLUICtrl::onTabInto方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: focusLastItem
BOOL LLUICtrl::focusLastItem(BOOL prefer_text_fields)
{
// search for text field first
if(prefer_text_fields)
{
LLCtrlQuery query = getTabOrderQuery();
query.addPreFilter(LLUICtrl::LLTextInputFilter::getInstance());
child_list_t result = query(this);
if(result.size() > 0)
{
LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.back());
if(!ctrl->hasFocus())
{
ctrl->setFocus(TRUE);
ctrl->onTabInto();
gFocusMgr.triggerFocusFlash();
}
return TRUE;
}
}
// no text field found, or we don't care about text fields
child_list_t result = getTabOrderQuery().run(this);
if(result.size() > 0)
{
LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.back());
if(!ctrl->hasFocus())
{
ctrl->setFocus(TRUE);
ctrl->onTabInto();
gFocusMgr.triggerFocusFlash();
}
return TRUE;
}
return FALSE;
}
示例2: focusFirstItem
BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash)
{
LLFastTimer _(FTM_FOCUS_FIRST_ITEM);
// try to select default tab group child
LLCtrlQuery query = getTabOrderQuery();
// sort things such that the default tab group is at the front
query.setSorter(DefaultTabGroupFirstSorter::getInstance());
child_list_t result = query(this);
if(result.size() > 0)
{
LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.front());
if(!ctrl->hasFocus())
{
ctrl->setFocus(TRUE);
ctrl->onTabInto();
if(focus_flash)
{
gFocusMgr.triggerFocusFlash();
}
}
return TRUE;
}
// search for text field first
if(prefer_text_fields)
{
LLCtrlQuery query = getTabOrderQuery();
query.addPreFilter(LLUICtrl::LLTextInputFilter::getInstance());
child_list_t result = query(this);
if(result.size() > 0)
{
LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.front());
if(!ctrl->hasFocus())
{
ctrl->setFocus(TRUE);
ctrl->onTabInto();
gFocusMgr.triggerFocusFlash();
}
return TRUE;
}
}
// no text field found, or we don't care about text fields
result = getTabOrderQuery().run(this);
if(result.size() > 0)
{
LLUICtrl * ctrl = static_cast<LLUICtrl*>(result.front());
if(!ctrl->hasFocus())
{
ctrl->setFocus(TRUE);
ctrl->onTabInto();
gFocusMgr.triggerFocusFlash();
}
return TRUE;
}
return FALSE;
}