- enum {
- MSG_BACKGROUND_SUPERVISOR_ADD = 7500, // sends to BackgroundManager and Document
- MSG_BACKGROUND_SUPERVISOR_REMOVE = 7501, // sends to BackgroundManager and Document
- MSG_BACKGROUND_SUPERVISOR_UNIT_TICK = 7502, // sends to BackgroundManager for progress bars
- MSG_BACKGROUND_SUPERVISOR_CANCEL = 7503, // *sent* to Supervisor to cancel process
-
- MSG_WORKER_THREAD_UNIT_TICK = 7504,
- MSG_WORKER_THREAD_DONE = 7505,
- MSG_WORKER_THREAD_FAIL = 7506, // sent by workers when they fail
- };
-
- BackgroundSupervisor()
- : m_bDone(false), wxEvtHandler()
- {}
-
- virtual ~BackgroundSupervisor()
- {}
-
- virtual void cancel() = 0;
- virtual bool start() = 0;
- virtual bool testDone() = 0;
- virtual void OnWorkerFail(wxCommandEvent& event) = 0;
- virtual void OnWorkerUnitTick(wxCommandEvent& event) = 0;
- virtual void OnWorkerDone(wxCommandEvent& event) = 0;