28 virtual const bool handleKeyPress(
const GdkEventKey*
const e)
override;
This file declares the class RegistersModel, which represents the logical data in memory that relates...
Represents any data or functions related to the information, or manipulation of the information...
TerminalView *const getView() const
Gets a pointer to the view object.
void onClearClick()
Handles the clear button being clicked.
KoMo2Model *const parent
All models have a parent model - KoMo2Model, the most senior model in the hierarchy, sets its parent to self.
const std::string readJimulator() const
Reads for any data from Jimulator.
JimulatorState
Describe the 5 states of Jimulator.
void appendTextToTextView(std::string text)
Appends a string to the current text view of the terminal, and scroll to the bottom of the terminal...
virtual void changeJimulatorState(const JimulatorState newState) override
Handles the internal state of Jimulator being changed.
The superclass for all other Model classes. Uses a pure virtual function, so is abastract. Keeps KoMo2Model as a friend so it alone can call setJimulatorState. This class provides basic data that are needed by all other.
virtual const bool handleKeyPress(const GdkEventKey *const e) override
Handles any key press events.
TerminalView *const view
The view this model represents.
const bool isFocused()
Returns whether or not the input box has focus or not.
The logical model of the entire application. All other models should be member variables of this mode...
The GUI element which encapsulates the "clear" button, the output text box, and the input text box at...
TerminalModel(TerminalView *const view, KoMo2Model *const parent)
Construct a new TerminalModel::TerminalModel object.