00001
00002
00027 #include "RunStitchFrame.h"
00028 #include "Batch.h"
00029 #include "BatchFrame.h"
00030
00031 #include <wx/dir.h>
00032 #include <wx/wfstream.h>
00033 #include <wx/filefn.h>
00034 #include <wx/snglinst.h>
00035 #include <wx/ipc.h>
00036
00037 #include <hugin_config.h>
00038 #include <wx/cmdline.h>
00039
00040 #ifndef FRAMEARRAY
00041 #define FRAMEARRAY
00042 WX_DEFINE_ARRAY_PTR(RunStitchFrame*,FrameArray);
00043 #endif
00044
00045 #ifndef PTBATCHERGUI_H
00046 #define PTBATCHERGUI_H
00047
00048
00054 class BatchIPCConnection : public wxConnection
00055 {
00056 public:
00058 #if wxCHECK_VERSION(2,9,0)
00059 virtual const void* OnRequest(const wxString& topic, const wxString& item, size_t* size = NULL, wxIPCFormat format = wxIPC_TEXT);
00060 #else
00061 virtual wxChar* OnRequest(const wxString& topic, const wxString& item, int* size = NULL, wxIPCFormat format = wxIPC_TEXT);
00062 #endif
00063 };
00064
00066 class BatchIPCServer : public wxServer
00067 {
00068 public:
00070 virtual wxConnectionBase* OnAcceptConnection (const wxString& topic);
00071 };
00072
00074 const wxString IPC_START(wxT("BatchStart"));
00075
00080 class PTBatcherGUI : public wxApp
00081 {
00082 public:
00085 virtual bool OnInit();
00086 virtual int OnExit();
00087
00088
00089 void OnItemActivated(wxListEvent& event);
00090 void OnKeyDown(wxKeyEvent& event);
00091
00092
00093 ProjectArray projList;
00094
00095 FrameArray stitchFrames;
00096 BatchFrame* GetFrame()
00097 {
00098 return m_frame;
00099 };
00100
00101 #ifdef __WXMAC__
00102
00103
00104
00105 #endif
00106
00107 private:
00108 BatchFrame* m_frame;
00109 wxLocale m_locale;
00110 wxString m_xrcPrefix;
00111 wxSingleInstanceChecker* m_checker;
00112 BatchIPCServer* m_server;
00113
00114 #ifdef __WXMAC__
00115 wxString m_macFileNameToOpenOnStart;
00116 #endif
00117
00118 DECLARE_EVENT_TABLE()
00119 };
00120
00121 DECLARE_APP(PTBatcherGUI)
00122
00123 #endif