00001 #ifndef _FEM_VIEWER_APP_H_
00002 #define _FEM_VIEWER_APP_H_
00003
00004 #include "wx/wxprec.h"
00005
00006 #ifndef WX_PRECOMP
00007 #include "wx/wx.h"
00008 #endif
00009
00010 #if !wxUSE_THREADS
00011 #error "This sample requires thread support!"
00012 #endif // wxUSE_THREADS
00013
00014 #include "wx/thread.h"
00015 #include "wx/glcanvas.h"
00016
00017
00018 class Thread;
00019
00020 namespace FemViewer {
00021 namespace WxGUI {
00022
00023 class RenderThread;
00024 class wxMainWindow;
00025 class wxRenderCanvas;
00026
00027
00028 class wxFemViewerApp : public wxGLApp
00029 {
00030 public:
00031 static Thread * m_parent;
00032 static int Init (int argc,char **argv,Thread* parent= nullptr);
00033 static int Init2 (int argc,char **argv);
00034 static bool IsInit();
00035 static void Refresh();
00036
00037 static void ShutDown();
00038
00039 wxFemViewerApp(void);
00040 virtual ~wxFemViewerApp(void);
00041 virtual bool OnInit();
00042 virtual int OnRun();
00043
00044 virtual int OnExit();
00045
00046 bool m_shutdown;
00047 wxCriticalSection m_critsect;
00048
00049 protected:
00051 wxMainWindow * m_pframe;
00052 wxRenderCanvas * m_pcanvas;
00053 RenderThread * m_pThread;
00054
00055 private:
00057 DECLARE_NO_COPY_CLASS(wxFemViewerApp);
00058 };
00059
00060
00061 DECLARE_APP(wxFemViewerApp)
00062
00063 }
00064
00065 typedef WxGUI::wxFemViewerApp GUIEngine;
00066
00067 }
00068
00069 #endif
00070