NIREP

C:/Programs/source/NIREP/Interface/Interface.h

00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 #pragma once
00014 #ifndef _INTERFACE_H_
00015 #define _INTERFACE_H_
00016 
00017 
00018 #include "NIREPDataManager.h"
00019 #include "NIREPDisplay.h"
00020 #include <map>
00021 #include <string>
00022 
00023 #include "wx/frame.h"
00024 #include "wx/toolbar.h"
00025 #include "wx/splitter.h"
00026 #include "wx/treectrl.h"
00027 #include "wx/aui/auibook.h"
00028 #include "wx/grid.h"
00029 #include "wx/html/helpfrm.h"
00030 #include "wx/html/helpctrl.h"
00031 
00032 //#include "LoadDisplay.h"
00033 
00034 #include "ResourceDescriptionList/ResourceDescriptionList.h" // Added GEC 6/26/2010 debugging
00035 
00036 class wxMenu;
00037 class wxTreeCtrl;
00038 
00039 
00040 class wxImageThumbnail;
00041 
00045 #define ID_FRAME 10000
00046 #define ID_SAVE_AS 10023
00047 #define ID_RECENT_PROJECTS 10025
00048 #define ID_DATABASE_QUERY 10026
00049 #define ID_PAIRWISE_COMPARISON 10027
00050 #define ID_GROUP_WISE 10030
00051 #define ID_CHECKER_BOARD 10015
00052 #define ID_DIFFERENCE 10017
00053 #define ID_RECTNAR_WIPE 10018
00054 #define ID_OVERLAP 10020
00055 #define ID_TOOLBAR1 10021
00056 #define ID_ELEMENT 10037
00057 #define ID_PROJECT_EXPLORER_HEADER 10024
00058 #define ID_PROJECT_EXPLORER_SIDEBAR 10040
00059 #define ID_EX_PANEL 10005
00060 #define ID_IN_PANEL 10008
00061 #define ID_TOP_PANEL 10011
00062 #define ID_PROPRTY_WINDOW_SIDEBAR 10031
00063 #define ID_PROPERTY_WINDOW_HEADER 10002
00064 #define ID_PANEL2 10029
00065 #define ID_PROPERTYGRID 10032
00066 #define ID_GRID 10033
00067 #define SYMBOL_INTERFACE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX
00068 #define SYMBOL_INTERFACE_TITLE _("Interface")
00069 #define SYMBOL_INTERFACE_IDNAME ID_FRAME
00070 #define SYMBOL_INTERFACE_SIZE wxSize(800, 600)
00071 #define SYMBOL_INTERFACE_POSITION wxDefaultPosition
00072 
00073 
00074 #define ID_OPEN_TREE 1000
00075 #define ID_OPEN_NEW_TAB_TREE 1001
00076 #define ID_REMOVE_TREE 1005
00077 #define TIMER_ID 2001
00078 #define ID_LOAD_DISPLAY 1151
00079 #define ID_LOAD_RESOURCE_DESCRIPTION_LIST 10036  // Added GEC
00080 #define ID_SAVE_RESOURCE_DESCRIPTION_LIST 10038  // Added GEC
00081 #define ID_GENERATE_RESOURCE_DESCRIPTION_LIST 10100 // Added GEC
00082 #define ID_CREATE_DISPLAY 10101 // Added JAH
00083 #define ID_QUICK_VIEW 10102 // Added JAH
00084 #define ID_HELP 1155
00085 
00086 
00087 //These are for when the user wants to create a predefined blank, display grid.
00088 #define ONE_BY_ONE 1
00089 #define TWO_BY_TWO 2
00090 #define THREE_BY_THREE 3
00091 
00097 /* +---------+
00098    | Classes |
00099    +---------+ */
00114 class Interface: public wxFrame
00115 {    
00116     DECLARE_CLASS( Interface )
00117     DECLARE_EVENT_TABLE()
00118 
00119 public:
00122     Interface();
00123     Interface( wxWindow* parent, wxWindowID id = SYMBOL_INTERFACE_IDNAME, const wxString& caption = SYMBOL_INTERFACE_TITLE, const wxPoint& pos = SYMBOL_INTERFACE_POSITION, const wxSize& size = SYMBOL_INTERFACE_SIZE, long style = SYMBOL_INTERFACE_STYLE );
00124 
00127     bool Create( wxWindow* parent, wxWindowID id = SYMBOL_INTERFACE_IDNAME, const wxString& caption = SYMBOL_INTERFACE_TITLE, const wxPoint& pos = SYMBOL_INTERFACE_POSITION, const wxSize& size = SYMBOL_INTERFACE_SIZE, long style = SYMBOL_INTERFACE_STYLE );
00128 
00132     ~Interface();
00133 
00137     void Init();
00138 
00142     void CreateControls();
00143 
00144 
00148     void OnMaximize( wxMaximizeEvent& event );
00149 
00153     void OnSize( wxSizeEvent& event );
00154 
00158     void OnLoadDisplayClick( wxCommandEvent& event );
00159 
00160         void OnLoadResourceNewFormatClick( wxCommandEvent& event );  // Added GEC 6/18/2010 debugging
00161         void OnSaveResourceNewFormatClick( wxCommandEvent& event );  // Added GEC 6/18/2010 debugging
00162   void OnEditResourceNewFormat( wxCommandEvent& event );  // Added GEC 7/6/2010
00163 
00164   void OnViewDisplayDescription( wxCommandEvent& event );  // Added JAH 7/29/2010
00165   void OnViewEvaluatorCommands( wxCommandEvent& event );  // Added JAH 8/10/2010
00166 
00170     void OnSaveClick( wxCommandEvent& event );
00171 
00175     void OnSaveAsClick( wxCommandEvent& event );
00176 
00177 
00180     void OnTimer(wxTimerEvent& event);
00181 
00185     wxBitmap GetBitmapResource( const wxString& name );
00186 
00190     wxIcon GetIconResource( const wxString& name );
00191 
00192 
00196     static bool ShowToolTips();
00197 
00200     void OnHelpClick(wxCommandEvent & event);
00201 
00202     void OnQuit(wxCommandEvent & event);
00203 
00204 
00207     void SetCmdLine(int argc, wxChar ** argv){this->argc = argc; this->argv = argv;};
00208 
00211     void SetWidgetPath(wxString WP){WidgetPath = WP;};
00212 
00215     void SetEvalutorPath(wxString EP){EvalutorPath = EP;};
00216 
00219     wxString GetWidgetPath(){return WidgetPath;};
00220 
00223     wxString GetEvalutorPath(){return EvalutorPath;};
00224 
00225     NIREPEvaluator * GetEvaluator(){return evaluator;};
00226 
00227     NIREPDataManager * GetDataManager(){return dataManager;};
00228 
00231     void CreateNIREPDisplay(std::string& fileName);
00232 
00233     void addDatabaseItem(std::string s, unsigned long memory, unsigned long totalMemory);
00234 
00235     void SetTotalMemoryUsage(unsigned long totalMemory);
00236 
00237     void OnGridChange(wxGridEvent & event);
00238     void EditorShown(wxGridEvent & event);
00239 
00240     void DeleteSpatialData(int row, int col);
00241 
00242 public:
00243 private:
00244     int argc;
00245     wxChar ** argv;
00246     
00247     NIREPDataManager * dataManager;
00248     NIREPEvaluator * evaluator;
00249 
00250     ResourceDescriptionList * m_rdl;  // Added GEC: resource description list.  Debugging
00251 
00252     int pageID;
00253 
00254     std::map<std::string,std::string> DatabaseItemList;
00255     std::map<std::string,std::string> DisplayItemList;
00256     
00257     wxString saved_path;
00258 
00259     void AddNewTab(wxString path);
00260 
00261     wxTimer m_timer;
00262     wxString WidgetPath;
00263     wxString EvalutorPath;
00264     wxGrid* grid;
00265     
00266     wxHtmlHelpController help;
00267 };
00268 
00269 #endif
 All Classes Functions Variables Typedefs Enumerations Enumerator