#include <ruleView.hpp>
Collaboration diagram for RuleView:
Public Member Functions | |
RuleView (wxWindow *parent, wxWindowID id, RuleManager *controller) | |
Constructor. | |
virtual | ~RuleView () |
Destructor. | |
void | updateGrids (Grid initial, Grid final, bool changed) |
Updates the grids of the canvas. | |
void | updateList (wxArrayString strings) |
Updates the rule listbox. | |
void | selectRule (unsigned int rule) |
Selects a rule from the listbox. | |
void | errorMsg (wxString message) |
Shows an error message. | |
bool | msgYesNo (wxString message) |
Shows a yes/no selection dialog. | |
void | setListMessage (int id, wxString message) |
Sets a special message for a rule in a listbox. | |
void | resetListItem (int id) |
Sets the default message for a listbox item. | |
Private Member Functions | |
void | initControls () |
Control initialization. | |
void | initSizers () |
Sizers (layout) initialization. | |
void | OnClick (LayoutCanvasEvent &event) |
LayoutCanvas click event method. | |
void | OnSelection (wxCommandEvent &event) |
Listbox selection method. | |
void | OnNewRule (wxCommandEvent &event) |
New rule button click method. | |
void | OnRemove (wxCommandEvent &event) |
Remove rule button click method. | |
void | OnCopy (wxCommandEvent &event) |
Copy grid button click method. | |
void | OnSave (wxCommandEvent &event) |
Save button click method. | |
void | OnSaveAs (wxCommandEvent &event) |
Save as button click method. | |
void | OnOpen (wxCommandEvent &event) |
Open button click method. | |
void | OnCheck (wxCommandEvent &event) |
Check rules button click method. | |
Private Attributes | |
RuleManager * | controller |
Main application controller. | |
wxStaticText * | labelTitle |
wxStaticText * | labelRule |
wxStaticText * | labelInitialLayout |
wxStaticText * | labelFinalLayout |
wxBitmapButton * | buttonNew |
wxBitmapButton * | buttonSave |
wxBitmapButton * | buttonSaveAs |
wxBitmapButton * | buttonRemove |
wxBitmapButton * | buttonOpen |
wxBitmapButton * | buttonCopy |
wxButton * | buttonCheck |
wxListBox * | listRules |
LayoutCanvas * | canvasInitial |
LayoutCanvas * | canvasFinal |
This is the presentation layer class for the rule collection.
Definition at line 37 of file ruleView.hpp.
|
Constructor.
Definition at line 66 of file ruleView.cpp. |
|
Destructor.
Definition at line 77 of file ruleView.cpp. |
|
Shows an error message.
Definition at line 336 of file ruleView.cpp. |
|
Control initialization.
Definition at line 83 of file ruleView.cpp. References buttonCheck, buttonCopy, buttonNew, buttonOpen, buttonRemove, buttonSave, buttonSaveAs, canvasFinal, canvasInitial, ID_BUTTON_CHECK, ID_BUTTON_COPY, ID_BUTTON_NEW, ID_BUTTON_OPEN, ID_BUTTON_REMOVE, ID_BUTTON_SAVE, ID_BUTTON_SAVEAS, ID_CANVAS_FINAL, ID_CANVAS_INITIAL, ID_LISTRULES, labelFinalLayout, labelInitialLayout, and listRules. |
|
Sizers (layout) initialization.
Definition at line 121 of file ruleView.cpp. References buttonCheck, buttonCopy, buttonNew, buttonOpen, buttonRemove, buttonSave, buttonSaveAs, canvasFinal, canvasInitial, labelFinalLayout, labelInitialLayout, and listRules. |
|
Shows a yes/no selection dialog.
Definition at line 361 of file ruleView.cpp. Referenced by RuleManager::openFile(). |
|
Check rules button click method.
Definition at line 375 of file ruleView.cpp. References RuleManager::checkRules(), and controller. Here is the call graph for this function: ![]() |
|
LayoutCanvas click event method. The event canvas is identified and passed as a parameter to the controller.
Definition at line 180 of file ruleView.cpp. References RuleManager::cellChanged(), controller, LayoutCanvasEvent::getX(), LayoutCanvasEvent::getY(), ID_CANVAS_INITIAL, and nINITIAL. Here is the call graph for this function: ![]() |
|
Copy grid button click method.
Definition at line 306 of file ruleView.cpp. References controller, and RuleManager::copyGrids(). Here is the call graph for this function: ![]() |
|
New rule button click method.
Definition at line 202 of file ruleView.cpp. References controller, and RuleManager::newRule(). Here is the call graph for this function: ![]() |
|
Open button click method.
Definition at line 350 of file ruleView.cpp. References controller, and RuleManager::openFile(). Here is the call graph for this function: ![]() |
|
Remove rule button click method.
Definition at line 280 of file ruleView.cpp. References controller, and RuleManager::removeRule(). Here is the call graph for this function: ![]() |
|
Save button click method.
Definition at line 316 of file ruleView.cpp. References controller, and RuleManager::saveFile(). Here is the call graph for this function: ![]() |
|
Save as button click method.
Definition at line 326 of file ruleView.cpp. References controller, and RuleManager::saveFileAs(). Here is the call graph for this function: ![]() |
|
Listbox selection method.
Definition at line 259 of file ruleView.cpp. References buttonRemove, buttonSave, controller, and RuleManager::ruleSelected(). Here is the call graph for this function: ![]() |
|
Sets the default message for a listbox item.
Definition at line 399 of file ruleView.cpp. References listRules. |
|
Selects a rule from the listbox.
Definition at line 290 of file ruleView.cpp. References buttonRemove, buttonSave, and listRules. Referenced by RuleManager::appendRules(), RuleManager::clean(), RuleManager::newRule(), and RuleManager::openPFile(). |
|
Sets a special message for a rule in a listbox.
Definition at line 386 of file ruleView.cpp. References listRules. |
|
Updates the grids of the canvas.
Definition at line 235 of file ruleView.cpp. References canvasFinal, canvasInitial, and LayoutCanvas::setGrid(). Referenced by RuleManager::newRule(), and RuleManager::updateGrids(). Here is the call graph for this function: ![]() |
|
Updates the rule listbox.
Definition at line 246 of file ruleView.cpp. References buttonRemove, buttonSave, buttonSaveAs, and listRules. |
|
Definition at line 81 of file ruleView.hpp. Referenced by initControls(), and initSizers(). |
|
Definition at line 80 of file ruleView.hpp. Referenced by initControls(), and initSizers(). |
|
Definition at line 75 of file ruleView.hpp. Referenced by initControls(), and initSizers(). |
|
Definition at line 79 of file ruleView.hpp. Referenced by initControls(), and initSizers(). |
|
Definition at line 78 of file ruleView.hpp. Referenced by initControls(), initSizers(), OnSelection(), selectRule(), and updateList(). |
|
Definition at line 76 of file ruleView.hpp. Referenced by initControls(), initSizers(), OnSelection(), selectRule(), and updateList(). |
|
Definition at line 77 of file ruleView.hpp. Referenced by initControls(), initSizers(), and updateList(). |
|
Definition at line 86 of file ruleView.hpp. Referenced by initControls(), initSizers(), and updateGrids(). |
|
Definition at line 85 of file ruleView.hpp. Referenced by initControls(), initSizers(), and updateGrids(). |
|
Main application controller.
Definition at line 65 of file ruleView.hpp. Referenced by OnCheck(), OnClick(), OnCopy(), OnNewRule(), OnOpen(), OnRemove(), OnSave(), OnSaveAs(), and OnSelection(). |
|
Definition at line 72 of file ruleView.hpp. Referenced by initControls(), and initSizers(). |
|
Definition at line 71 of file ruleView.hpp. Referenced by initControls(), and initSizers(). |
|
Definition at line 70 of file ruleView.hpp. |
|
Definition at line 69 of file ruleView.hpp. |
|
Definition at line 84 of file ruleView.hpp. Referenced by initControls(), initSizers(), resetListItem(), selectRule(), setListMessage(), and updateList(). |