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  virtual void OnFatalException() wxOVERRIDE;
85 #endif
86 
87  //Main batch list
88  ProjectArray projList;
89  //List of projects in progress (their RunStitchFrames)
90  FrameArray stitchFrames;
92  {
93  return m_frame;
94  };
95 
96 #ifdef __WXMAC__
97 
98  void MacOpenFiles(const wxArrayString &fileNames);
99 #endif
100 
101 private:
103  wxLocale m_locale;
104  wxString m_xrcPrefix;
105  wxSingleInstanceChecker* m_checker;
107 };
108 
109 DECLARE_APP(PTBatcherGUI)
110 
111 #endif //PTBATCHERGUI_H
ProjectArray projList
Definition: PTBatcherGUI.h:88
Stitch a pto project file, with GUI output etc.
wxString m_xrcPrefix
Definition: PTBatcherGUI.h:104
const wxString IPC_START(wxT("BatchStart"))
topic name for BatchIPCConnection and BatchIPCServer
BatchFrame * m_frame
Definition: PTBatcherGUI.h:94
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:103
server which implements the communication between different PTBatcherGUI instances (see BatchIPCConne...
Definition: PTBatcherGUI.h:62
BatchFrame * GetFrame()
Definition: PTBatcherGUI.h:91
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:105
FrameArray stitchFrames
Definition: PTBatcherGUI.h:90
Batch processor for Hugin.
class for communication between different PTBatcherGUI instances
Definition: PTBatcherGUI.h:54
BatchIPCServer * m_server
Definition: PTBatcherGUI.h:106