| 1 |
#ifndef CSMANAGER_H |
| 2 |
#define CSMANAGER_H |
| 3 |
|
| 4 |
#include "codelite_events.h" |
| 5 |
#include "csCommandHandlerManager.h" |
| 6 |
#include "csConfig.h" |
| 7 |
#include "file_logger.h" |
| 8 |
#include <cl_command_event.h> |
| 9 |
#include <unordered_set> |
| 10 |
#include <wx/event.h> |
| 11 |
|
| 12 |
class csManager : public wxEvtHandler |
| 13 |
{ |
| 14 |
csConfig m_config; |
| 15 |
csCommandHandlerManager m_handlers; |
| 16 |
|
| 17 |
wxString m_command; |
| 18 |
wxString m_options; |
| 19 |
bool m_startupCalled; |
| 20 |
wxSharedPtr<JSON> m_findInFilesMatches; |
| 21 |
bool m_exitNow; |
| 22 |
|
| 23 |
public: |
| 24 |
csManager(); |
| 25 |
virtual ~csManager(); |
| 26 |
bool Startup(); |
| 27 |
|
| 28 |
wxString& GetCommand() { return m_command; } |
| 29 |
wxString& GetOptions() { return m_options; } |
| 30 |
const wxString& GetCommand() const { return m_command; } |
| 31 |
const wxString& GetOptions() const { return m_options; } |
| 32 |
const csConfig& GetConfig() const { return m_config; } |
| 33 |
void LoadCommandFromINI(); |
| 34 |
void SetExitNow(bool b) { m_exitNow = b; } |
| 35 |
|
| 36 |
protected: |
| 37 |
void OnExit(); |
| 38 |
|
| 39 |
// The handler completed |
| 40 |
void OnCommandProcessedCompleted(clCommandEvent& event); |
| 41 |
|
| 42 |
// Search events |
| 43 |
void OnSearchThreadMatch(wxCommandEvent& event); |
| 44 |
void OnSearchThreadStarted(wxCommandEvent& event); |
| 45 |
void OnSearchThreadCancelled(wxCommandEvent& event); |
| 46 |
void OnSearchThreadEneded(wxCommandEvent& event); |
| 47 |
}; |
| 48 |
|
| 49 |
#endif // CSMANAGER_H |