wxMaxima
Loading...
Searching...
No Matches
XmlInspector.h
Go to the documentation of this file.
1// -*- mode: c++; c-file-style: "linux"; c-basic-offset: 2; indent-tabs-mode: nil -*-
2//
3// Copyright (C) 2015 Gunter Königsmann <wxMaxima@physikbuch.de>
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 2 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//
16// You should have received a copy of the GNU General Public License
17// along with this program; if not, write to the Free Software
18// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19//
20// SPDX-License-Identifier: GPL-2.0+
21
27#include "precomp.h"
28#include <wx/wx.h>
29#include <wx/richtext/richtextctrl.h>
30#include <vector>
31
32#ifndef XMLINSPECTOR_H
33#define XMLINSPECTOR_H
34
39class XmlInspector : public wxRichTextCtrl
40{
41public:
42 XmlInspector(wxWindow *parent, int id);
43
47
49 virtual void Clear();
50
52 void Add_ToMaxima(const wxString &text);
54 void Add_FromMaxima(const wxString &text);
56 void UpdateContents();
58 bool UpdateNeeded(){return m_updateNeeded;}
59private:
60 bool m_updateNeeded;
61 wxString m_fromMaxima;
62 wxString m_toMaxima;
63 bool m_clear;
64 enum xmlInspectorIDs
65 {
66 XmlInspector_ctrl_id = 4,
67 XmlInspector_regex_id
68 };
69 enum monitorState
70 {
71 clear,
72 fromMaxima,
73 toMaxima
74 };
75 monitorState m_state;
76
77 wxChar m_lastChar = '\0';
78 int m_indentLevel;
79
80 wxString IndentString(int level);
81};
82
83#endif // XMLINSPECTOR_H
This class generates a pane displaying the communication between maxima and wxMaxima.
Definition: XmlInspector.h:40
void Add_ToMaxima(const wxString &text)
Add some text we sent to maxima.
Definition: XmlInspector.cpp:159
virtual void Clear()
Remove all text from the editor.
Definition: XmlInspector.cpp:49
bool UpdateNeeded()
Do we need to update the XmlInspector's display?
Definition: XmlInspector.h:58
~XmlInspector()
The destructor.
Definition: XmlInspector.cpp:47
void UpdateContents()
Actually draw the updates.
Definition: XmlInspector.cpp:56
void Add_FromMaxima(const wxString &text)
Add some text we have received from maxima.
Definition: XmlInspector.cpp:169