Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

SplashScreen.h

Go to the documentation of this file.
00001 //345678901234567890123456789012345678901234567890123456789012345678901234567890
00002 // SplashScreen.h
00003 //
00004 // Default shows the MultiMediaN animation.
00005 // If you do not extend OglGui::SplashScreen the 'MultimediaN.png' image should
00006 // be in the executable folder, in a higher folder, or in a higher
00007 // folder's subfolder named image.
00008 //
00009 // EXAMPLE:
00010 // #include "OglGui/SplashScreen.h"
00011 //
00012 // int main(int argc, char* argv[])
00013 // {
00014 //    OglInit(&argc, &argv[0]);
00015 //    OglGui::SplashScreen* splash = new OglGui::SplashScreen(0,0,1272,955);
00016 //    OGLStartThread(splash->GetOGLWND());
00017 //
00018 //    YourLongInitialization();
00019 //    YourCreationOfAGUI();
00020 //    splash->Stop();
00021 //    OglEventLoop();
00022 // }
00023 // Author: Richard van Balen
00024 
00025 #ifndef OglGui_SplashScreen_h
00026 #define OglGui_SplashScreen_h
00027 
00028 #ifndef OglGui_Window_h
00029 #include "OglGui/Window.h"
00030 #endif
00031 
00032 namespace OglGui {
00033 
00034 class SplashScreen : public Window
00035 {
00036 public:
00037     SplashScreen(int x, int y, int w, int h) :
00038         Window(x, y, w, h)
00039     {
00040         mStop = false;
00041     }
00042 
00043     // If you do not want the MulitimediaN animation as splash screen you can
00044     // extend SplashScreen and overload the 'virtual void InitFunc()' below.
00045     // NOTE: if your SplashScreen derived class overloads the DisplayFunc
00046     // then do not forget to call SplashScreen::DisplayFunc at the end.
00047     virtual void InitFunc()
00048     {
00049         SetBackground(oglWHITE);
00050         OGLWND* animWnd = oglSys.CreateOGLViewPort(mOglWnd,0,0,W(),H());
00051         MNAnimFuncsSkipIntro(animWnd);
00052     }
00053 
00054     void Stop()
00055     {
00056         mStop = true;
00057         UpdateScene(true);
00058     }
00059 
00060     virtual void DisplayFunc()
00061     {
00062         Window::DisplayFunc();
00063         if (mStop)
00064             oglSys.CloseTopWindow(mOglWnd);
00065     }
00066 private:
00067     bool mStop;
00068 };
00069 
00070 } // Namespace OglGui
00071 #endif
00072 

Generated on Fri Mar 19 09:31:38 2010 for ImpalaSrc by  doxygen 1.5.1