MatOCAD Logo

Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

MainFrm.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00002 //
00003 // Name:        MainFrm.h
00004 // Author:      Administrator
00005 // Created:     22/03/2005 15.08.31
00006 //
00007 //---------------------------------------------------------------------------
00008 #ifndef __MainFrm_HPP_
00009 #define __MainFrm_HPP_
00010 
00011 // For compilers that support precompilation, includes "wx.h".
00012 #include <wx/wxprec.h>
00013 
00014 
00015 #ifdef __BORLANDC__
00016 #pragma hdrstop
00017 #endif
00018 
00019 #ifndef WX_PRECOMP
00020 // Include your minimal set of headers here, or wx.h
00021 #include <wx/wx.h>
00022 #endif
00023 
00024 //Do not add custom headers.
00025 //wx-dvcpp designer will remove them
00027 #include <wx/panel.h>
00028 #include <wx/notebook.h>
00029 #include <wx/splitter.h>
00030 #include <wx/toolbar.h>
00031 #include <wx/statusbr.h>
00033 #include <wx/menu.h>
00034 #include <wx/frame.h>
00035 #include <wx/sysopt.h>
00036 #include <map>
00037 
00038 #include "wxIFM/ifm.h"
00039 #include "ObjectTree/PnlObjTree.h"
00040 #include "TabFogli/NtbSheet.h"
00041 
00042 
00043 typedef std::map<int, wxWindow *> wxWindowMap;
00044 
00046         #undef MAINFRM_STYLE
00047         #define MAINFRM_STYLE wxCLIP_CHILDREN | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX
00048 
00049 
00050 class MainFrm : public wxFrame
00051 {
00052 private:
00053     DECLARE_EVENT_TABLE()
00054     int ident;//numero che contiene l'identificatore da assegnare a un widget
00055     int count;
00056 
00057 public:
00058 
00059         MainFrm( wxWindow *parent, wxWindowID id = 1, const wxString &title = _T("Matocad"),
00060         const wxPoint& pos = wxDefaultPosition,
00061         const wxSize& size = wxDefaultSize,
00062         long style = MAINFRM_STYLE);
00063 
00064     virtual ~MainFrm();
00065     wxWindow* CreateTreeView(bool visible = true);
00066 public:
00067 
00068         PnlObjTree *WxPanel1;
00069         NtbSheet *TabFogli;
00070         wxToolBar *TlbFogli;
00071     wxToolBar *TlbOggetti;
00072         wxStatusBar *StbMain;
00073     wxInterfaceManager *m_ifm;
00074     wxWindowMap m_windows;
00075 
00076 
00077 
00078 public:
00079         //Note: if you receive any error with these enums, then you need to
00080     //change your old form code that are based on the #define control ids.
00081         //It may replace a numeric value in the enums names.
00082         enum {
00084 ID_WXPANEL1 = 1156,
00085 ID_TABFOGLI = 1155,
00086 ID_BTNUPDATETREE = 1158,
00087 ID_BTNELIMINA = 1151,
00088 ID_BTNNEWETI = 1153,
00089 ID_BTNMODIFICA = 1152,
00090 ID_BTNNUOVO3D = 1150,
00091 ID_BTNNUOVO2D = 1149,
00092 ID_BTNAVANTI = 1148,
00093 ID_BTNINDIETRO = 1147,
00094 ID_BTNCHIUDIFOGLIO = 1146,
00095 ID_BTNNUOVOFOGLIO = 1145,
00096 ID_TLBFOGLI = 1115,
00097 ID_TLBOGGETTI = 1116,
00098 ID_STBMAIN = 1112,
00100    ID_DUMMY_VALUE_ //Dont Delete this DummyValue
00101    }; //End of Enum
00102 
00103 #define WINDOW_MENU_START       0
00104 #define WINDOW_MENU_END         1000
00105 #define WINDOW_MENU_SHOW_ALL    1001
00106 #define WINDOW_MENU_HIDE_ALL    1002
00107 
00108 
00109 
00110 public:
00111     void MainFrmClose(wxCloseEvent& event);
00112     void CreateGUIControls(void);
00113     void BtnNuovoFoglioClick1(wxCommandEvent& event);
00114         void TabFogliPageChanged(wxNotebookEvent& event);
00115 
00116     PnlFoglio* sheet;
00117         void BtnModificaClick(wxCommandEvent& event);
00118         void BtnIndietroClick(wxCommandEvent& event);
00119         void BtnEliminaClick(wxCommandEvent& event);
00120         void BtnAvantiClick(wxCommandEvent& event);
00121         void BtnChiudiFoglioClick(wxCommandEvent& event);
00122         void BtnNuovo2DClick(wxCommandEvent& event);
00123         void BtnNuovo3DClick(wxCommandEvent& event);
00124         void BtnNewEtiClick(wxCommandEvent& event);
00125         void BtnUpdateTreeClick(wxCommandEvent& event);
00126 
00127     void OnClose(wxCloseEvent &event);
00128     void OnMenu(wxCommandEvent &event);
00129     void OnShowAll(wxCommandEvent &event);
00130     void OnMenuOpen(wxMenuEvent &event);
00131     void OnSize(wxSizeEvent& event);
00132 };
00133 
00134 #endif
00135 
00136 
00137 
00138 
00139 
00140 
00141 

 

SourceForge Logo