NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
debugviewer.hpp
Go to the documentation of this file.
1/*****************************************************************************
2 NumeRe: Framework fuer Numerische Rechnungen
3 Copyright (C) 2017 Erik Haenel et al.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17******************************************************************************/
18
19#ifndef DEBUGVIEWER_HPP
20#define DEBUGVIEWER_HPP
21
22#include "viewerframe.hpp"
23#include "../terminal/terminal.hpp"
24#include "../../common/Options.h"
25#include "variableviewer.hpp"
26//#include <wx/treelist.h>
27#include <wx/listctrl.h>
28#include <wx/panel.h>
29#include <string>
30#include <vector>
31
33{
34 private:
36 wxTextCtrl* m_expression;
37 wxTextCtrl* m_lineNumber;
38 wxTextCtrl* m_errorMessage;
39 wxListCtrl* m_stacktrace;
42
46
47 void initializeToolbar();
48 void setExpression(const std::string& sLineNumber, const std::string& sExpression);
49
50 void getInformationByStackId(size_t id);
51 void OnStackItemActivate(wxListEvent& event);
52 void OnMenuEvent(wxCommandEvent& event);
53
54 void EnableDebugger(bool enable);
55
56 public:
57 DebugViewer(wxWindow* parent, Options* _options, const wxString& title = "NumeRe: Debugger");
58
59 void updateSettings();
61 void setDebugInfo(const wxString& title, const std::vector<std::string>& vStack);
62 void OnClose(wxCloseEvent& event);
64
66};
67
68
69#endif // DEBUGVIEWER_HPP
70
void getInformationByStackId(size_t id)
This private member function gets the debugger information from the selected stack ID.
void OnMenuEvent(wxCommandEvent &event)
This member function is the event handler routine for the toolbar functions.
void EnableDebugger(bool enable)
This member function may enable or disable the debugger toolbar.
void OnClose(wxCloseEvent &event)
This member function is called upon closing the debugger window: it won't be destroyed but hidden and...
wxTextCtrl * m_lineNumber
Definition: debugviewer.hpp:37
wxTextCtrl * m_errorMessage
Definition: debugviewer.hpp:38
VariableViewer * m_varViewer
Definition: debugviewer.hpp:35
void setExpression(const std::string &sLineNumber, const std::string &sExpression)
This private member function updates the expression element in the debugger window and changes the co...
NumeReTerminal * m_terminal
Definition: debugviewer.hpp:40
void OnStackItemActivate(wxListEvent &event)
This member function is the event handler function for double-clicking on a stack item.
void OnExecutionFinished()
This member function will inform the debugger window that the execution of the current code has ben f...
DebugViewer(wxWindow *parent, Options *_options, const wxString &title="NumeRe: Debugger")
Constructor. Creates the necessary controls of the debugger window.
Definition: debugviewer.cpp:48
Options * m_options
Definition: debugviewer.hpp:41
void setDebugInfo(const wxString &title, const std::vector< std::string > &vStack)
This member function is used from the main window to update the debugger window with the information ...
wxTextCtrl * m_expression
Definition: debugviewer.hpp:36
void updateSettings()
This member function should be called after the user modified the application settings....
void setTerminal(NumeReTerminal *term)
Definition: debugviewer.hpp:60
bool b_transferredControl
Definition: debugviewer.hpp:43
wxListCtrl * m_stacktrace
Definition: debugviewer.hpp:39
void initializeToolbar()
This private member function creates the toolbar of the debugger window.
The terminal class for the GUI. It's a specialisation of the GenericTerminal.
Definition: terminal.hpp:46
This class implements an interface of the internal Settings object adapted to be usable from the GUI.
Definition: Options.h:178
This class generalizes a set of basic floating window functionalities like being closable by pressing...
Definition: viewerframe.hpp:31