00001
00002 #ifndef MAINAPPLICATIONWINDOW_H
00003 #define MAINAPPLICATIONWINDOW_H
00004
00005 #include "wx/wxprec.h"
00006
00007 #ifdef __BORLANDC__
00008 #pragma hdrstop
00009 #endif
00010
00011 #include "scrolledWindows.h"
00012 #include "eventsList.h"
00013 #include "wx/app.h"
00014 #include "wx/grid.h"
00015 #include "wx/treectrl.h"
00016 #include "wx/spinctrl.h"
00017 #include "wx/artprov.h"
00018 #include "wx/clipbrd.h"
00019 #include "wx/image.h"
00020 #include "wx/colordlg.h"
00021 #include "wx/wxhtml.h"
00022 #include "wx/imaglist.h"
00023 #include "wx/dataobj.h"
00024 #include "wx/dcclient.h"
00025 #include "wx/bmpbuttn.h"
00026 #include "wx/menu.h"
00027 #include "wx/toolbar.h"
00028 #include "wx/statusbr.h"
00029 #include "wx/msgdlg.h"
00030 #include "wx/textdlg.h"
00031 #include "wx/dir.h"
00032 #include "wx/dc.h"
00033 #include "wx/math.h"
00034 #include "wx/regex.h"
00035 #include "wx/filefn.h"
00036
00037 #include "wx/aui/aui.h"
00038 #include "wxWidgets-2.9.3\samples\sample.xpm"
00039
00040
00041
00042
00043 class MyApp : public wxApp
00044 {
00045 public:
00046 bool OnInit();
00047 };
00048
00049
00050
00051
00052 class MyFrame : public wxFrame
00053 {
00054 enum
00055 {
00056
00057 ID_MonitorSound,
00058 ID_ImportVocalSounds,
00059 ID_ImportMediaFiles,
00060 ID_AddMediaFiles,
00061 ID_Exit,
00062
00063
00064 ID_StartScenario,
00065 ID_PlayScenario,
00066 ID_PauseScenario,
00067 ID_NextState,
00068 ID_HaltScenario,
00069 ID_DefaultScenario,
00070 ID_EndAndSave,
00071
00072
00073 ID_About,
00074 ID_Help,
00075
00076
00077 ID_DefaultMode,
00078 ID_ManualMode,
00079 ID_PreProgrammedMode,
00080
00081
00082 ID_mannequin,
00083 ID_instructorPatientMonitor,
00084 ID_eventsLog,
00085 ID_scenarioControls,
00086 ID_eventsList,
00087
00088 ID_eventsList_ABC,
00089 ID_eventsList_Med,
00090 ID_eventsList_Misc,
00091 ID_eventsList_Expand_All_Folders,
00092 ID_eventsList_ShowAll,
00093 ID_eventsList_HideAll,
00094
00095 ID_saveLayout,
00096 ID_loadLayout,
00097 ID_adminOverwritePresetLayouts,
00098 ID_adminOverwritePresetLayouts_choice
00099
00100 };
00101
00102 public:
00103 MyFrame(wxWindow* parent,
00104 wxWindowID id,
00105 const wxString& title,
00106 const wxPoint& pos = wxDefaultPosition,
00107 const wxSize& size = wxDefaultSize,
00108 long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER);
00109
00110 ~MyFrame();
00111
00112 private:
00113
00114 wxAuiManager mainWindow;
00115
00116 void onMonitorSound(wxCommandEvent& event);
00117 void onImportVocalSounds(wxCommandEvent& event);
00118 void onImportMediaFiles(wxCommandEvent& event);
00119 void onAddMediaFiles(wxCommandEvent& event);
00120 void onExit(wxCommandEvent& event);
00121
00122
00123 void onPatientInstructorMonitor(wxCommandEvent& event);
00124
00125
00126 void onStartScenario(wxCommandEvent& event);
00127 void onPlayScenario(wxCommandEvent& event);
00128 void onPauseScenario(wxCommandEvent& event);
00129 void onNextState(wxCommandEvent& event);
00130 void onHaltScenario(wxCommandEvent& event);
00131 void onDefaultScenario(wxCommandEvent& event);
00132 void onEndAndSave(wxCommandEvent& event);
00133
00134
00135 void onMonitorSetup(wxCommandEvent& event);
00136 void onVitalSigns(wxCommandEvent& event);
00137
00138
00139 void onAbout(wxCommandEvent& event);
00140 void onHelp(wxCommandEvent& event);
00141
00142
00143 void onDefaultMode(wxCommandEvent& event);
00144 void onManualMode(wxCommandEvent& event);
00145 void onPreProgrammedMode(wxCommandEvent& event);
00146
00147
00148 void onMannequin(wxCommandEvent& event);
00149 void onInstructorPatientMonitor(wxCommandEvent& event);
00150 void onEventsLog(wxCommandEvent& event);
00151 void onEventsList_ShowAll(wxCommandEvent& event);
00152 void onExpandAllEventsLists(wxCommandEvent& event);
00153 void onEventsList_HideAll(wxCommandEvent& event);
00154 void onEventsList_ABC(wxCommandEvent& event);
00155 void onEventsList_Med(wxCommandEvent& event);
00156 void onEventsList_Misc(wxCommandEvent& event);
00157 void onScenarioControls(wxCommandEvent& event);
00158 void OnDropDownToolbarItem_eventsList(wxAuiToolBarEvent& evt);
00159
00160 void InitialScreenLayout();
00161 void setSubScreensOnToolBar();
00162
00163 void onSaveCustomLayout(wxCommandEvent& event);
00164 void onLoadCustomLayout(wxCommandEvent& event);
00165
00166 void toggleMannequin();
00167 void toggleInstructorPatientMonitor();
00168 void toggleEventsLog();
00169 void toggleScenarioControls();
00170 void toggleEventsList_ABC();
00171 void toggleEventsList_Med();
00172 void toggleEventsList_Misc();
00173
00174 void OnPaneClose(wxAuiManagerEvent& evt);
00175 void onPaneMaximize(wxAuiManagerEvent& evt);
00176 void onRestorePane(wxAuiManagerEvent& evt);
00177
00178 void onOverwritePresetLayout(wxCommandEvent& event);
00179
00180 void overWritePresetLayout(int chosenPresetLayout);
00181
00182 void loadAllPresetLayouts();
00183
00184 void updatePresetLayoutForCurrentScreenSize(int chosenScreenLayout);
00185 void updateChosenPresetLayout(int mode);
00186 void updateCustomLayoutForCurrentScreenSize();
00187 void saveCustomLayoutWithScreenSettings();
00188 void saveCustomLayoutWithOUTScreenSettings();
00189 void loadCustomLayoutWithScreenSettings();
00190 void loadCustomLayoutWithOUTScreenSettings();
00191
00192 MyScrolledWindowBase *mannequin,
00193 *instructorPatientMonitor, *eventsList_ABC,*eventsList_Misc,*eventsList_Med, *eventsLog,*scenarioControls;
00194
00195 wxVector<MyScrolledWindowBase *> orphanWindows;
00196
00197 wxSizerItem *mannequin_SizerItem,
00198 *instructorPatientMonitor_SizerItem, *eventsList_ABC_SizerItem,*eventsList_Misc_SizerItem,
00199 *eventsList_Med_SizerItem, *eventsLog_SizerItem,*scenarioControls_SizerItem;
00200
00201 wxSizer *sizerScrollWin_eventsLogList, *sizerScrollWin_Mannequin_InstructorMonitor,*sizerScrollWin_scenControls;
00202
00203 wxPanel *panel;
00204 wxSizer *topsizer;
00205 wxSize initialFrameSize;
00206
00207 wxMenu *menuScreenLayout;
00208 wxMenu *menuHelp;
00209 wxMenu *menuEdit;
00210 wxMenu *menuScenario;
00211 wxMenu *menuView;
00212 wxMenu *menuFile;
00213 wxMenu *menuCustomiszeDefaultScreenLayout;
00214 wxMenuBar *menuBar;
00215 wxMenu *menuPopup_EventsList;
00216
00217 wxAuiToolBar* subScreensBar;
00218 wxAuiToolBar* adminOverWritePresetLayoutBar;
00219
00220 wxChoice* layoutChoice;
00221
00222 wxString currentPerspective;
00223 wxString presetLayouts[3];
00224 int presetLayoutsNativeScreenWidth[3];
00225 int presetLayoutsNativeScreenHeight[3];
00226
00227 int customLayoutNativeScreenWidth;
00228 int customLayoutNativeScreenHeight;
00229
00230
00231 DECLARE_EVENT_TABLE()
00232 };
00233
00234 #endif