예제 #1
0
// DEBUG
void UI_Main::PrintDocuments_Cmd( void )
{
	int i;

	if( !self )
		return;

	for( i = 0; i < UI_NUM_CONTEXTS; i++ ) {
		UI_Navigation &navigation = self->navigations[i];

		Com_Printf("Context %i navigation stack:\n", i);
		for( UI_Navigation::iterator it = navigation.begin(); it != navigation.end(); ++it ) {
			NavigationStack *nav = *it;

			nav->printStack();

			DocumentCache *cache = nav->getCache();
			if( cache ) {
				Com_Printf("Document cache:\n");
				cache->printCache();
			}

			Com_Printf("\n");
		}
	}
}
예제 #2
0
// DEBUG
void UI_Main::PrintDocuments_Cmd( void )
{
	if( !self )
		return;

	NavigationStack *nav = self->getNavigator();
	if( !nav )
		return;
	Com_Printf("Navigation stack:\n");
	nav->printStack();

	DocumentCache *cache = nav->getCache();
	if( !cache )
		return;
	Com_Printf("Document cache:\n");
	cache->printCache();
}
예제 #3
0
void UI_Main::reloadUI( void )
{
	int i;

	for( i = 0; i < UI_NUM_CONTEXTS; i++ ) {
		UI_Navigation &navigation = navigations[i];
		NavigationStack *navigator = navigation.front();

		while( !navigation.empty() ) {
			NavigationStack *stack = navigation.front();
			navigation.pop_front();

			// clear the navigation stack
			stack->popAllDocuments();
			stack->getCache()->clearCaches();
			if( stack != navigator ) {
				__delete__( stack );
			}
		}

		navigation.push_front( navigator );
	}

	if( serverBrowser ) {
		serverBrowser->stopUpdate();
	}
	if( demos ) {
		demos->Reset();
	}

	destroyDataSources();

	createDataSources();

	preloadUI();

	showUI( true );
}