本文整理汇总了C++中LLCtrlQuery类的典型用法代码示例。如果您正苦于以下问题:C++ LLCtrlQuery类的具体用法?C++ LLCtrlQuery怎么用?C++ LLCtrlQuery使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLCtrlQuery类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getTabOrderQuery
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: _
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;
}
示例3: getTabOrderQuery
BOOL LLUICtrl::focusPrevItem(BOOL text_fields_only)
{
// this assumes that this method is called on the focus root.
LLCtrlQuery query = getTabOrderQuery();
if(text_fields_only || LLUI::sConfigGroup->getBOOL("TabToTextFieldsOnly"))
{
query.addPreFilter(LLUICtrl::LLTextInputFilter::getInstance());
}
viewList_t result = query(this);
return focusPrev(result);
}