27 #ifndef _MYEXTERNALCMDEXECDIALOG__H
28 #define _MYEXTERNALCMDEXECDIALOG__H
49 virtual void OnProcessTerminated(
MyPipedProcess *process,
int pid,
int status) = 0;
61 void PauseProcess(
bool pause =
true);
62 void ContinueProcess();
65 int ExecWithRedirect(wxString command);
69 void OnTimer(wxTimerEvent& event);
76 bool SaveLog(
const wxString &filename);
78 void CopyLogToClipboard();
80 wxArrayString GetLogAsArrayString();
82 void AddString(
const wxString& s);
88 void AddToOutput(wxInputStream & s);
90 void DoAsyncExec(
const wxString& cmd);
116 DECLARE_EVENT_TABLE()
128 : wxProcess(0), m_cmd(cmd)
135 virtual void OnTerminate(
int pid,
int status);
146 MyExecDialog(wxWindow * parent,
const wxString& title,
const wxPoint& pos,
const wxSize& size);
148 void OnCancel(wxCommandEvent& event);
150 int ExecWithRedirect(wxString command);
153 void AddString(
const wxString& s);
155 void OnProcessTerminate(wxProcessEvent & event);
165 DECLARE_EVENT_TABLE()
int MyExecuteCommandOnDialog(wxString command, wxString args, wxWindow *parent, wxString title, bool isQuoted)
execute a single command in own dialog, redirect output to frame and allow canceling ...
int MyExecuteCommandQueue(HuginQueue::CommandQueue *queue, wxWindow *parent, const wxString &title, const wxString &comment)
execute all commands in queue with redirection of output to frame and allow canceling the queue will ...
const int HUGIN_EXIT_CODE_CANCELLED
WX_DEFINE_ARRAY_PTR(MyPipedProcess *, MyProcessesArray)
MyProcessesArray m_running
MyPipedProcess(MyProcessListener *parent, const wxString &cmd)
basic classes and function for queuing commands in wxWidgets
virtual ~MyProcessListener()
wxExecuteEnv m_executeEnv
wxTimer m_timerIdleWakeUp
virtual void OnProcessTerminated(MyPipedProcess *process, int pid, int status)=0
MyExecPanel * m_execPanel
wxDECLARE_EXPORTED_EVENT(WXIMPEX, EVT_QUEUE_PROGRESS, wxCommandEvent)
MyProcessListener * m_parent
std::vector< NormalCommand * > CommandQueue
HuginQueue::CommandQueue * m_queue