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

vuMainWindow.h

Go to the documentation of this file.
00001 
00002 #ifndef _vuMainWindow_h_
00003 #define _vuMainWindow_h_
00004 
00005 #include "vuUtilityWindow.h"
00006 #include "Volume/volume.h"
00007 #include <wx/list.h>
00008 
00009 //Decide on the base class of the main window.  MDI windows under the GTK 
00010 //toolkit do not behave how we want, so under this toolkit use a different
00011 //type of window
00012 
00013 #if defined(__WXGTK__)
00014 
00015 #include <wx/frame.h>
00016 #define wxPARENTWINDOW wxFrame
00017 
00018 #else
00019 
00020 #include <wx/mdi.h>
00021 #define wxPARENTWINDOW wxMDIParentFrame
00022 
00023 #endif
00024 
00025 // We have to move the documentation here that is recognized by doxygen.
00027 
00064 class vuMainWindow : public wxPARENTWINDOW
00065 {
00066 public:
00068     vuMainWindow();
00070     ~vuMainWindow();
00071 
00073 
00085     bool init(int argc = 0, char* argv[] = 0);
00086 
00087 public:
00088     //These functions are called by vuUtilityWindow implementations.
00089 
00091 
00099     void notifyDataChanged();
00100 
00102 
00107     void notifyClosed(vuUtilityWindow *Window);
00108 
00109 private:
00110     //These methods control the volume data owned by the program and so it's 
00111     //opened/closed state.
00112 
00114 
00121     bool open(const char *file);
00122 
00124 
00129     void close();
00130 
00132 
00134     bool isOpened();
00135 
00137 
00143     bool save(const char *file);
00144 
00146 
00155     bool isSaved();
00156 
00157 private:
00158     //These are internal methods of the class.
00159 
00161     bool parseCommandLine(int argc,char *argv[]);
00163     bool addUtility(const char *Name);
00165 
00168     void saveData();
00169 
00170 private:
00171     //These methods operate on the window's user interface
00172 
00174 
00179     bool initWindow();
00181 
00184     void setOpened();
00186 
00189     void setClosed();
00191 
00195     wxMenu* createUtilityMenu();
00196 
00197 private:
00198     //These are the wxWindows/toolkit specific declarations.
00199     //They respond to events in the user interface.
00200 
00202 
00203     void OnOpenData(wxCommandEvent& event);
00205 
00206     void OnSaveData(wxCommandEvent& event);
00208 
00209     void OnCloseData(wxCommandEvent& event);
00211 
00212     void OnAddUtility(wxCommandEvent &event);
00214     void OnSize(wxSizeEvent& event);
00216     void OnExit(wxCommandEvent& event);
00218     void OnClose(wxCloseEvent& event);
00219 
00220     // Declare the wxWindows event table.
00221     DECLARE_EVENT_TABLE()
00222 
00223 private:
00224     //The data owned by the main window.
00225 
00227     vuVolume *m_Data;
00229     wxString m_FileName;
00231     wxString m_FileType;
00232 
00234     bool m_Opened;
00236     bool m_Saved;
00237 
00239     wxList m_Windows;
00240 };
00241 
00242 #endif

Generated on Wed Dec 15 21:20:35 2004 for vuVolume by  doxygen 1.3.9.1