PTBatcherGUI.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
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     virtual const void* OnRequest(const wxString& topic, const wxString& item, size_t* size = NULL, wxIPCFormat format = wxIPC_TEXT);
00059 };
00060 
00062 class BatchIPCServer : public wxServer
00063 {
00064 public:
00066     virtual wxConnectionBase* OnAcceptConnection (const wxString& topic);
00067 };
00068 
00070 const wxString IPC_START(wxT("BatchStart"));
00071 
00076 class PTBatcherGUI : public wxApp
00077 {
00078 public:
00081     virtual bool OnInit();
00082     virtual int OnExit();
00083 #if wxUSE_ON_FATAL_EXCEPTION
00084 #if wxCHECK_VERSION(3,1,0)
00085     virtual void OnFatalException() wxOVERRIDE;
00086 #else
00087     virtual void OnFatalException();
00088 #endif
00089 #endif
00090 
00091     //Handles some input keys for the frame
00092     void OnItemActivated(wxListEvent& event);
00093     void OnKeyDown(wxKeyEvent& event);
00094 
00095     //Main batch list
00096     ProjectArray projList;
00097     //List of projects in progress (their RunStitchFrames)
00098     FrameArray stitchFrames;
00099     BatchFrame* GetFrame()
00100     {
00101         return m_frame;
00102     };
00103 
00104 #ifdef __WXMAC__
00105 
00106     void MacOpenFiles(const wxArrayString &fileNames);
00107 #endif
00108 
00109 private:
00110     BatchFrame* m_frame;
00111     wxLocale m_locale;
00112     wxString m_xrcPrefix;
00113     wxSingleInstanceChecker* m_checker;
00114     BatchIPCServer* m_server;
00115 
00116     DECLARE_EVENT_TABLE()
00117 };
00118 
00119 DECLARE_APP(PTBatcherGUI)
00120 
00121 #endif //PTBATCHERGUI_H

Generated on 8 Dec 2016 for Hugintrunk by  doxygen 1.4.7