本文整理汇总了C++中setTopLevel函数的典型用法代码示例。如果您正苦于以下问题:C++ setTopLevel函数的具体用法?C++ setTopLevel怎么用?C++ setTopLevel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setTopLevel函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: declClose
static int PTRCALL
declClose(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
return state->role_none;
case XML_TOK_DECL_CLOSE:
setTopLevel(state);
return state->role_none;
}
return common(state, tok);
}
示例2: declClose
static
int declClose(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NONE;
case XML_TOK_DECL_CLOSE:
setTopLevel(state);
return XML_ROLE_NONE;
}
return common(state, tok);
}
示例3: entity10
static int PTRCALL
entity10(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ENTITY_NONE;
case XML_TOK_DECL_CLOSE:
setTopLevel(state);
return XML_ROLE_ENTITY_COMPLETE;
}
return common(state, tok);
}
示例4: createSeparator
void Menu::rebuildMenu() {
_controller->clear();
if (!_menu) {
return;
}
auto &menuItems = _menu->getItems();
for (auto &item : menuItems) {
if (item->getType() == MenuSourceItem::Type::Separator) {
_controller->addItem([this, item] (const ScrollController::Item &) -> cocos2d::Node * {
auto div = createSeparator();
div->setTopLevel(false);
div->setMenuSourceItem(item);
div->setMenu(this);
return div;
}, metrics::menuVerticalPadding(_metrics));
} else if (item->getType() == MenuSourceItem::Type::Button) {
_controller->addItem([this, item] (const ScrollController::Item &) -> cocos2d::Node * {
auto btn = createButton();
btn->setMenu(this);
btn->setMenuSourceItem(item);
return btn;
}, metrics::menuItemHeight(_metrics));
} else if (item->getType() == MenuSourceItem::Type::Custom) {
auto customItem = static_cast<MenuSourceCustom *>(item);
auto func = customItem->getFactoryFunction();
if (func) {
float height = customItem->getHeight();
if (customItem->isRelativeHeight()) {
height = _contentSize.width * height;
}
_controller->addItem([this, func, item] (const ScrollController::Item &) -> cocos2d::Node * {
auto node = func();
if (auto i = dynamic_cast<MenuItemInterface *>(node)) {
i->setMenu(this);
i->setMenuSourceItem(item);
}
return node;
}, height);
}
}
}
_scroll->setScrollDirty(true);
}
示例5: attlist1
static int PTRCALL
attlist1(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ATTLIST_NONE;
case XML_TOK_DECL_CLOSE:
setTopLevel(state);
return XML_ROLE_ATTLIST_NONE;
case XML_TOK_NAME:
case XML_TOK_PREFIXED_NAME:
state->handler = attlist2;
return XML_ROLE_ATTRIBUTE_NAME;
}
return common(state, tok);
}
示例6: notation4
static int PTRCALL
notation4(PROLOG_STATE *state,
int tok,
const char *UNUSED_P(ptr),
const char *UNUSED_P(end),
const ENCODING *UNUSED_P(enc))
{
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_NOTATION_NONE;
case XML_TOK_LITERAL:
state->handler = declClose;
state->role_none = XML_ROLE_NOTATION_NONE;
return XML_ROLE_NOTATION_SYSTEM_ID;
case XML_TOK_DECL_CLOSE:
setTopLevel(state);
return XML_ROLE_NOTATION_NO_SYSTEM_ID;
}
return common(state, tok);
}
示例7: entity5
static int PTRCALL
entity5(PROLOG_STATE *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc)
{
switch (tok) {
case XML_TOK_PROLOG_S:
return XML_ROLE_ENTITY_NONE;
case XML_TOK_DECL_CLOSE:
setTopLevel(state);
return XML_ROLE_ENTITY_COMPLETE;
case XML_TOK_NAME:
if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
state->handler = entity6;
return XML_ROLE_ENTITY_NONE;
}
break;
}
return common(state, tok);
}
示例8: setTopLevel
void ReceiveQuestion::exec()
{
setTopLevel();
timer->start(1000);
QDialog::exec();
}