forked from alpha0010/ClangLib
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathclangtoolbar.h
55 lines (45 loc) · 1.48 KB
/
clangtoolbar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef CLANGTOOLBAR_H
#define CLANGTOOLBAR_H
#include "clangpluginapi.h"
#include <sdk.h>
#include <wx/choice.h>
class ClangToolbar : public ClangPluginComponent
{
public:
ClangToolbar();
virtual ~ClangToolbar();
void OnAttach(IClangPlugin* pClangPlugin);
void OnRelease(IClangPlugin* pClangPlugin);
public: // Code::Blocks events
void OnEditorActivate(CodeBlocksEvent& event);
void OnEditorClose(CodeBlocksEvent& event);
void OnEditorHook(cbEditor* ed, wxScintillaEvent& event);
public: // Clang events
void OnTokenDatabaseUpdated(ClangEvent& event);
public: // Command events
void OnUpdateSelection(wxCommandEvent& evt);
void OnUpdateContents(wxCommandEvent& evt);
void OnScope(wxCommandEvent& evt);
void OnFunction(wxCommandEvent& evt);
public:
bool BuildToolBar(wxToolBar* toolBar);
/** enable the two wxChoices */
void EnableToolbarTools(bool enable = true);
// Updates the toolbar
void UpdateToolBar();
// Updates the functions when the scope has changed
void UpdateFunctions(const wxString& scopeItem);
ClTranslUnitId GetCurrentTranslationUnitId();
private:
ClTranslUnitId m_TranslUnitId;
int m_EditorHookId;
int m_CurrentEditorLine;
private:
/** the CC's toolbar */
wxToolBar* m_ToolBar;
/** function choice control of CC's toolbar, it is the second choice */
wxChoice* m_Function;
/** namespace/scope choice control, it is the first choice control */
wxChoice* m_Scope;
};
#endif