KoMo2  1.0.0
A modern ARM emulator GUI.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ControlsView Class Reference

ControlsView is the visual aspect of the controls that run along the top of the KoMo2 GUI. This class contains information and functionality relating to the getting and setting of visual information, such as the layout and styling. Little or no logic or data is kept in this class. More...

#include <ControlsView.h>

Inheritance diagram for ControlsView:

Public Member Functions

 ControlsView (MainWindowView *const parent)
 Construct a new Controls View. More...
 
Gtk::LinkButton *const getHelpButton ()
 Gets the helpButton member variable. More...
 
Gtk::Button *const getReloadJimulatorButton ()
 Gets the reloadJimulatorButton member variable. More...
 
Gtk::Button *const getPauseResumeButton ()
 Gets the pauseResumeButton member variable. More...
 
Gtk::Button *const getSingleStepExecuteButton ()
 Gets the singleStepExecuteButton member variable. More...
 
Gtk::Button *const getHaltExecutionButton ()
 Gets the haltExecutionButton member variable. More...
 
void setModel (ControlsModel *const val)
 Set the model member variable. More...
 
void setButtonImages (const std::string projectRoot)
 Sets the images for 4 of the buttons. More...
 

Private Member Functions

void initProgramControlsContainer ()
 Packs children into the controlsView, and sets the layout and size of it.
 
void initHelpButton ()
 Setup all of the information about the help button.
 
void initHaltExecutionButton ()
 Sets up all of the information about the halt execution button.
 
void initSingleStepExecuteButton ()
 Sets up all of the information about the single step execution button.
 
void initReloadJimulatorButton ()
 Sets up all of the information about the reload Jimulator button.
 
void initPauseResumeButton ()
 Sets up all of the information about the pause & resume button. This is emptier than its sibling functions, as a significant amount of the information about this button changes at run time.
 
 ControlsView (const ControlsView &)=delete
 
 ControlsView (const ControlsView &&)=delete
 
ControlsViewoperator= (const ControlsView &)=delete
 
ControlsViewoperator= (const ControlsView &&)=delete
 

Private Attributes

MainWindowView *const parent
 A pointer to the parent view.
 
ControlsModelmodel
 A pointer to the related model.
 
Gtk::LinkButton helpButton
 A button which, when clicked, opens up an about/help window.
 
Gtk::Button reloadJimulatorButton
 A button which, when clicked, reloads the program into Jimulator again.
 
Gtk::Button pauseResumeButton
 A button which, when clicked, toggles between playing and pausing the execution of Jimulator (i.e. if currently paused, play, and vice-versa)
 
Gtk::Button singleStepExecuteButton
 A button which, when clicked, performs a single-step of execution IF Jimulator is already paused.
 
Gtk::Button haltExecutionButton
 A button which, when clicked, halts the current execution of Jimulator.
 

Detailed Description

ControlsView is the visual aspect of the controls that run along the top of the KoMo2 GUI. This class contains information and functionality relating to the getting and setting of visual information, such as the layout and styling. Little or no logic or data is kept in this class.

Definition at line 22 of file ControlsView.h.

Constructor & Destructor Documentation

ControlsView::ControlsView ( MainWindowView *const  parent)

Construct a new Controls View.

Parameters
parentA reference to the parent view.

Definition at line 17 of file ControlsView.cpp.

Member Function Documentation

Gtk::Button *const ControlsView::getHaltExecutionButton ( )

Gets the haltExecutionButton member variable.

Returns
Gtk::Button* A pointer to the haltExecutionButton member variable.

Definition at line 166 of file ControlsView.cpp.

Gtk::LinkButton *const ControlsView::getHelpButton ( )

Gets the helpButton member variable.

Returns
Gtk::Button* A pointer to the helpButton member variable.

Definition at line 136 of file ControlsView.cpp.

Gtk::Button *const ControlsView::getPauseResumeButton ( )

Gets the pauseResumeButton member variable.

Returns
Gtk::Button* A pointer to the pauseResumeButton member variable.

Definition at line 151 of file ControlsView.cpp.

Gtk::Button *const ControlsView::getReloadJimulatorButton ( )

Gets the reloadJimulatorButton member variable.

Returns
Gtk::Button* A pointer to the reloadJimulatorButton member variable.

Definition at line 144 of file ControlsView.cpp.

Gtk::Button *const ControlsView::getSingleStepExecuteButton ( )

Gets the singleStepExecuteButton member variable.

Returns
Gtk::Button* A pointer to the singleStepExecuteButton member variable.

Definition at line 159 of file ControlsView.cpp.

void ControlsView::setButtonImages ( const std::string  projectRoot)

Sets the images for 4 of the buttons.

Parameters
projectRootAn absolute path to the root of the project.

Definition at line 119 of file ControlsView.cpp.

void ControlsView::setModel ( ControlsModel *const  val)

Set the model member variable.

Parameters
valThe value to set model to.

Definition at line 112 of file ControlsView.cpp.


The documentation for this class was generated from the following files: