#include <truthTableCanvas.hpp>
Collaboration diagram for TruthTableCanvas:
Public Member Functions | |
TruthTableCanvas (wxWindow *parent, wxWindowID id, TruthTable initialTable) | |
Constructor. | |
void | setNewTable (TruthTable newTable) |
Sets a truth table. | |
TruthTable | getTable () |
Returns the table being drawn. | |
virtual | ~TruthTableCanvas () |
Destructor. | |
void | setEditable (bool editable) |
Sets the editable property. | |
Private Member Functions | |
void | setTable () |
Initializes the grid. | |
vector< wxString > | getInputsString (int i) |
Returns the string outputs for a given table index. | |
vector< bool > | getInputsVector (int i) |
Returns the vector outputs for a given table index. | |
void | OnCellChanged (wxGridEvent &ev) |
Cell click event. | |
vector< bool > | getOutputs (int i) |
Returns the outputs for a given index. | |
void | initColours () |
Color value initialization. | |
Private Attributes | |
wxColour * | colourInputTrue |
wxColour * | colourInputFalse |
wxColour * | colourOutputTrue |
wxColour * | colourOutputFalse |
TruthTable | table |
The truth table. | |
bool | editable |
If the table is read only. |
This class is a wxWindows widget which draws a truth table on the screen. It has an event which is triggered when clicking on a cell of the table to allow the modification of it.
Definition at line 40 of file truthTableCanvas.hpp.
|
Constructor.
Definition at line 90 of file truthTableCanvas.cpp. |
|
Destructor.
Definition at line 135 of file truthTableCanvas.cpp. |
|
Returns the string outputs for a given table index.
Definition at line 193 of file truthTableCanvas.cpp. References TruthTable::getInputs(), and table. Referenced by setTable(). Here is the call graph for this function: ![]() |
|
Returns the vector outputs for a given table index.
Definition at line 220 of file truthTableCanvas.cpp. References TruthTable::getInputs(), and table. Referenced by OnCellChanged(), and setTable(). Here is the call graph for this function: ![]() |
|
Returns the outputs for a given index.
Definition at line 245 of file truthTableCanvas.cpp. References TruthTable::getInputs(), TruthTable::getOutputs(), and table. Here is the call graph for this function: ![]() |
|
Returns the table being drawn.
Definition at line 318 of file truthTableCanvas.cpp. References table. |
|
Color value initialization.
Definition at line 305 of file truthTableCanvas.cpp. References colourInputFalse, colourInputTrue, colourOutputFalse, and colourOutputTrue. |
|
Cell click event.
Definition at line 269 of file truthTableCanvas.cpp. References colourOutputFalse, colourOutputTrue, editable, TruthTable::getInputs(), getInputsVector(), and table. Here is the call graph for this function: ![]() |
|
Sets the editable property.
Definition at line 329 of file truthTableCanvas.cpp. Referenced by ResultsView::initControls(). |
|
Sets a truth table.
Definition at line 114 of file truthTableCanvas.cpp. References TruthTable::copyTable(), TruthTable::getInputs(), TruthTable::getOutputs(), setTable(), and table. Referenced by ResultsView::setTable(), and TruthTableView::updateTable(). Here is the call graph for this function: ![]() |
|
Initializes the grid. This method is called to initialize all the grid values and properties such as column names, strings and background colours of the cells. Definition at line 145 of file truthTableCanvas.cpp. References colourInputFalse, colourInputTrue, TruthTable::getInputs(), getInputsString(), getInputsVector(), TruthTable::getOutput(), and table. Referenced by setNewTable(). Here is the call graph for this function: ![]() |
|
Definition at line 58 of file truthTableCanvas.hpp. Referenced by initColours(), and setTable(). |
|
Definition at line 57 of file truthTableCanvas.hpp. Referenced by initColours(), and setTable(). |
|
Definition at line 60 of file truthTableCanvas.hpp. Referenced by initColours(), and OnCellChanged(). |
|
Definition at line 59 of file truthTableCanvas.hpp. Referenced by initColours(), and OnCellChanged(). |
|
If the table is read only.
Definition at line 64 of file truthTableCanvas.hpp. Referenced by OnCellChanged(). |
|
The truth table.
Definition at line 62 of file truthTableCanvas.hpp. Referenced by getInputsString(), getInputsVector(), getOutputs(), getTable(), OnCellChanged(), setNewTable(), and setTable(). |