NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
tableeditpanel.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 TABLEEDITPANEL_HPP
20#define TABLEEDITPANEL_HPP
21
22#include <wx/wx.h>
23#include <wx/panel.h>
24#include "tableviewer.hpp"
25#include "../terminal/terminal.hpp"
26#include "../../kernel/core/ui/language.hpp"
27
28extern Language _guilang;
29
34class TablePanel : public wxPanel
35{
36 protected:
37 wxTextCtrl* m_commentField;
38 wxTextCtrl* m_sourceField;
39 wxBoxSizer* vsizer;
40 wxBoxSizer* hsizer;
41 wxStaticText* m_lastSaveText;
43
45
46 public:
48
49 TablePanel(wxFrame* parent, wxWindowID id, wxStatusBar* statusbar, bool readOnly = true);
50 void update(const NumeRe::TableMetaData& meta);
53 std::string getComment() const;
54 wxMenuBar* getMenuBar();
55 wxFrame* getFrame();
56
57 void OnClose(wxCloseEvent& event);
58
60};
61
62
63
70{
71 public:
72 TableEditPanel(wxFrame* parent, wxWindowID id, wxStatusBar* statusbar);
73
74 void OnButtonOk(wxCommandEvent& event);
75 void OnButtonCancel(wxCommandEvent& event);
76 void OnClose(wxCloseEvent& event);
77
79};
80
81#endif // TABLEEDITPANEL_HPP
82
This class handles the internal language system and returns the language strings of the selected lang...
Definition: language.hpp:38
The terminal class for the GUI. It's a specialisation of the GenericTerminal.
Definition: terminal.hpp:46
A table panel with editing functionalities. Creates APPLY and CANCEL buttons and provides their event...
void OnButtonOk(wxCommandEvent &event)
Event handler for the OK button.
void OnButtonCancel(wxCommandEvent &event)
Event handler for the CANCEL button.
void OnClose(wxCloseEvent &event)
Event handler for the CLOSE event.
TableEditPanel(wxFrame *parent, wxWindowID id, wxStatusBar *statusbar)
Constructor for the table edit panel, which creates also the buttons at the top of the window.
Generic table panel, which also contains all meta UI elements.
wxBoxSizer * vsizer
wxBoxSizer * hsizer
void OnClose(wxCloseEvent &event)
Event handler for the CLOSE event.
void update(const NumeRe::TableMetaData &meta)
Update the panel with the passed table meta data.
wxTextCtrl * m_sourceField
std::string getComment() const
Returns the comment listed in the documentation field.
wxFrame * getFrame()
Returns a pointer to the parent frame.
wxTextCtrl * m_commentField
NumeReTerminal * m_terminal
DECLARE_EVENT_TABLE()
void SetTerminal(NumeReTerminal *term)
NumeReTerminal * GetTerminal()
wxMenuBar * getMenuBar()
Returns a pointer to the menu bar of the parent frame. If no menu bar exists, a new one is created.
TableViewer * grid
wxStaticText * m_lastSaveText
TablePanel(wxFrame *parent, wxWindowID id, wxStatusBar *statusbar, bool readOnly=true)
Constructor for the generic table panel.
This class is an adaption of the wxGrid class to present the tabular data in NumeRe's memory and enab...
Definition: tableviewer.hpp:42
Encapsulating structure to gather all table meta data information.
Definition: table.hpp:32
Language _guilang