KoMo2  1.0.0
A modern ARM emulator GUI.
RegistersView.h
Go to the documentation of this file.
1 
12 #include <gtkmm/buttonbox.h>
13 #include <gtkmm/grid.h>
14 #include <gtkmm/label.h>
15 #include <array>
16 #include <string>
17 
18 class MainWindowView;
19 class RegistersModel;
20 
26 class RegistersView : public Gtk::VButtonBox {
27  public:
29 
30  // ! Getters and setters
31  RegistersModel* const getModel() const;
32  void setModel(RegistersModel* const val);
33  std::array<std::array<Gtk::Label, 16>, 2>* const getLabels();
34 
35  private:
36  // General functions
38  void initLeftHandLabel(const int j);
39  void initRightHandLabel(const int j);
40  void initAllLabels(const int i, const int j);
41  void initGrid();
42 
46  Gtk::Grid grid;
51  std::array<std::array<Gtk::Label, 16>, 2> labelArray;
52 
57 
62 
63  // ! Deleted special member functions
64  // stops these functions from being misused, creates a sensible error
65  RegistersView(const RegistersView&) = delete;
66  RegistersView(const RegistersView&&) = delete;
67  RegistersView& operator=(const RegistersView&) = delete;
68  RegistersView& operator=(const RegistersView&&) = delete;
69 };
std::array< std::array< Gtk::Label, 16 >, 2 > *const getLabels()
Return a reference to the member array of labels, labelArray.
void initAllLabels(const int i, const int j)
Initialisations that have to happen for both sides of the table.
RegistersModel *const getModel() const
gets the model for this view.
RegistersModel * model
A pointer to the related model.
Definition: RegistersView.h:61
std::array< std::array< Gtk::Label, 16 >, 2 > labelArray
An array of labels, with the left side representing the registers name and the right side representin...
Definition: RegistersView.h:51
RegistersView(MainWindowView *const parent)
Constructs a new RegisterView object.
Stores data and functions related to the displaying of the KoMo2 GUI element - no particular logic or...
Definition: RegistersView.h:26
Gtk::Grid grid
The layout that stores all of the labelArray members.
Definition: RegistersView.h:46
MainWindowView * parent
A pointer to the parent view.
Definition: RegistersView.h:56
The class definition of the main window of the program. This main window is the mater view of the pro...
void initGrid()
Initialisation instructions for the grid.
void initRightHandLabel(const int j)
Initialises the right hand labels within the array.
void initRegisterViewContainer()
Initialises the register view.
void setModel(RegistersModel *const val)
Sets the model for this view.
Stores data and functions relating to the tracking and manipulation of data within the RegistersView ...
void initLeftHandLabel(const int j)
Initialises the left hand labels within the array.