KoMo2  1.0.0
A modern ARM emulator GUI.
MainWindowView.h
Go to the documentation of this file.
1 
10 #include <gtkmm/box.h>
11 #include <gtkmm/button.h>
12 #include <gtkmm/buttonbox.h>
13 #include <gtkmm/image.h>
14 #include <gtkmm/label.h>
15 #include <gtkmm/window.h>
16 #include <string>
17 #include "CompileLoadView.h"
18 #include "ControlsView.h"
19 #include "DisassemblyView.h"
20 #include "RegistersView.h"
21 #include "TerminalView.h"
22 
23 class KoMo2Model;
24 
31 class MainWindowView : public Gtk::Window {
32  public:
33  // Constructors
34  MainWindowView(const int x, const int y);
35 
36  // Getters and setters
37  void setModel(KoMo2Model* const val);
38  KoMo2Model* const getModel() const;
39 
40  // Get components
46  void setStyling();
47 
48  private:
49  // Get layouts
50  Gtk::HButtonBox* const getControlsAndCompileBar();
51  Gtk::HButtonBox* const getRegistersAndDisassemblyBar();
52  Gtk::Box* const getMasterLayout();
53 
56  void initMasterLayout();
57 
58  // ! Layouts
59 
64  Gtk::Box masterLayout;
69  Gtk::HButtonBox controlsAndCompileBar;
74  Gtk::HButtonBox registersAndDisassemblyBar;
75 
76  // ! Components
77 
99 
100  // ! Other
101 
106 
107  // ! Deleted special member functions
108  // stops these functions from being misused, creates a sensible error
109  MainWindowView(const MainWindowView&) = delete;
110  MainWindowView(const MainWindowView&&) = delete;
111  MainWindowView& operator=(const MainWindowView&) = delete;
112  MainWindowView& operator=(const MainWindowView&&) = delete;
113 };
DisassemblyView *const getDisassemblyView()
Get the DisassemblyView.
RegistersView *const getRegistersView()
Returns a pointer to the registersView object.
void initRegistersAndDisassemblyBar()
Initialise the registers and disassembly bar.
TerminalView *const getTerminalView()
Get the TerminalView.
Gtk::HButtonBox controlsAndCompileBar
The layout for the top bar running along the screen. Contains the compile and load layout...
ControlsView is the visual aspect of the controls that run along the top of the KoMo2 GUI...
Definition: ControlsView.h:22
DisassemblyView disassemblyView
A box containing the disassembly and source views.
TerminalView terminalView
A box contaning the input/output terminal.
A file containing the declaration of the class CompileLoadView.
Stores data and functions related to the displaying of the KoMo2 GUI element - no particular logic or...
Definition: RegistersView.h:26
KoMo2Model * model
A pointer to the main model of the program.
void setModel(KoMo2Model *const val)
Sets the model member variable.
Gtk::Box masterLayout
The master layout - every other view or layout should be nested within this layout.
The class definition of the main window of the program. This main window is the mater view of the pro...
ControlsView controlsView
A box containing all of the programs running controls.
Gtk::HButtonBox *const getRegistersAndDisassemblyBar()
Gets the registersAndSiassemblyBar layout.
MainWindowView(const int x, const int y)
Construct a new MainWindowView object.
void initMasterLayout()
Initialise the master layout.
Gtk::HButtonBox registersAndDisassemblyBar
The container that contains the source/disassembly view and the registers view.
ControlsView *const getControlsView()
Get the ControlsView.
KoMo2Model *const getModel() const
Gets the model member variable.
CompileLoadView *const getCompileLoadView()
Get the CompileLoadView.
Gtk::HButtonBox *const getControlsAndCompileBar()
Gets the controlsAndCompileBar layout.
The logical model of the entire application. All other models should be member variables of this mode...
Definition: KoMo2Model.h:34
void initControlsAndCompileBar()
Initialise the controls and compile bar.
A definition of the class ControlsView.
Represents the entire disassembly window in the overall KoMo2 GUI. Contains several rows of memory va...
Declares the TerminalView class, which is an element of the KoMo2 GUI which represents the input & ou...
The GUI element which encapsulates the "clear" button, the output text box, and the input text box at...
Definition: TerminalView.h:25
CompileLoadView compileLoadView
A box containing the browse button, the compile and load button, and the selected file label...
This file contains the header file for the DisassemblyRows and DisassemblyView classes.
void setStyling()
Sets the style attributes for the views - namely any icons and CSS.
This class represents the visual aspects that make up the compile & load section of the KoMo2 GUI...
This file declares the class RegistersView, which represents the viewable GUI element that displays i...
Gtk::Box *const getMasterLayout()
Gets the masterLayout layout.
RegistersView registersView
A box containing all of the registers.