本文整理汇总了C++中UIWindow::onPop方法的典型用法代码示例。如果您正苦于以下问题:C++ UIWindow::onPop方法的具体用法?C++ UIWindow::onPop怎么用?C++ UIWindow::onPop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIWindow
的用法示例。
在下文中一共展示了UIWindow::onPop方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pushRoot
void UI::pushRoot (const std::string& windowID)
{
_noPushAllowed = true;
while (!_stack.empty()) {
UIWindow* window = *_stack.rbegin();
window->onPop();
_stack.pop_back();
if (!_stack.empty()) {
_stack.back()->onActive();
}
if (window->shouldDelete()) {
delete window;
}
}
_noPushAllowed = false;
push(windowID);
}
示例2: popMain
void UI::popMain ()
{
_noPushAllowed = true;
// don't pop the root window
while (_stack.size() > 1) {
UIWindow* window = *_stack.rbegin();
if (window->isMain())
break;
info(LOG_CLIENT, "pop window " + window->getId());
window->onPop();
_stack.pop_back();
_stack.back()->onActive();
if (window->shouldDelete()) {
delete window;
}
}
_noPushAllowed = false;
}
示例3: pop
void UI::pop ()
{
if (_noPushAllowed)
return;
if (_stack.size() == 1) {
UIPopupCallbackPtr c(new UIPopupOkCommandCallback(CMD_QUIT));
UI::get().popup(tr("Quit"), UIPOPUP_OK | UIPOPUP_CANCEL, c);
return;
}
UIWindow* window = *_stack.rbegin();
if (!window->onPop())
return;
info(LOG_CLIENT, "pop window " + window->getId());
System.track("popwindow", window->getId());
_stack.pop_back();
_stack.back()->onActive();
if (window->shouldDelete()) {
delete window;
}
}