TruthTableView Class Reference

Presentation class for the truth tables. More...

#include <truthTableView.hpp>

Collaboration diagram for TruthTableView:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TruthTableView (wxWindow *parent, wxWindowID id, TruthTableManager *controller)
 Constructor.
virtual ~TruthTableView ()
 Destructor.
void updateTable (TruthTable table)
 Updates the table canvas.
void OnClick (TruthTableCanvasEvent &event)
 TruthTableCanvas click event method.
void OnNew (wxCommandEvent &event)
 New table button click event method.
void OnSelection (wxCommandEvent &event)
 Listbox selection event method.
void OnRemove (wxCommandEvent &event)
 Remove button click event method.
void updateList (wxArrayString strings)
 Updates the items of the table listbox.
void selectTable (wxString table)
 Selects a table on the listbox.
void errorMsg (wxString message)
 Shows an error message.
void OnSave (wxCommandEvent &event)
 Save button click event method.
void OnSaveAs (wxCommandEvent &event)
 Save As click event method.
void OnOpen (wxCommandEvent &event)
 Open button click event method.
bool msgYesNo (wxString message)
 Shows a yes/no selection dialog.

Private Member Functions

void initControls ()
 Control initialization.
void initSizers ()
 Sizer (layout) initialization.

Private Attributes

wxStaticText * labelTitle
wxStaticText * labelTable
wxStaticText * labelInfo
wxBitmapButton * buttonNew
wxBitmapButton * buttonOpen
wxBitmapButton * buttonSave
wxBitmapButton * buttonSaveAs
wxBitmapButton * buttonRemove
wxListBox * listTables
TruthTableCanvascanvas
TruthTableManagercontroller

Detailed Description

Presentation class for the truth tables.

This is the presentation layer class for the truth table collection.

Author:
Bernat Rāfales Mulet <the_bell@users.sourceforge.net>
Version:
Revision
1.7

Definition at line 36 of file truthTableView.hpp.


Constructor & Destructor Documentation

TruthTableView::TruthTableView wxWindow *  parent,
wxWindowID  id,
TruthTableManager controller
 

Constructor.

Parameters:
parent the parent window.
id the window identifier.
controller the truth table controller.

Definition at line 61 of file truthTableView.cpp.

TruthTableView::~TruthTableView  )  [virtual]
 

Destructor.

Definition at line 74 of file truthTableView.cpp.


Member Function Documentation

void TruthTableView::errorMsg wxString  message  ) 
 

Shows an error message.

Parameters:
message the message to show.

Definition at line 308 of file truthTableView.cpp.

Referenced by TruthTableManager::newTable().

void TruthTableView::initControls  )  [private]
 

Control initialization.

Definition at line 80 of file truthTableView.cpp.

References buttonNew, buttonOpen, buttonRemove, buttonSave, buttonSaveAs, canvas, ID_BUTTON_NEW, ID_BUTTON_OPEN, ID_BUTTON_REMOVE, ID_BUTTON_SAVE, ID_BUTTON_SAVEAS, ID_CANVAS, ID_LIST_TABLES, labelInfo, and listTables.

void TruthTableView::initSizers  )  [private]
 

Sizer (layout) initialization.

Definition at line 112 of file truthTableView.cpp.

References buttonNew, buttonOpen, buttonRemove, buttonSave, buttonSaveAs, canvas, labelInfo, and listTables.

bool TruthTableView::msgYesNo wxString  message  ) 
 

Shows a yes/no selection dialog.

Parameters:
message the question to be asked.
Returns:
True if the user selectes yes, false otherwise.

Definition at line 353 of file truthTableView.cpp.

Referenced by TruthTableManager::openFile().

void TruthTableView::OnClick TruthTableCanvasEvent event  ) 
 

TruthTableCanvas click event method.

Parameters:
event the event.

Definition at line 163 of file truthTableView.cpp.

References controller, TruthTableCanvasEvent::getInput(), TruthTableCanvasEvent::getOutput(), and TruthTableManager::tableChanged().

Here is the call graph for this function:

void TruthTableView::OnNew wxCommandEvent &  event  ) 
 

New table button click event method.

Parameters:
event the event.

Definition at line 173 of file truthTableView.cpp.

void TruthTableView::OnOpen wxCommandEvent &  event  ) 
 

Open button click event method.

Parameters:
event the event.

