Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PTBatcherGUI.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
2 
27 #include "RunStitchFrame.h"
28 #include "Batch.h"
29 #include "BatchFrame.h"
30 
31 #include <wx/dir.h>
32 #include <wx/wfstream.h>
33 #include <wx/filefn.h>
34 #include <wx/snglinst.h>
35 #include <wx/ipc.h>
36 
37 #include <hugin_config.h>
38 #include <wx/cmdline.h>
39 
40 #ifndef FRAMEARRAY
41 #define FRAMEARRAY
43 #endif
44 
45 #ifndef PTBATCHERGUI_H
46 #define PTBATCHERGUI_H
47 // **********************************************************************
48 
54 class BatchIPCConnection : public wxConnection
55 {
56 public:
58  virtual const void* OnRequest(const wxString& topic, const wxString& item, size_t* size = NULL, wxIPCFormat format = wxIPC_TEXT);
59 };
60 
62 class BatchIPCServer : public wxServer
63 {
64 public:
66  virtual wxConnectionBase* OnAcceptConnection (const wxString& topic);
67 };
68 
70 const wxString IPC_START(wxT("BatchStart"));
71 
76 class PTBatcherGUI : public wxApp
77 {
78 public:
81  virtual bool OnInit();
82  virtual int OnExit();
83 #if wxUSE_ON_FATAL_EXCEPTION
84 #if wxCHECK_VERSION(3,1,0)
85  virtual void OnFatalException() wxOVERRIDE;
86 #else
87  virtual void OnFatalException();
88 #endif
89 #endif
90 
91  //Handles some input keys for the frame
92  void OnItemActivated(wxListEvent& event);
93 
94  //Main batch list
95  ProjectArray projList;
96  //List of projects in progress (their RunStitchFrames)
97  FrameArray stitchFrames;
99  {
100  return m_frame;
101  };
102 
103 #ifdef __WXMAC__
104 
105  void MacOpenFiles(const wxArrayString &fileNames);
106 #endif
107 
108 private:
110  wxLocale m_locale;
111  wxString m_xrcPrefix;
112  wxSingleInstanceChecker* m_checker;
114 
115  DECLARE_EVENT_TABLE()
116 };
117 
118 DECLARE_APP(PTBatcherGUI)
119 
120 #endif //PTBATCHERGUI_H
ProjectArray projList
Definition: PTBatcherGUI.h:95
Stitch a pto project file, with GUI output etc.
wxString m_xrcPrefix
Definition: PTBatcherGUI.h:111
const wxString IPC_START(wxT("BatchStart"))
topic name for BatchIPCConnection and BatchIPCServer
BatchFrame * m_frame
Definition: PTBatcherGUI.h:101
WX_DEFINE_ARRAY_PTR(MyPipedProcess *, MyProcessesArray)
virtual const void * OnRequest(const wxString &topic, const wxString &item, size_t *size=NULL, wxIPCFormat format=wxIPC_TEXT)
request handler for transfer
virtual bool OnInit()
pseudo constructor.
virtual wxConnectionBase * OnAcceptConnection(const wxString &topic)
accept connection handler (establish the connection)
wxLocale m_locale
Definition: PTBatcherGUI.h:110
server which implements the communication between different PTBatcherGUI instances (see BatchIPCConne...
Definition: PTBatcherGUI.h:62
BatchFrame * GetFrame()
Definition: PTBatcherGUI.h:98
The application class for hugin_stitch_project.
Definition: PTBatcherGUI.h:76
Batch processor for Hugin with GUI.
virtual int OnExit()
wxSingleInstanceChecker * m_checker
Definition: PTBatcherGUI.h:112
FrameArray stitchFrames
Definition: PTBatcherGUI.h:97
Batch processor for Hugin.
void OnItemActivated(wxListEvent &event)
class for communication between different PTBatcherGUI instances
Definition: PTBatcherGUI.h:54
BatchIPCServer * m_server
Definition: PTBatcherGUI.h:113