#include <layoutView.hpp>
Collaboration diagram for LayoutView:
Public Member Functions | |
LayoutView (wxWindow *parent, wxWindowID id, LayoutManager *controller) | |
Constructor. | |
virtual | ~LayoutView () |
Destructor. | |
void | updateGrids (Grid grid, bool changed) |
Updates the space canvas. | |
void | OnNew (wxCommandEvent &event) |
New space button click event. | |
void | OnSave (wxCommandEvent &event) |
Save button click event. | |
void | OnSaveAs (wxCommandEvent &event) |
Save As button click event. | |
void | OnOpen (wxCommandEvent &event) |
Open space button click event. | |
void | OnClick (LayoutCanvasEvent &event) |
Space canvas click event. | |
void | updateTTList (map< wxString, bool > tables) |
Updates the truth table checklistbox. | |
void | updateFPList (map< unsigned int, bool > FPs) |
Updates the forbidden pattern checklistbox. | |
void | updateRuleList (map< unsigned int, bool > rules) |
Updates the rule checklistbox. | |
void | updateInputList (wxArrayString strings) |
Updates the input listbox. | |
void | updateOutputList (wxArrayString strings) |
Updates the output listbox. | |
void | selectTable (wxString table) |
Selects a truth table. | |
void | errorMsg (wxString message) |
Shows an error message. | |
bool | msgYesNo (wxString message) |
Shows a yes/no selection dialog. | |
void | OnTableSelected (wxCommandEvent &event) |
Truth table checklistbox selection event. | |
void | OnInputSelected (wxCommandEvent &event) |
Input listbox selection event. | |
void | OnOutputSelected (wxCommandEvent &event) |
Output listbox selection event. | |
void | OnTableChecked (wxCommandEvent &event) |
Truth table checklistbox check event. | |
void | OnRuleChecked (wxCommandEvent &event) |
Rule checklistbox check event. | |
void | OnFPChecked (wxCommandEvent &event) |
Forbidden pattern checklistbox check event. | |
void | OnAssignInput (wxCommandEvent &event) |
Assign input button click event. | |
void | OnAssignOutput (wxCommandEvent &event) |
Assign output button click event. | |
void | OnPrepare (wxCommandEvent &event) |
Prepare simulation button click event. | |
void | OnStart (wxCommandEvent &event) |
Start simulation button click event. | |
void | onlyAssign (bool enable) |
Customizes the view for the assigning mode. | |
void | OnKeyPressed (wxKeyEvent &event) |
Key press event. | |
void | updateCanvas () |
Refreshes the canvas window. | |
void | updateInputs (vector< coordinate > inputs) |
Sets the assigned inputs on the canvas. | |
void | updateOutputs (vector< coordinate > outputs) |
Sets the assigned outputs on the canvas. | |
void | checkTable (wxString table, bool enabled) |
Checks or unchecks a truth table. | |
void | checkRule (wxString rule, bool enabled) |
Checks or unchecks a rule. | |
void | checkFP (wxString FP, bool enabled) |
Checks or unchecks a pattern. | |
void | enableCheckSimulation (bool enable) |
Enables or disables the prepare simulation button. | |
void | enableStartSimulation (bool enable) |
Enables or disables the start simulation button. | |
Private Member Functions | |
void | initControls () |
Control initialization. | |
void | initSizers () |
Sizers (window layout) initialization. | |
Private Attributes | |
LayoutManager * | controller |
wxStaticText * | labelTitle |
wxBitmapButton * | buttonNew |
wxBitmapButton * | buttonOpen |
wxBitmapButton * | buttonSave |
wxBitmapButton * | buttonSaveAs |
wxBitmapButton * | buttonAssignInput |
wxBitmapButton * | buttonAssignOutput |
wxButton * | buttonPrepareSimulation |
wxButton * | buttonStartSimulation |
wxCheckListBox * | listTables |
wxCheckListBox * | listRules |
wxCheckListBox * | listFPs |
wxListBox * | listInputs |
wxListBox * | listOutputs |
LayoutCanvas * | canvas |
This class manages a space view. It not only has to show the current space but the truth tables, rules and forbidden pattern so the user can select and unselect them, and also can assign the inputs and outputs of the truth tables to the space.
Definition at line 44 of file layoutView.hpp.
|
Constructor.
Definition at line 76 of file layoutView.cpp. |
|
Destructor.
Definition at line 89 of file layoutView.cpp. |
|
Checks or unchecks a pattern.
Definition at line 698 of file layoutView.cpp. References listFPs. |
|
Checks or unchecks a rule.
Definition at line 686 of file layoutView.cpp. References listRules. |
|
Checks or unchecks a truth table.
Definition at line 674 of file layoutView.cpp. References listTables. |
|
Enables or disables the prepare simulation button.
Definition at line 729 of file layoutView.cpp. References buttonPrepareSimulation. Referenced by LayoutManager::elementChanged(), and LayoutManager::enableSimulation(). |
|
Enables or disables the start simulation button.
Definition at line 740 of file layoutView.cpp. References buttonStartSimulation. Referenced by LayoutManager::elementChanged(), and LayoutManager::enableSimulation(). |
|
Shows an error message.
Definition at line 402 of file layoutView.cpp. Referenced by LayoutManager::saveFile(). |
|
Control initialization.
Definition at line 95 of file layoutView.cpp. References buttonAssignInput, buttonAssignOutput, buttonNew, buttonOpen, buttonPrepareSimulation, buttonSave, buttonSaveAs, buttonStartSimulation, canvas, ID_BUTTON_ASSIGNINPUT, ID_BUTTON_ASSIGNOUTPUT, ID_BUTTON_NEW, ID_BUTTON_OPEN, ID_BUTTON_PREPARE, ID_BUTTON_SAVE, ID_BUTTON_SAVEAS, ID_BUTTON_START, ID_CANVAS, ID_LISTFPS, ID_LISTINPUTS, ID_LISTOUTPUTS, ID_LISTRULES, ID_LISTTABLES, listFPs, listInputs, listOutputs, listRules, and listTables. |
|
Sizers (window layout) initialization.
Definition at line 133 of file layoutView.cpp. References buttonAssignInput, buttonAssignOutput, buttonNew, buttonOpen, buttonPrepareSimulation, buttonSave, buttonSaveAs, buttonStartSimulation, canvas, listFPs, listInputs, listOutputs, listRules, and listTables. |
|
Shows a yes/no selection dialog.
Definition at line 427 of file layoutView.cpp. Referenced by LayoutManager::openFile(). |
|
Assign input button click event.
Definition at line 514 of file layoutView.cpp. References LayoutManager::assignInput(), canvas, controller, onlyAssign(), and LayoutCanvas::setVisible(). Here is the call graph for this function: ![]() |
|
Assign output button click event.
Definition at line 528 of file layoutView.cpp. References LayoutManager::assignOutput(), canvas, controller, onlyAssign(), and LayoutCanvas::setVisible(). Here is the call graph for this function: ![]() |
|
Space canvas click event.
Definition at line 217 of file layoutView.cpp. References LayoutManager::cellChanged(), controller, LayoutCanvasEvent::getX(), and LayoutCanvasEvent::getY(). Here is the call graph for this function: ![]() |
|
Forbidden pattern checklistbox check event.
Definition at line 659 of file layoutView.cpp. References controller, LayoutManager::FPChecked(), and listFPs. Here is the call graph for this function: ![]() |
|
Input listbox selection event.
Definition at line 589 of file layoutView.cpp. References controller, and LayoutManager::inputSelected(). Here is the call graph for this function: ![]() |
|
Key press event.
Definition at line 575 of file layoutView.cpp. References controller, and LayoutManager::escapePressed(). Here is the call graph for this function: ![]() |
|
Customizes the view for the assigning mode. Disables everything but the canvas window and sets it to show only inputs or outputs.
Definition at line 545 of file layoutView.cpp. References buttonAssignInput, buttonAssignOutput, buttonNew, buttonOpen, buttonSave, buttonSaveAs, canvas, listFPs, listInputs, listOutputs, listRules, listTables, and LayoutCanvas::setVisible(). Referenced by LayoutManager::cellChanged(), LayoutManager::escapePressed(), OnAssignInput(), and OnAssignOutput(). Here is the call graph for this function: ![]() |
|
New space button click event.
Definition at line 227 of file layoutView.cpp. |
|
Open space button click event.
Definition at line 416 of file layoutView.cpp. References controller, and LayoutManager::openFile(). Here is the call graph for this function: ![]() |
|
Output listbox selection event.
Definition at line 604 of file layoutView.cpp. References controller, and LayoutManager::outputSelected(). Here is the call graph for this function: ![]() |
|
Prepare simulation button click event.
Definition at line 708 of file layoutView.cpp. References controller, and LayoutManager::prepareSimulation(). Here is the call graph for this function: ![]() |
|
Rule checklistbox check event.
Definition at line 646 of file layoutView.cpp. References controller, listRules, and LayoutManager::ruleChecked(). Here is the call graph for this function: ![]() |
|
Save button click event.
Definition at line 441 of file layoutView.cpp. References controller, and LayoutManager::saveFile(). Here is the call graph for this function: ![]() |
|
Save As button click event.
Definition at line 451 of file layoutView.cpp. References controller, and LayoutManager::saveFileAs(). Here is the call graph for this function: ![]() |
|
Start simulation button click event.
Definition at line 718 of file layoutView.cpp. References controller, and LayoutManager::startSimulation(). Here is the call graph for this function: ![]() |
|
Truth table checklistbox check event.
Definition at line 474 of file layoutView.cpp. References controller, listTables, and LayoutManager::tableChecked(). Here is the call graph for this function: ![]() |
|
Truth table checklistbox selection event.
Definition at line 461 of file layoutView.cpp. References controller, and LayoutManager::tableSelected(). Here is the call graph for this function: ![]() |
|
Selects a truth table.
Definition at line 388 of file layoutView.cpp. References listTables. |
|
Refreshes the canvas window.
Definition at line 616 of file layoutView.cpp. References canvas, and LayoutCanvas::drawScene(). Referenced by LayoutManager::cellChanged(), and LayoutManager::tableSelected(). Here is the call graph for this function: ![]() |
|
Updates the forbidden pattern checklistbox.
Definition at line 340 of file layoutView.cpp. |
|
Updates the space canvas.
Definition at line 306 of file layoutView.cpp. References buttonSave, buttonSaveAs, canvas, and LayoutCanvas::setGrid(). Referenced by LayoutManager::clean(), LayoutManager::newLayout(), and LayoutManager::updateGrids(). Here is the call graph for this function: ![]() |
|
Updates the input listbox.
Definition at line 484 of file layoutView.cpp. References buttonAssignInput, and listInputs. |
|
Sets the assigned inputs on the canvas.
Definition at line 626 of file layoutView.cpp. References canvas, and LayoutCanvas::setAssignedInputs(). Referenced by LayoutManager::cellChanged(), LayoutManager::newLayout(), and LayoutManager::tableSelected(). Here is the call graph for this function: ![]() |
|
Updates the output listbox.
Definition at line 499 of file layoutView.cpp. References buttonAssignOutput, and listOutputs. |
|
Sets the assigned outputs on the canvas.
Definition at line 636 of file layoutView.cpp. References canvas, and LayoutCanvas::setAssignedOutputs(). Referenced by LayoutManager::cellChanged(), LayoutManager::newLayout(), and LayoutManager::tableSelected(). Here is the call graph for this function: ![]() |
|
Updates the rule checklistbox.
Definition at line 364 of file layoutView.cpp. |
|
Updates the truth table checklistbox.
Definition at line 318 of file layoutView.cpp. |
|
Definition at line 99 of file layoutView.hpp. Referenced by initControls(), initSizers(), onlyAssign(), and updateInputList(). |
|
Definition at line 100 of file layoutView.hpp. Referenced by initControls(), initSizers(), onlyAssign(), and updateOutputList(). |
|
Definition at line 95 of file layoutView.hpp. Referenced by initControls(), initSizers(), and onlyAssign(). |
|
Definition at line 96 of file layoutView.hpp. Referenced by initControls(), initSizers(), and onlyAssign(). |
|
Definition at line 101 of file layoutView.hpp. Referenced by enableCheckSimulation(), initControls(), and initSizers(). |
|
Definition at line 97 of file layoutView.hpp. Referenced by initControls(), initSizers(), onlyAssign(), and updateGrids(). |
|
Definition at line 98 of file layoutView.hpp. Referenced by initControls(), initSizers(), onlyAssign(), and updateGrids(). |
|
Definition at line 102 of file layoutView.hpp. Referenced by enableStartSimulation(), initControls(), and initSizers(). |
|
Definition at line 110 of file layoutView.hpp. Referenced by initControls(), initSizers(), OnAssignInput(), OnAssignOutput(), onlyAssign(), updateCanvas(), updateGrids(), updateInputs(), and updateOutputs(). |
|
Definition at line 89 of file layoutView.hpp. Referenced by OnAssignInput(), OnAssignOutput(), OnClick(), OnFPChecked(), OnInputSelected(), OnKeyPressed(), OnOpen(), OnOutputSelected(), OnPrepare(), OnRuleChecked(), OnSave(), OnSaveAs(), OnStart(), OnTableChecked(), and OnTableSelected(). |
|
Definition at line 92 of file layoutView.hpp. |
|
Definition at line 107 of file layoutView.hpp. Referenced by checkFP(), initControls(), initSizers(), OnFPChecked(), and onlyAssign(). |
|
Definition at line 108 of file layoutView.hpp. Referenced by initControls(), initSizers(), onlyAssign(), and updateInputList(). |
|
Definition at line 109 of file layoutView.hpp. Referenced by initControls(), initSizers(), onlyAssign(), and updateOutputList(). |
|
Definition at line 106 of file layoutView.hpp. Referenced by checkRule(), initControls(), initSizers(), onlyAssign(), and OnRuleChecked(). |
|
Definition at line 105 of file layoutView.hpp. Referenced by checkTable(), initControls(), initSizers(), onlyAssign(), OnTableChecked(), and selectTable(). |