![]() |
TAPs 0.7.7.3
|
00001 /****************************************************************************** 00002 TAPsWXFrame.hpp 00003 A main frame using wxWidgets Toolkit. 00004 00005 SUKITTI PUNAK (05/05/2006) 00006 UPDATE (05/05/2006) 00007 ******************************************************************************/ 00008 #ifndef TAPs_WX_FRAME_HPP 00009 #define TAPs_WX_FRAME_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/TAPsWXDebug.hpp> 00017 00018 BEGIN_NAMESPACE_TAPs 00019 //============================================================================= 00020 // Class WXFrame : subclass of class wxFrame 00021 //----------------------------------------------------------------------------- 00022 // Define a new frame type 00023 class WXFrame : public wxFrame { 00024 public: 00025 //--------------------------------------------------------------- 00026 // Create WXFrame 00027 static WXFrame * Create ( 00028 WXFrame * parentFrame, 00029 bool isCloneWindow = false ); 00030 //--------------------------------------------------------------- 00031 // MAIN MENU 00032 //----------------------------------------------------- 00033 // Menu File 00034 void OnFileOpen ( wxCommandEvent & event ); 00035 void OnFileClose ( wxCommandEvent & event ); 00036 void OnFileExport ( wxCommandEvent & event ); 00037 void OnFileExit ( wxCommandEvent & event ); 00038 //----------------------------------------------------- 00039 // Menu Edit 00040 void OnEditUndo ( wxCommandEvent & event ); 00041 void OnEditRedo ( wxCommandEvent & event ); 00042 //----------------------------------------------------- 00043 // Menu View 00044 void OnViewReset ( wxCommandEvent & event ); 00045 //----------------------------------------------------- 00046 // Menu Window 00047 void OnWindowNewWindow ( wxCommandEvent & event ); 00048 //----------------------------------------------------- 00049 // Menu Help 00050 void OnHelpAbout ( wxCommandEvent & event ); 00051 //--------------------------------------------------------------- 00052 // Get/Set Function(s) 00053 inline void GetSizeOfClient( int * w, int * h ) { 00054 GetClientSize( w, h ); 00055 } 00056 //--------------------------------------------------------------- 00057 private: 00058 static void CreateMainMenu ( WXFrame * frame ); 00059 //----------------------------------------------------- 00060 // wxMenu Ptrs 00061 wxMenuBar * m_menuBar; 00062 //------------------------------------------- 00063 wxMenu * m_menuFile; 00064 wxMenu * m_menuEdit; 00065 wxMenu * m_menuView; 00066 wxMenu * m_menuWindow; 00067 wxMenu * m_menuHelp; 00068 //----------------------------------------------------- 00069 // Create Menus 00070 void CreateMenuBar (); 00071 void CreateMenuFile (); 00072 void CreateMenuEdit (); 00073 void CreateMenuView (); 00074 void CreateMenuWindow (); 00075 void CreateMenuHelp (); 00076 //----------------------------------------------------- 00077 // Update Menus 00078 void UpdateMenuFile (); 00079 void UpdateMenuEdit (); 00080 void UpdateMenuView (); 00081 void UpdateMenuWindow (); 00082 void UpdateMenuHelp (); 00083 //----------------------------------------------------- 00084 private: 00085 WXFrame ( 00086 wxWindow * parent, 00087 const wxString & title, 00088 const wxPoint & pos, 00089 const wxSize & size, 00090 long style = wxDEFAULT_FRAME_STYLE ); 00091 //--------------------------------------------------------------- 00092 DECLARE_EVENT_TABLE() 00093 }; // End Class WXFrame 00094 //----------------------------------------------------------------------------- 00095 //============================================================================= 00096 END_NAMESPACE_TAPs 00097 //----------------------------------------------------------------------------- 00098 // Include definition if TAPs_USE_EXPORT is not defined 00099 #if !defined( TAPs_USE_EXPORT ) 00100 #include "TAPsWXFrame.cpp" 00101 #endif 00102 //----------------------------------------------------------------------------- 00103 #endif 00104 //345678901234567890123456789012345678901234567890123456789012345678901234567890 00105 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8