本文整理汇总了C++中UIWindow::GetVisibleCombined方法的典型用法代码示例。如果您正苦于以下问题:C++ UIWindow::GetVisibleCombined方法的具体用法?C++ UIWindow::GetVisibleCombined怎么用?C++ UIWindow::GetVisibleCombined使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIWindow
的用法示例。
在下文中一共展示了UIWindow::GetVisibleCombined方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnKeyPressed
bool Dialog::OnKeyPressed(Key key)
{
switch( key )
{
case Key::Up:
if( GetManager().GetFocusWnd() && this != GetManager().GetFocusWnd() )
{
// try to pass focus to previous siblings
UIWindow *r = GetManager().GetFocusWnd()->GetPrevSibling();
for( ; r; r = r->GetPrevSibling() )
{
if( r->GetVisibleCombined() && r->GetEnabledCombined() && GetManager().SetFocusWnd(r) ) break;
}
}
break;
case Key::Down:
if( GetManager().GetFocusWnd() && this != GetManager().GetFocusWnd() )
{
// try to pass focus to next siblings
UIWindow *r = GetManager().GetFocusWnd()->GetNextSibling();
for( ; r; r = r->GetNextSibling() )
{
if( r->GetVisibleCombined() && r->GetEnabledCombined() && GetManager().SetFocusWnd(r) ) break;
}
}
break;
case Key::Tab:
if( GetManager().GetFocusWnd() && this != GetManager().GetFocusWnd() )
{
// try to pass focus to next siblings ...
UIWindow *r = GetManager().GetFocusWnd()->GetNextSibling();
for( ; r; r = r->GetNextSibling() )
{
if( r->GetVisibleCombined() && r->GetEnabledCombined() && GetManager().SetFocusWnd(r) ) break;
}
if( r ) break;
// ... and then start from first one
r = GetFirstChild();
for( ; r; r = r->GetNextSibling() )
{
if( r->GetVisibleCombined() && r->GetEnabledCombined() && GetManager().SetFocusWnd(r) ) break;
}
}
break;
case Key::Enter:
case Key::NumEnter:
Close(_resultOK);
break;
case Key::Escape:
Close(_resultCancel);
break;
default:
return false;
}
return true;
}