本文整理汇总了C++中NavigationStack::getDefaultPath方法的典型用法代码示例。如果您正苦于以下问题:C++ NavigationStack::getDefaultPath方法的具体用法?C++ NavigationStack::getDefaultPath怎么用?C++ NavigationStack::getDefaultPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NavigationStack
的用法示例。
在下文中一共展示了NavigationStack::getDefaultPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: preloadUI
void UI_Main::preloadUI( void ) {
int i;
NavigationStack *navigator;
for( i = 0; i < UI_NUM_CONTEXTS; i++ ) {
UI_Navigation &navigation = navigations[i];
navigator = navigation.front();
while( !navigation.empty() ) {
NavigationStack *stack = navigation.front();
navigation.pop_front();
// clear the navigation stack
stack->popAllDocuments();
if( stack != navigator ) {
__delete__( stack );
}
}
navigation.push_front( navigator );
navigator->setDefaultPath( ui_basepath->string );
}
// load translation strings
trap::L10n_ClearDomain();
// load base UI strings: l10n/ui
trap::L10n_LoadLangPOFile( "l10n/ui" );
// load strings provided by the theme: e.g. ui/l10n/porkui
// initialize with default document
navigator = navigations[UI_CONTEXT_MAIN].front();
String l10nLocalPath( navigator->getDefaultPath().c_str() );
l10nLocalPath += "l10n";
l10nLocalPath.Erase( 0, 1 );
trap::L10n_LoadLangPOFile( l10nLocalPath.CString() );
// postpone displaying the document until the first valid refresh state
navigator->pushDocument( ui_index, false, false );
showNavigationStack = navigator->hasDocuments();
// initial cursor setup
if( trap::IN_SupportedDevices() & IN_DEVICE_TOUCHSCREEN ) {
mouseMove( UI_CONTEXT_MAIN, 0, 0, 0, true, false );
} else {
mouseMove( UI_CONTEXT_MAIN, 0, refreshState.width >> 1, refreshState.height >> 1, true, true );
}
if( !quickMenuURL.Empty() ) {
navigator = navigations[UI_CONTEXT_QUICK].front();
navigator->pushDocument( quickMenuURL.CString(), false );
}
rocketModule->update();
}