Definition at line 342 of file truthTableView.cpp.

References controller, and TruthTableManager::openFile().

Here is the call graph for this function:

void TruthTableView::OnRemove wxCommandEvent &  event  ) 
 

Remove button click event method.

Parameters:
event the event.

Definition at line 255 of file truthTableView.cpp.

References controller, and TruthTableManager::removeTable().

Here is the call graph for this function:

void TruthTableView::OnSave wxCommandEvent &  event  ) 
 

Save button click event method.

Parameters:
event the event.

Definition at line 322 of file truthTableView.cpp.

References controller, and TruthTableManager::saveFile().

Here is the call graph for this function:

void TruthTableView::OnSaveAs wxCommandEvent &  event  ) 
 

Save As click event method.

Parameters:
event the event.

Definition at line 332 of file truthTableView.cpp.

References controller, and TruthTableManager::saveFileAs().

Here is the call graph for this function:

void TruthTableView::OnSelection wxCommandEvent &  event  ) 
 

Listbox selection event method.

Parameters:
event the event.

Definition at line 236 of file truthTableView.cpp.

References buttonRemove, buttonSave, buttonSaveAs, controller, and TruthTableManager::tableSelected().

Here is the call graph for this function:

void TruthTableView::selectTable wxString  table  ) 
 

Selects a table on the listbox.

Parameters:
table the table name to be selected.

Definition at line 290 of file truthTableView.cpp.

References buttonRemove, buttonSave, buttonSaveAs, labelInfo, and listTables.

Referenced by TruthTableManager::appendTables(), TruthTableManager::clean(), and TruthTableManager::openPFile().

void TruthTableView::updateList wxArrayString  strings  ) 
 

Updates the items of the table listbox.

Parameters:
strings the string to be set.

Definition at line 276 of file truthTableView.cpp.

References buttonRemove, buttonSave, buttonSaveAs, labelInfo, and listTables.

void TruthTableView::updateTable TruthTable  table  ) 
 

Updates the table canvas.

Parameters:
table the table to update.

Definition at line 265 of file truthTableView.cpp.

References canvas, and TruthTableCanvas::setNewTable().

Referenced by TruthTableManager::updateTable().

Here is the call graph for this function:


Member Data Documentation

wxBitmapButton* TruthTableView::buttonNew [private]
 

Definition at line 65 of file truthTableView.hpp.

Referenced by initControls(), and initSizers().

wxBitmapButton* TruthTableView::buttonOpen [private]
 

Definition at line 66 of file truthTableView.hpp.

Referenced by initControls(), and initSizers().

wxBitmapButton* TruthTableView::buttonRemove [private]
 

Definition at line 69 of file truthTableView.hpp.

Referenced by initControls(), initSizers(), OnSelection(), selectTable(), and updateList().

wxBitmapButton* TruthTableView::buttonSave [private]
 

Definition at line 67 of file truthTableView.hpp.

Referenced by initControls(), initSizers(), OnSelection(), selectTable(), and updateList().

wxBitmapButton* TruthTableView::buttonSaveAs [private]
 

Definition at line 68 of file truthTableView.hpp.

Referenced by initControls(), initSizers(), OnSelection(), selectTable(), and updateList().

TruthTableCanvas* TruthTableView::canvas [private]
 

Definition at line 73 of file truthTableView.hpp.

Referenced by initControls(), initSizers(), and updateTable().

TruthTableManager* TruthTableView::controller [private]
 

Definition at line 74 of file truthTableView.hpp.

Referenced by OnClick(), OnOpen(), OnRemove(), OnSave(), OnSaveAs(), and OnSelection().

wxStaticText* TruthTableView::labelInfo [private]
 

Definition at line 62 of file truthTableView.hpp.

Referenced by initControls(), initSizers(), selectTable(), and updateList().

wxStaticText* TruthTableView::labelTable [private]
 

Definition at line 61 of file truthTableView.hpp.

wxStaticText* TruthTableView::labelTitle [private]
 

Definition at line 60 of file truthTableView.hpp.

wxListBox* TruthTableView::listTables [private]
 

Definition at line 72 of file truthTableView.hpp.

Referenced by initControls(), initSizers(), selectTable(), and updateList().


The documentation for this class was generated from the following files:
Generated on Sat Sep 2 00:01:50 2006 for NanoComp by  doxygen 1.4.6