-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGUIDebuggerWindow.h
More file actions
95 lines (84 loc) · 2.96 KB
/
GUIDebuggerWindow.h
File metadata and controls
95 lines (84 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef GUI_DEBUGGER_WINDOW_H
#define GUI_DEBUGGER_WINDOW_H
#include <gtkmm/window.h>
#include <gtkmm/button.h>
#include <gtkmm/box.h>
#include <gtkmm/treeview.h>
#include <gtkmm/treestore.h>
#include <gtkmm/liststore.h>
#include <gtkmm/grid.h>
#include <gtkmm/scrolledwindow.h>
#include <glibmm/refptr.h>
#include <gtkmm/frame.h>
#include <gtkmm/textview.h>
#include <gtkmm/enums.h>
#include <stack>
#include <set>
class GUIDebuggerWindow : public Gtk::Window {
public:
GUIDebuggerWindow();
virtual ~GUIDebuggerWindow(){};
Gtk::Button continueButton, stepOverButton, stepInButton, pauseButton;
Gtk::Button addBreakPointButton, removeBreakPointButton, clearAllBreakpointsButton;
Glib::RefPtr<Gtk::TreeSelection> selection;
Gtk::TreeView callStackView;
void addVariableRow(std::string name, std::string value);
void addVariableChildRow(std::string name, std::string value);
void popOut();
void clearVariables();
int getBreakPointValueFromEntry();
void updateCallStack(std::vector<int> ids);
int getCallIndex(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* c);
void fillBuffer(std::string code, int buffer);
void updateBuffer(int line, int buffer);
std::set<int> brlines;
int lastHighlightedLine;
protected:
Gtk::Grid masterGrid;
Gtk::Box buttonBox;
Gtk::Box breakPointBox;
Gtk::Box innerBreakPointEntryBox;
Gtk::Box innerBreakPointButtonsBox;
Gtk::Entry breakPointEntry;
class VariablesDisplayColumns : public Gtk::TreeModel::ColumnRecord{
public:
VariablesDisplayColumns(){
this->add(variableNameColumn);
this->add(variableValueColumn);
}
Gtk::TreeModelColumn<Glib::ustring> variableNameColumn;
Gtk::TreeModelColumn<Glib::ustring> variableValueColumn;
};
class CallStackColumns : public Gtk::TreeModel::ColumnRecord {
public:
CallStackColumns() {
this->add(functionCallID);
this->add(functionCallIndex);
}
Gtk::TreeModelColumn<int> functionCallID;
Gtk::TreeModelColumn<int> functionCallIndex;
};
VariablesDisplayColumns varDispColumnns;
CallStackColumns callStackDispColumns;
Gtk::ScrolledWindow variablesContainer;
Glib::RefPtr<Gtk::TreeStore> variablesDisplayEntries;
Gtk::TreeView variablesDisplay;
Glib::RefPtr<Gtk::ListStore> callStackEntries;
Gtk::ScrolledWindow callStackContainer;
Gtk::Grid codeGrid;
Gtk::Frame codeContainerFrame;
Gtk::Frame codeContainerFrame2;
std::vector<Glib::RefPtr<Gtk::TextTag>> tags, tags2;
Glib::RefPtr<Gtk::TextBuffer> m_refTextBuffer;
Glib::RefPtr<Gtk::TextBuffer> m_refTextBuffer2;
Gtk::ScrolledWindow m_ScrolledWindow;
Gtk::ScrolledWindow m_ScrolledWindow2;
Gtk::TextView m_TextView;
Gtk::TextView m_TextView2;
private:
Gtk::TreeModel::Row lastRowInserted;
std::stack<Gtk::TreeModel::Row> st;
std::string src1;
std::string src2;
};
#endif