Skip to content

Commit

Permalink
Added missing files
Browse files Browse the repository at this point in the history
Signed-off-by: Eran Ifrah <[email protected]>
  • Loading branch information
eranif committed Nov 3, 2024
1 parent 940560f commit b7d1480
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
48 changes: 48 additions & 0 deletions DebugAdapterClient/DAPDebuggerPane.cpp
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();
}
35 changes: 35 additions & 0 deletions DebugAdapterClient/DAPDebuggerPane.h
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

0 comments on commit b7d1480

Please sign in to comment.