Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

testmain.cxx

Go to the documentation of this file.
00001 // Test program for gui graphical display
00002 // $Header: /nfs/slac/g/glast/ground/cvs/gui/src/test/testmain.cxx,v 1.1.1.1 2001/01/04 01:01:12 burnett Exp $
00003 
00004 
00005 #if defined(_DEBUG) && defined (_WIN32) //boilerplate for memory leak check
00006 #  include <CRTDBG.H>
00007 #  pragma comment(lib, "msvcrtd.lib")
00008 #endif
00009 #include "Demo.h"
00010 // gui event graphics include files
00011 #include "gui/GuiMgr.h"
00012 
00013 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00014 //         demo main 
00015 int main(int argc, char** argv)
00016 {
00017   //force into link  
00018     if(0)gui::GUI::createGUI();
00019 
00020 
00021     // get pointer to the GuiMgr instance 
00022     gui::GuiMgr* guiMgr=gui::GuiMgr::instance();
00023 
00024     // create the demonstration guy.
00025     Demo demo(guiMgr->display());
00026 
00027     // start the message loop
00028     guiMgr->menu().run();
00029 
00030     // now the simulated event loop
00031     do {
00032         // begin event processing
00033         guiMgr->begin_event(); 
00034   
00035         // do something!
00036         demo.process();
00037 
00038         // end event processing
00039         guiMgr->end_event(); 
00040     }while( !guiMgr->done() );
00041 
00042 
00043 #if defined(_DEBUG) && defined (_WIN32)
00044     // this to verify that memory has been released
00045     // _CrtSetDbgFlag( _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ) | _CRTDBG_LEAK_CHECK_DF);
00046 #endif
00047     
00048     return 0;
00049 }
00050 

Generated at Mon Nov 26 18:18:11 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000