| 1 |
#ifndef DAPBREAKPOINTSVIEW_H |
| 2 |
#define DAPBREAKPOINTSVIEW_H |
| 3 |
|
| 4 |
#include "SessionBreakpoints.hpp" |
| 5 |
#include "UI.h" |
| 6 |
#include "clModuleLogger.hpp" |
| 7 |
#include "dap/dap.hpp" |
| 8 |
|
| 9 |
#include <unordered_set> |
| 10 |
class DebugAdapterClient; |
| 11 |
|
| 12 |
struct BreakpointClientData { |
| 13 |
dap::Breakpoint m_breapoint; |
| 14 |
BreakpointClientData(const dap::Breakpoint& breakpoint) |
| 15 |
: m_breapoint(breakpoint) |
| 16 |
{ |
| 17 |
} |
| 18 |
~BreakpointClientData() {} |
| 19 |
}; |
| 20 |
|
| 21 |
class DAPBreakpointsView : public DAPBreakpointsViewBase |
| 22 |
{ |
| 23 |
DebugAdapterClient* m_plugin = nullptr; |
| 24 |
std::vector<dap::FunctionBreakpoint> m_functionBreakpoints; |
| 25 |
clModuleLogger& LOG; |
| 26 |
|
| 27 |
private: |
| 28 |
BreakpointClientData* GetItemData(const wxDataViewItem& item); |
| 29 |
|
| 30 |
protected: |
| 31 |
virtual void OnBreakpointsContextMenu(wxDataViewEvent& event); |
| 32 |
void OnBreakpointActivated(wxDataViewEvent& item); |
| 33 |
void OnNewFunctionBreakpoint(wxCommandEvent& event); |
| 34 |
void OnDeleteAllBreakpoints(wxCommandEvent& event); |
| 35 |
void OnNewSourceBreakpoint(wxCommandEvent& event); |
| 36 |
|
| 37 |
public: |
| 38 |
DAPBreakpointsView(wxWindow* parent, DebugAdapterClient* plugin, clModuleLogger& log); |
| 39 |
virtual ~DAPBreakpointsView(); |
| 40 |
|
| 41 |
/** |
| 42 |
* @brief initialise the view by syncing the data with the store |
| 43 |
*/ |
| 44 |
void RefreshView(const SessionBreakpoints& breakpoints); |
| 45 |
}; |
| 46 |
|
| 47 |
#endif // DAPBREAKPOINTSVIEW_H |