~registry/codeblocks/trunk

« back to all changes in this revision

Viewing changes to src/include/toolsmanager.h

  • Committer: mandrav
  • Date: 2007-02-12 14:55:28 UTC
  • Revision ID: svn-v4:98b59c6a-2706-0410-b7d6-d2fa1a1880c9:trunk:3594
* First part of directories layout re-organization: moved all sdk header files to a new dir named "include".

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef TOOLSMANAGER_H
 
2
#define TOOLSMANAGER_H
 
3
 
 
4
#include <wx/event.h>
 
5
#include "manager.h"
 
6
#include "menuitemsmanager.h"
 
7
#include "cbtool.h"
 
8
 
 
9
WX_DECLARE_LIST(cbTool, ToolsList);
 
10
 
 
11
// forward decls
 
12
class wxMenuBar;
 
13
class wxMenu;
 
14
class wxMenuItem;
 
15
class PipedProcess;
 
16
class CodeBlocksEvent;
 
17
 
 
18
class ToolsManager : public Mgr<ToolsManager>, public wxEvtHandler
 
19
{
 
20
        public:
 
21
                friend class Mgr<ToolsManager>;
 
22
                friend class Manager; // give Manager access to our private members
 
23
                void CreateMenu(wxMenuBar* menuBar);
 
24
                void ReleaseMenu(wxMenuBar* menuBar);
 
25
                void AddTool(const cbTool* tool, bool save = true);
 
26
                void InsertTool(int position, const cbTool* tool, bool save = true);
 
27
                void RemoveToolByIndex(int index);
 
28
                cbTool* GetToolByMenuId(int id);
 
29
                cbTool* GetToolByIndex(int index);
 
30
                int GetToolsCount() const { return m_Tools.GetCount(); }
 
31
                void BuildToolsMenu(wxMenu* menu);
 
32
                void OnToolClick(wxCommandEvent& event);
 
33
                void OnIdle(wxIdleEvent& event);
 
34
                void OnToolStdOutput(CodeBlocksEvent& event);
 
35
                void OnToolErrOutput(CodeBlocksEvent& event);
 
36
                void OnToolTerminated(CodeBlocksEvent& event);
 
37
                void OnConfigure(wxCommandEvent& event);
 
38
        private:
 
39
                ToolsManager();
 
40
                ~ToolsManager();
 
41
                void DoRemoveTool(ToolsList::Node* node);
 
42
                int Configure();
 
43
                bool Execute(const cbTool* tool);
 
44
                void LoadTools();
 
45
                void SaveTools();
 
46
 
 
47
                ToolsList        m_Tools;
 
48
                MenuItemsManager m_ItemsManager;
 
49
                wxMenu*          m_Menu;
 
50
                PipedProcess*    m_pProcess;
 
51
                int              m_Pid;
 
52
 
 
53
                DECLARE_EVENT_TABLE()
 
54
};
 
55
 
 
56
#endif // TOOLSMANAGER_H