Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
hugin1/hugin/huginApp.h
Go to the documentation of this file.00001 // -*- c-basic-offset: 4 -*- 00024 #ifndef _HUGINAPP_H 00025 #define _HUGINAPP_H 00026 00027 #include "config.h" 00028 00029 #include "hugin/MainFrame.h" 00030 00031 // utility functions 00032 bool str2double(wxString s, double & d); 00033 00035 void StoreFramePosition(wxTopLevelWindow * frame, const wxString & basename); 00037 void RestoreFramePosition(wxTopLevelWindow * frame, const wxString & basename); 00038 00040 wxString getDefaultProjectName(const Panorama & pano); 00041 00046 #ifdef _INCLUDE_UI_RESOURCES 00047 void InitXmlResource(); 00048 #endif 00049 00054 class huginApp : public wxApp 00055 { 00056 public: 00057 00060 huginApp(); 00061 00064 virtual ~huginApp(); 00065 00068 virtual bool OnInit(); 00069 00071 virtual int OnExit(); 00072 00074 static huginApp * Get(); 00075 00077 wxLocale & GetLocale() 00078 { 00079 return locale; 00080 } 00081 00082 wxString GetWorkDir() 00083 { 00084 return m_workDir; 00085 } 00086 00088 const wxString & GetXRCPath() 00089 { 00090 return m_xrcPrefix; 00091 } 00092 00094 const wxString & GetDataPath() 00095 { 00096 return m_DataDir; 00097 } 00098 00099 const wxString & GetUtilsBinDir() 00100 { 00101 return m_utilsBinDir; 00102 } 00103 00104 #ifdef __WXMAC__ 00105 //Defined in wxApp.h; This one lets project file to be opened from Finder and other applications. 00106 void MacOpenFile(const wxString &fileName); 00107 #endif 00108 00109 private: 00110 00111 00113 wxLocale locale; 00114 00116 wxString m_workDir; 00117 00118 MainFrame * frame; 00119 00120 // self 00121 static huginApp * m_this; 00122 00123 // the model 00124 Panorama pano; 00125 00126 // folder for xrc (GUI resources) 00127 wxString m_xrcPrefix; 00128 // folder for data shared by CLI and GUI to enable separate packaging of CLI tools 00129 wxString m_DataDir; 00130 // folder for CLI tools 00131 wxString m_utilsBinDir; 00132 00133 #ifdef __WXMAC__ 00134 bool m_macInitDone; 00135 bool m_macOpenFileOnStart; 00136 wxString m_macFileNameToOpenOnStart; 00137 #endif 00138 00139 }; 00140 00141 DECLARE_APP(huginApp) 00142 00143 #endif // _HUGINAPP_H
1.3.9.1