-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Eran Ifrah <[email protected]>
- Loading branch information
Showing
2 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#include "DAPDebuggerPane.h" | ||
|
||
#include "DAPBreakpointsView.h" | ||
#include "DAPMainView.h" | ||
#include "DAPOutputPane.hpp" | ||
#include "DAPWatchesView.h" | ||
|
||
namespace | ||
{ | ||
const wxString DAP_DEBUGGER_PANE = _("Debugger Client"); | ||
const wxString DAP_MAIN_VIEW = _("Thread, stacks & variables"); | ||
const wxString DAP_BREAKPOINTS_VIEW = _("Breakpoints"); | ||
const wxString DAP_WATCHES_VIEW = _("Watches"); | ||
} // namespace | ||
|
||
DAPDebuggerPane::DAPDebuggerPane(wxWindow* parent, DebugAdapterClient* adapter, clModuleLogger& log) | ||
: wxPanel(parent) | ||
, LOG(log) | ||
, m_dapPlugin(adapter) | ||
{ | ||
m_book = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, | ||
kNotebook_Default | kNotebook_AllowDnD | kNotebook_FixedWidth); | ||
|
||
SetSizer(new wxBoxSizer(wxVERTICAL)); | ||
GetSizer()->Add(m_book, 1, wxEXPAND); | ||
|
||
m_mainView = new DAPMainView(m_book, m_dapPlugin, LOG); | ||
m_book->AddPage(m_mainView, DAP_MAIN_VIEW, true); | ||
|
||
m_watchesView = new DAPWatchesView(m_book, m_dapPlugin, LOG); | ||
m_book->AddPage(m_watchesView, DAP_WATCHES_VIEW, false); | ||
|
||
m_breakpointsView = new DAPBreakpointsView(m_book, m_dapPlugin, LOG); | ||
m_book->AddPage(m_breakpointsView, DAP_BREAKPOINTS_VIEW, false); | ||
|
||
GetSizer()->Fit(this); | ||
} | ||
|
||
DAPDebuggerPane::~DAPDebuggerPane() {} | ||
|
||
DAPOutputPane* DAPDebuggerPane::GetOutputView() const { return m_mainView->GetOutputPane(); } | ||
|
||
void DAPDebuggerPane::Clear() | ||
{ | ||
m_mainView->Clear(); | ||
m_watchesView->Clear(); | ||
m_breakpointsView->Clear(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef DAPDEBUGGERPANE_H | ||
#define DAPDEBUGGERPANE_H | ||
|
||
#include "Notebook.h" | ||
#include "clModuleLogger.hpp" | ||
|
||
#include <wx/panel.h> | ||
|
||
class DebugAdapterClient; | ||
class DAPMainView; | ||
class DAPBreakpointsView; | ||
class DAPWatchesView; | ||
class DAPOutputPane; | ||
|
||
class DAPDebuggerPane : public wxPanel | ||
{ | ||
public: | ||
DAPDebuggerPane(wxWindow* parent, DebugAdapterClient* adapter, clModuleLogger& log); | ||
virtual ~DAPDebuggerPane(); | ||
|
||
DAPMainView* GetMainView() const { return m_mainView; } | ||
DAPBreakpointsView* GetBreakpointsView() const { return m_breakpointsView; } | ||
DAPWatchesView* GetWatchesView() const { return m_watchesView; } | ||
DAPOutputPane* GetOutputView() const; | ||
void Clear(); | ||
|
||
private: | ||
clModuleLogger& LOG; | ||
Notebook* m_book = nullptr; | ||
DebugAdapterClient* m_dapPlugin = nullptr; | ||
DAPMainView* m_mainView = nullptr; | ||
DAPBreakpointsView* m_breakpointsView = nullptr; | ||
DAPWatchesView* m_watchesView = nullptr; | ||
}; | ||
#endif // DAPDEBUGGERPANE_H |