KoMo2  1.0.0
A modern ARM emulator GUI.
TerminalView.h
Go to the documentation of this file.
1 
12 #include <gtkmm/button.h>
13 #include <gtkmm/buttonbox.h>
14 #include <gtkmm/entry.h>
15 #include <gtkmm/scrolledwindow.h>
16 #include <gtkmm/textview.h>
17 
18 class MainWindowView;
19 class TerminalModel;
20 
25 class TerminalView : public Gtk::VButtonBox {
26  public:
28  void setModel(TerminalModel* const val);
29 
30  // ! Getters amd setters
31 
32  Gtk::TextView* const getTextView();
33  Gtk::Button* const getClearButton();
34  Gtk::Entry* const getInputBox();
35 
36  private:
40  Gtk::Button clearButton;
41 
46  Gtk::ScrolledWindow scroll;
47 
51  Gtk::TextView textView;
52 
56  Gtk::Entry inputBox;
57 
62  Gtk::HButtonBox layout;
63 
68 
73 
74  void initClearButton();
75  void initTextView();
76  void initInputBox();
77  void initScrollView();
78  void packChildren();
79 
80  // ! Deleted special member functions
81  // stops these functions from being misused, creates a sensible error
82  TerminalView(const TerminalView&) = delete;
83  TerminalView(const TerminalView&&) = delete;
84  TerminalView& operator=(const TerminalView&) = delete;
85  TerminalView& operator=(const TerminalView&&) = delete;
86 };
void initScrollView()
Initialises the scroll view.
void packChildren()
Pack all of the child elements together and show them.
Gtk::Button clearButton
The button which clears the terminal when clicked.
Definition: TerminalView.h:40
Gtk::ScrolledWindow scroll
A container class for the textView member, which allows the text box to be scrolled.
Definition: TerminalView.h:46
Gtk::Entry *const getInputBox()
Returns a constant pointer to the input box.
Represents any data or functions related to the information, or manipulation of the information...
Definition: TerminalModel.h:19
MainWindowView * parent
A pointer to the parent view.
Definition: TerminalView.h:67
TerminalView(MainWindowView *const parent)
Construct a new TerminalView::TerminalView object.
Gtk::TextView textView
A TextView which displays any output from Jimulator and KoMo2.
Definition: TerminalView.h:51
void initClearButton()
Initialises the clear button.
Gtk::Button *const getClearButton()
Returns a constant pointer to the clear button.
void setModel(TerminalModel *const val)
Sets the model member.
void initInputBox()
Initialises the input box.
Gtk::Entry inputBox
An input box which directly pipes information into Jimulator.
Definition: TerminalView.h:56
Gtk::TextView *const getTextView()
Returns a constant pointer to the output box.
The class definition of the main window of the program. This main window is the mater view of the pro...
Gtk::HButtonBox layout
A layout which allows for the inputBox and clearButton to be placed side-by-side. ...
Definition: TerminalView.h:62
void initTextView()
Initialises the output box.
The GUI element which encapsulates the "clear" button, the output text box, and the input text box at...
Definition: TerminalView.h:25
TerminalModel * model
A pointer to the related model.
Definition: TerminalView.h:72