![]() |
TAPs 0.7.7.3
|
00001 /****************************************************************************** 00002 TAPsWXFrameWithGLCanvas.hpp 00003 A main frame using wxWidgets Toolkit supporting OpenGL. 00004 00005 SUKITTI PUNAK (05/05/2006) 00006 UPDATE (05/05/2006) 00007 ******************************************************************************/ 00008 #ifndef TAPs_MAIN_FRAME_WITH_GL_CANVAS_HPP 00009 #define TAPs_MAIN_FRAME_WITH_GL_CANVAS_HPP 00010 00011 // for all others, include the necessary headers (this file is usually all you 00012 // need because it includes almost all "standard" wxWidgets headers) 00013 //#ifndef WX_PRECOMP 00014 // #include "wx/wx.h" 00015 //#endif 00016 #include <TAPs/wxWidgets/TApsWXEnumList.hpp> 00017 #include <TAPs/wxWidgets/TAPsWXDebug.hpp> 00018 #include "TAPsWXOpenGLCanvas.hpp" 00019 00020 BEGIN_NAMESPACE_TAPs 00021 //============================================================================= 00022 // Forward Declaration 00023 //----------------------------------------------------------------------------- 00024 //class WXGLCanvas; 00025 //----------------------------------------------------------------------------- 00026 //============================================================================= 00027 00028 //============================================================================= 00029 // Class WXFrameSupportGLCanvas : subclass of class wxFrame 00030 //----------------------------------------------------------------------------- 00031 // Define a new frame type 00032 class WXFrameSupportGLCanvas : public wxFrame { 00033 public: 00034 //--------------------------------------------------------------- 00035 // Create WXFrameSupportGLCanvas 00036 static WXFrameSupportGLCanvas * Create ( 00037 WXFrameSupportGLCanvas * parentFrame, 00038 bool isCloneWindow = false ); 00039 //--------------------------------------------------------------- 00040 // MAIN MENU 00041 //----------------------------------------------------- 00042 // Menu File 00043 void OnFileOpen ( wxCommandEvent & event ); 00044 void OnFileClose ( wxCommandEvent & event ); 00045 void OnFileExport ( wxCommandEvent & event ); 00046 void OnFileExit ( wxCommandEvent & event ); 00047 //----------------------------------------------------- 00048 // Menu Edit 00049 void OnEditUndo ( wxCommandEvent & event ); 00050 void OnEditRedo ( wxCommandEvent & event ); 00051 //----------------------------------------------------- 00052 // Menu View 00053 void OnViewReset ( wxCommandEvent & event ); 00054 //----------------------------------------------------- 00055 // Menu Window 00056 void OnWindowNewWindow ( wxCommandEvent & event ); 00057 //----------------------------------------------------- 00058 // Menu Help 00059 void OnHelpAbout ( wxCommandEvent & event ); 00060 //--------------------------------------------------------------- 00061 // Get/Set Function(s) 00062 inline void GetSizeOfClient( int * w, int * h ) { 00063 GetClientSize( w, h ); 00064 } 00065 //--------------------------------------------------------------- 00066 inline WXOpenGLCanvas * const RetGLCanvasPtr () { 00067 return m_pWXOpenGLCanvas; 00068 } 00069 //--------------------------------------------------------------- 00070 private: 00071 static void CreateMainMenu ( WXFrameSupportGLCanvas * frame ); 00072 //----------------------------------------------------- 00073 // wxMenu Ptrs 00074 wxMenuBar * m_menuBar; 00075 //------------------------------------------- 00076 wxMenu * m_menuFile; 00077 wxMenu * m_menuEdit; 00078 wxMenu * m_menuView; 00079 wxMenu * m_menuWindow; 00080 wxMenu * m_menuHelp; 00081 //----------------------------------------------------- 00082 // Create Menus 00083 void CreateMenuBar (); 00084 void CreateMenuFile (); 00085 void CreateMenuEdit (); 00086 void CreateMenuView (); 00087 void CreateMenuWindow (); 00088 void CreateMenuHelp (); 00089 //----------------------------------------------------- 00090 // Update Menus 00091 void UpdateMenuFile (); 00092 void UpdateMenuEdit (); 00093 void UpdateMenuView (); 00094 void UpdateMenuWindow (); 00095 void UpdateMenuHelp (); 00096 //----------------------------------------------------- 00097 private: 00098 WXFrameSupportGLCanvas ( 00099 wxWindow * parent, 00100 const wxString & title, 00101 const wxPoint & pos, 00102 const wxSize & size, 00103 long style = wxDEFAULT_FRAME_STYLE ); 00104 //----------------------------------------------------- 00105 WXOpenGLCanvas * m_pWXOpenGLCanvas; 00106 //--------------------------------------------------------------- 00107 DECLARE_EVENT_TABLE() 00108 }; // End Class WXFrameSupportGLCanvas 00109 //----------------------------------------------------------------------------- 00110 //============================================================================= 00111 END_NAMESPACE_TAPs 00112 //----------------------------------------------------------------------------- 00113 // Include definition if TAPs_USE_EXPORT is not defined 00114 #if !defined( TAPs_USE_EXPORT ) 00115 #include "TAPsWXFrameSupportGLCanvas.cpp" 00116 #endif 00117 //----------------------------------------------------------------------------- 00118 #endif 00119 //345678901234567890123456789012345678901234567890123456789012345678901234567890 00120 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8