11 #include <atkmm/object.h> 12 #include <gtkmm/cssprovider.h> 13 #include <gtkmm/image.h> 16 #include "../models/KoMo2Model.h" 24 : masterLayout(Gtk::Orientation::ORIENTATION_VERTICAL, 0),
25 controlsAndCompileBar(),
26 compileLoadView(this),
30 disassemblyView(this) {
33 set_gravity(Gdk::GRAVITY_WEST);
77 set_icon_from_file(
getModel()->getAbsolutePathToProjectRoot() +
78 "res/img/komo2Logo.png");
81 auto ctx = get_style_context();
82 auto css = Gtk::CssProvider::create();
83 css->load_from_path(
getModel()->getAbsolutePathToProjectRoot() +
87 get_style_context()->add_class(
"mainWindow");
98 ctx->add_provider_for_screen(Gdk::Screen::get_default(), css,
99 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
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...
DisassemblyView disassemblyView
A box containing the disassembly and source views.
TerminalView terminalView
A box contaning the input/output terminal.
Stores data and functions related to the displaying of the KoMo2 GUI element - no particular logic or...
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.
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...
void initControlsAndCompileBar()
Initialise the controls and compile bar.
Represents the entire disassembly window in the overall KoMo2 GUI. Contains several rows of memory va...
A class declaration for the MainWindowView class, which inherits from GTK::Window.
The GUI element which encapsulates the "clear" button, the output text box, and the input text box at...
CompileLoadView compileLoadView
A box containing the browse button, the compile and load button, and the selected file label...
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...
Gtk::Box *const getMasterLayout()
Gets the masterLayout layout.
RegistersView registersView
A box containing all of the registers.