Code::Blocks  SVN r11506
breakpointsdlg.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 BREAKPOINTSDLG_H
7 #define BREAKPOINTSDLG_H
8 
9 #include <vector>
10 #include <wx/panel.h>
11 #include <cbdebugger_interfaces.h>
12 
13 #ifndef CBPRECOMP
14  #include <wx/imaglist.h>
15 #endif
16 
17 class cbBreakpoint;
18 class CodeBlocksEvent;
19 class cbDebuggerPlugin;
20 class wxCommandEvent;
21 class wxListCtrl;
22 class wxListEvent;
23 
24 class BreakpointsDlg : public wxPanel, public cbBreakpointsDlg
25 {
26  public:
28 
29  wxWindow* GetWindow() { return this; }
30 
31  bool AddBreakpoint(cbDebuggerPlugin *plugin, const wxString& filename, int line);
32  bool RemoveBreakpoint(cbDebuggerPlugin *plugin, const wxString& filename, int line);
33  void RemoveAllBreakpoints();
34  void EditBreakpoint(const wxString& filename, int line);
35  void EnableBreakpoint(const wxString& filename, int line, bool enable);
36 
37  void Reload();
38  private:
39 
40  void OnRemove(wxCommandEvent& event);
41  void OnRemoveAll(wxCommandEvent& event);
42  void OnProperties(wxCommandEvent& event);
43  void OnOpen(wxCommandEvent& event);
44  void OnEnable(wxCommandEvent& event);
45  void OnShowTemp(wxCommandEvent& event);
46  void OnRightClick(wxListEvent& event);
47  void OnDoubleClick(wxListEvent& event);
48  void OnBreakpointAdd(CodeBlocksEvent& event);
49  void OnBreakpointEdit(CodeBlocksEvent& event);
50  void OnKeyUp(wxKeyEvent& event);
51  void OnUpdateUI(wxUpdateUIEvent &event);
52  private:
53  enum Columns
54  {
55  Type = 0,
60  };
61 
62  friend struct FindBreakpointPred;
63 
64  struct Item
65  {
66  Item(const cb::shared_ptr<cbBreakpoint> &breakpoint_in, cbDebuggerPlugin *plugin_in, wxString const &pluginName_in) :
67  breakpoint(breakpoint_in),
68  plugin(plugin_in),
69  pluginName(pluginName_in)
70  {
71  }
72 
73  cb::shared_ptr<cbBreakpoint> breakpoint;
76  };
77  typedef std::vector<Item> Items;
78  private:
79  Items::iterator FindBreakpoint(const wxString &filename, int line);
80  void BreakpointProperties(const Item &item);
81 
82  private:
86  private:
87  DECLARE_EVENT_TABLE()
88 };
89 
90 #endif // BREAKPOINTSDLG_H
void OnBreakpointEdit(CodeBlocksEvent &event)
Items::iterator FindBreakpoint(const wxString &filename, int line)
Base class for debugger plugins.
Definition: cbplugin.h:397
void OnRemoveAll(wxCommandEvent &event)
void RemoveAllBreakpoints()
void OnShowTemp(wxCommandEvent &event)
void OnBreakpointAdd(CodeBlocksEvent &event)
wxImageList m_icons
void OnUpdateUI(wxUpdateUIEvent &event)
void BreakpointProperties(const Item &item)
bool RemoveBreakpoint(cbDebuggerPlugin *plugin, const wxString &filename, int line)
void OnEnable(wxCommandEvent &event)
A generic Code::Blocks event.
Definition: sdk_events.h:20
cb::shared_ptr< cbBreakpoint > breakpoint
std::vector< Item > Items
void OnDoubleClick(wxListEvent &event)
cbDebuggerPlugin * plugin
wxWindow * GetWindow()
void OnOpen(wxCommandEvent &event)
void EnableBreakpoint(const wxString &filename, int line, bool enable)
Item(const cb::shared_ptr< cbBreakpoint > &breakpoint_in, cbDebuggerPlugin *plugin_in, wxString const &pluginName_in)
void OnRightClick(wxListEvent &event)
bool AddBreakpoint(cbDebuggerPlugin *plugin, const wxString &filename, int line)
wxListCtrl * m_pList
void OnRemove(wxCommandEvent &event)
void OnKeyUp(wxKeyEvent &event)
void EditBreakpoint(const wxString &filename, int line)
void OnProperties(wxCommandEvent &event)