Code::Blocks  SVN r11506
debuggermenu.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3  * http://www.gnu.org/licenses/gpl-3.0.html
4  */
5 
6 #ifndef X_DEBUGGER_MENU_H
7 #define X_DEBUGGER_MENU_H
8 
9 #include <wx/event.h>
10 #include <cbdebugger_interfaces.h>
11 
12 class cbDebuggerPlugin;
13 class wxToolBar;
14 
16 {
17  public:
19 
21  void AppendWindowMenuItems(wxMenu &menu);
22 
23  public: // derived from cbDebuggerMenuHandler
24  virtual void SetActiveDebugger(cbDebuggerPlugin *active);
25  virtual void MarkActiveTargetAsValid(bool valid);
26  virtual void RebuildMenus();
27  virtual void BuildContextMenu(wxMenu &menu, const wxString& word_at_caret, bool is_running);
28 
29  virtual bool RegisterWindowMenu(const wxString &name, const wxString &help, cbDebuggerWindowMenuItem *item);
30  virtual void UnregisterWindowMenu(const wxString &name);
31  private:
32  void OnUpdateUI(wxUpdateUIEvent& event);
33  void OnStart(wxCommandEvent& event);
34  void OnBreak(wxCommandEvent& event);
35  void OnStop(wxCommandEvent& event);
36 
37  void OnContinue(wxCommandEvent& event);
38  void OnNext(wxCommandEvent& event);
39  void OnNextInstr(wxCommandEvent& event);
40  void OnStepIntoInstr(wxCommandEvent& event);
41  void OnStep(wxCommandEvent& event);
42  void OnStepOut(wxCommandEvent& event);
43  void OnRunToCursor(wxCommandEvent& event);
45 
49  void OnSendCommand(wxCommandEvent& event);
50  void OnAttachToProcess(wxCommandEvent& event);
52  void OnAddWatch(wxCommandEvent& event);
53 
56 
57  void LogActiveConfig();
58 
61 
63  private:
65  {
66  cb::shared_ptr<cbDebuggerWindowMenuItem> item;
68  };
69  typedef std::map<long, WindowMenuItem> WindowMenuItemsMap;
70  private:
71  WindowMenuItemsMap m_windowMenuItems;
75 };
76 
78 {
79  friend class DebuggerManager;
80  public:
82  wxToolBar* GetToolbar(bool create = true);
83  private:
84  void OnUpdateUI(wxUpdateUIEvent& event);
85  void OnToolInfo(wxCommandEvent& event);
86  void OnDebugWindows(wxCommandEvent& event);
87  void OnStop(wxCommandEvent& event);
88 
91 
93 };
94 
95 #endif // X_DEBUGGER_MENU_H
96 
void OnWindowMenuItemUpdateUI(wxUpdateUIEvent &event)
void OnRemoveAllBreakpoints(wxCommandEvent &event)
void OnDetachFromProcess(wxCommandEvent &event)
void OnActiveDebuggerClick(wxCommandEvent &event)
Base class for debugger plugins.
Definition: cbplugin.h:397
void OnWindowMenuItemClicked(wxCommandEvent &event)
DebuggerMenuHandler * m_menuHandler
Definition: debuggermenu.h:90
void OnStart(wxCommandEvent &event)
void OnAddWatch(wxCommandEvent &event)
void OnRunToCursor(wxCommandEvent &event)
void OnAddDataBreakpoint(wxCommandEvent &event)
virtual void BuildContextMenu(wxMenu &menu, const wxString &word_at_caret, bool is_running)
void OnBreak(wxCommandEvent &event)
void OnStep(wxCommandEvent &event)
std::map< long, WindowMenuItem > WindowMenuItemsMap
Definition: debuggermenu.h:69
void OnStop(wxCommandEvent &event)
void OnContinue(wxCommandEvent &event)
void OnNextInstr(wxCommandEvent &event)
virtual void RebuildMenus()
cbDebuggerPlugin * m_activeDebugger
Definition: debuggermenu.h:72
void OnToggleBreakpoint(wxCommandEvent &event)
void OnSetNextStatement(wxCommandEvent &event)
virtual void MarkActiveTargetAsValid(bool valid)
void OnNext(wxCommandEvent &event)
cb::shared_ptr< cbDebuggerWindowMenuItem > item
Definition: debuggermenu.h:66
void RegisterDefaultWindowItems()
void OnSendCommand(wxCommandEvent &event)
void AppendWindowMenuItems(wxMenu &menu)
void OnStepOut(wxCommandEvent &event)
void OnActiveDebuggerTargetsDefaultClick(wxCommandEvent &event)
virtual void UnregisterWindowMenu(const wxString &name)
void OnAttachToProcess(wxCommandEvent &event)
wxString m_lastCommand
Definition: debuggermenu.h:73
WindowMenuItemsMap m_windowMenuItems
Definition: debuggermenu.h:71
virtual bool RegisterWindowMenu(const wxString &name, const wxString &help, cbDebuggerWindowMenuItem *item)
virtual void SetActiveDebugger(cbDebuggerPlugin *active)
void OnUpdateUI(wxUpdateUIEvent &event)
void OnStepIntoInstr(wxCommandEvent &event)