![]() |
KoMo2
1.0.0
A modern ARM emulator GUI.
|
Represents any data or functions related to the information, or manipulation of the information, within the terminal view. More...
#include <TerminalModel.h>
Public Member Functions | |
| TerminalModel (TerminalView *const view, KoMo2Model *const parent) | |
| Construct a new TerminalModel::TerminalModel object. More... | |
| void | appendTextToTextView (std::string text) |
| Appends a string to the current text view of the terminal, and scroll to the bottom of the terminal. More... | |
| const std::string | readJimulator () const |
| Reads for any data from Jimulator. More... | |
| virtual void | changeJimulatorState (const JimulatorState newState) override |
| Handles the internal state of Jimulator being changed. More... | |
| virtual const bool | handleKeyPress (const GdkEventKey *const e) override |
| Handles any key press events. More... | |
| TerminalView *const | getView () const |
| Gets a pointer to the view object. More... | |
Private Member Functions | |
| const bool | isFocused () |
| Returns whether or not the input box has focus or not. More... | |
| void | onClearClick () |
| Handles the clear button being clicked. | |
| TerminalModel (const TerminalModel &)=delete | |
| TerminalModel (const TerminalModel &&)=delete | |
| TerminalModel & | operator= (const TerminalModel &)=delete |
| TerminalModel & | operator= (const TerminalModel &&)=delete |
Private Member Functions inherited from Model | |
| Model (KoMo2Model *const parent) | |
| Constructs a new Model object - just assigns the parent variable. More... | |
| KoMo2Model *const | getParent () const |
| Returns the parent pointer. More... | |
| template<class T1 , class T2 > | |
| void | setButtonListener (Gtk::Button *const button, const T1 b, const T2 c) |
| Connect any button to any member function of. More... | |
| void | setButtonState (Gtk::Button *const button, const bool state, Gtk::Image *const img=nullptr, const std::string newTooltip="", const std::string newLabelText="") const |
Sets the state of a button to some boolean - the assumption is that if a button is not meant to be sensitive (get_sensitive() == false) then it should also not have a tooltip or many other attributes. You can also optionally update the buttons image, tooltip text, and label text. More... | |
| JimulatorState | getJimulatorState () const |
| Return the jimulatorState member object. More... | |
Private Attributes | |
| TerminalView *const | view |
| The view this model represents. | |
Represents any data or functions related to the information, or manipulation of the information, within the terminal view.
Definition at line 19 of file TerminalModel.h.
| TerminalModel::TerminalModel | ( | TerminalView *const | view, |
| KoMo2Model *const | parent | ||
| ) |
Construct a new TerminalModel::TerminalModel object.
| view | A constant pointer to the related view. |
| parent | A constant pointer to the parent model. |
Definition at line 21 of file TerminalModel.cpp.
| void TerminalModel::appendTextToTextView | ( | std::string | text | ) |
Appends a string to the current text view of the terminal, and scroll to the bottom of the terminal.
| text | The text to append to the text view. |
Definition at line 78 of file TerminalModel.cpp.
|
overridevirtual |
Handles the internal state of Jimulator being changed.
| newState |
Implements Model.
Definition at line 31 of file TerminalModel.cpp.
| TerminalView *const TerminalModel::getView | ( | ) | const |
Gets a pointer to the view object.
Definition at line 118 of file TerminalModel.cpp.
|
overridevirtual |
Handles any key press events.
| e | The key press event. |
Implements Model.
Definition at line 50 of file TerminalModel.cpp.
|
private |
Returns whether or not the input box has focus or not.
Definition at line 108 of file TerminalModel.cpp.
| const std::string TerminalModel::readJimulator | ( | ) | const |
Reads for any data from Jimulator.
Definition at line 99 of file TerminalModel.cpp.
1.8.11