DiaDes  0.1
DIAgnosisofDiscrete-EventSystem
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Diades::Altarica::MainFrame Class Reference

#include <MainFrame.hh>

Inheritance diagram for Diades::Altarica::MainFrame:
Inheritance graph

Public Member Functions

 MainFrame (const wxString &title)
 
void onQuit (wxCommandEvent &event)
 
void onOpen (wxCommandEvent &event)
 
void onAbout (wxCommandEvent &event)
 
void onNewTreeNodeSelection (wxTreeEvent &event)
 

Protected Attributes

wxMenuBar * _menuBar
 
wxMenu * _fileMenu
 
wxMenu * _helpMenu
 
wxNotebook * _mainNotebook
 
wxPanel * _syntaxicalTreePanel
 
wxTreeCtrl * _syntaxicalTreeCtrl
 
wxPanel * _domainPanel
 
wxListCtrl * _domainCtrl
 
wxSplitterWindow * _nodePanelSplitterWindow
 
wxPanel * _nodeTreePanel
 
wxTreeCtrl * _nodeTreeCtrl
 
wxPanel * _nodeContentPanel
 
wxTextCtrl * _nodeContentTextCtrl
 
wxPanel * _logPanel
 
wxTextCtrl * _logTextCtrl
 
AltaricaModel_model
 
AltaricaTree_root
 

Private Member Functions

void setProperties ()
 
void doLayout ()
 
void createMainMenuBar ()
 
void updateLog ()
 
bool generateSyntaxicTree (wxTreeItemId &treeID, const AltaricaTree *tree, wxTreeCtrl *syntaxicalTreeCtrl, bool generateRoot)
 
bool updateSyntaxicalTreeCtrl (AltaricaTree *root, wxTreeCtrl *syntaxicalTreeCtrl)
 
bool updateDomainCtrl (AltaricaModel *model, wxListCtrl *domainCtrl)
 
bool updateNodeTreePanel (AltaricaModel *model, wxTreeCtrl *nodeTreeCtrl)
 
bool updateNodeContentCtrl (const AltaricaModel *model, wxTextCtrl *nodeContentTextCtrl, NodeInstance selection)
 
void createMainBook ()
 
bool printDomainsOfType (const AltaricaModel *model, DomainType type, wxListCtrl *domainCtrl, unsigned rowIndex)
 
void cleanModels ()
 
bool updateNodePanel (AltaricaModel *model, wxTreeCtrl *nodeTreeCtrl, wxTextCtrl *nodeContentTextCtrl)
 
void cleanNodePanel (wxTreeCtrl *nodeTreeCtrl, wxTextCtrl *nodeContentTextCtrl)
 
void cleanDomainCtrl (wxListCtrl *domainCtrl)
 

Detailed Description

Definition at line 23 of file MainFrame.hh.

Constructor & Destructor Documentation

◆ MainFrame()

Diades::Altarica::MainFrame::MainFrame ( const wxString &  title)

Member Function Documentation

◆ cleanDomainCtrl()

void Diades::Altarica::MainFrame::cleanDomainCtrl ( wxListCtrl *  domainCtrl)
private
Parameters
domainCtrlthe domain to clean

◆ cleanModels()

void Diades::Altarica::MainFrame::cleanModels ( )
private

clean the model and the altarica tree

◆ cleanNodePanel()

void Diades::Altarica::MainFrame::cleanNodePanel ( wxTreeCtrl *  nodeTreeCtrl,
wxTextCtrl *  nodeContentTextCtrl 
)
private
Parameters
nodeTreeCtrlthe node list to clean
nodeContentTextCtrlthe content to clean

◆ createMainBook()

void Diades::Altarica::MainFrame::createMainBook ( )
private

create the main book inside the main frame

◆ createMainMenuBar()

void Diades::Altarica::MainFrame::createMainMenuBar ( )
private

create the main menu bar

◆ doLayout()

void Diades::Altarica::MainFrame::doLayout ( )
private

do the global layout of the application

◆ generateSyntaxicTree()

bool Diades::Altarica::MainFrame::generateSyntaxicTree ( wxTreeItemId &  treeID,
const AltaricaTree tree,
wxTreeCtrl *  syntaxicalTreeCtrl,
bool  generateRoot 
)
private

generate the tree control that represents the syntaxic tree (recursive method that explores the tree)

Parameters
treeIDan item of the tree
treethe AltaricaTree to display
syntaxicalTreeCtrlthe treeCtrl to initilize
generateRootstate whether the generation of the treeID is the root one or not
Returns
true if success.

◆ onAbout()

void Diades::Altarica::MainFrame::onAbout ( wxCommandEvent &  event)

◆ onNewTreeNodeSelection()

void Diades::Altarica::MainFrame::onNewTreeNodeSelection ( wxTreeEvent &  event)

◆ onOpen()

void Diades::Altarica::MainFrame::onOpen ( wxCommandEvent &  event)

◆ onQuit()

void Diades::Altarica::MainFrame::onQuit ( wxCommandEvent &  event)

◆ printDomainsOfType()

bool Diades::Altarica::MainFrame::printDomainsOfType ( const AltaricaModel model,
DomainType  type,
wxListCtrl *  domainCtrl,
unsigned  rowIndex 
)
private

print the domains of type 'type' in the list control domainCtrl

◆ setProperties()

void Diades::Altarica::MainFrame::setProperties ( )
private

set the global properties of the application (i.e. size, colours of the widgets.....)

◆ updateDomainCtrl()

bool Diades::Altarica::MainFrame::updateDomainCtrl ( AltaricaModel model,
wxListCtrl *  domainCtrl 
)
private

update the domain ctrl with the model

Parameters
modelan AltaricaModel
domainCtrlthe domain control to update
Returns
true if success false otherwise

◆ updateLog()

void Diades::Altarica::MainFrame::updateLog ( )
private

Update the log panel;

◆ updateNodeContentCtrl()

bool Diades::Altarica::MainFrame::updateNodeContentCtrl ( const AltaricaModel model,
wxTextCtrl *  nodeContentTextCtrl,
NodeInstance  selection 
)
private

update the node content panel with the content of the selected node

Parameters
modelan AltaricaModel
nodeContentTextCtrlthe text control of the node content panel
selectionthe selected NodeInstance
Returns
true if success false otherwise

◆ updateNodePanel()

bool Diades::Altarica::MainFrame::updateNodePanel ( AltaricaModel model,
wxTreeCtrl *  nodeTreeCtrl,
wxTextCtrl *  nodeContentTextCtrl 
)
private
Parameters
modelan AltaricaModel
nodeTreeCtrlthe node list to update
nodeContentTextCtrlthe content to update with the first node
Returns
true if success, false otherwise

◆ updateNodeTreePanel()

bool Diades::Altarica::MainFrame::updateNodeTreePanel ( AltaricaModel model,
wxTreeCtrl *  nodeTreeCtrl 
)
private

update the node tree panel

Parameters
modelan AltaricaModel
nodeTreeCtrlthe tree control of the node tree panel
Returns
true if success false otherwise

◆ updateSyntaxicalTreeCtrl()

bool Diades::Altarica::MainFrame::updateSyntaxicalTreeCtrl ( AltaricaTree root,
wxTreeCtrl *  syntaxicalTreeCtrl 
)
private

update the tree control that represents the syntaxic tree

Parameters
rootthe new AltaricaTree
syntaxicalTreeCtrlthe wxTreeCtrl to update
Returns
true if success false otherwise.

Member Data Documentation

◆ _domainCtrl

wxListCtrl* Diades::Altarica::MainFrame::_domainCtrl
protected

Definition at line 41 of file MainFrame.hh.

◆ _domainPanel

wxPanel* Diades::Altarica::MainFrame::_domainPanel
protected

Definition at line 40 of file MainFrame.hh.

◆ _fileMenu

wxMenu* Diades::Altarica::MainFrame::_fileMenu
protected

Definition at line 29 of file MainFrame.hh.

◆ _helpMenu

wxMenu* Diades::Altarica::MainFrame::_helpMenu
protected

Definition at line 30 of file MainFrame.hh.

◆ _logPanel

wxPanel* Diades::Altarica::MainFrame::_logPanel
protected

Definition at line 52 of file MainFrame.hh.

◆ _logTextCtrl

wxTextCtrl* Diades::Altarica::MainFrame::_logTextCtrl
protected

Definition at line 53 of file MainFrame.hh.

◆ _mainNotebook

wxNotebook* Diades::Altarica::MainFrame::_mainNotebook
protected

Definition at line 33 of file MainFrame.hh.

◆ _menuBar

wxMenuBar* Diades::Altarica::MainFrame::_menuBar
protected

Definition at line 28 of file MainFrame.hh.

◆ _model

AltaricaModel* Diades::Altarica::MainFrame::_model
protected

Definition at line 57 of file MainFrame.hh.

◆ _nodeContentPanel

wxPanel* Diades::Altarica::MainFrame::_nodeContentPanel
protected

Definition at line 48 of file MainFrame.hh.

◆ _nodeContentTextCtrl

wxTextCtrl* Diades::Altarica::MainFrame::_nodeContentTextCtrl
protected

Definition at line 49 of file MainFrame.hh.

◆ _nodePanelSplitterWindow

wxSplitterWindow* Diades::Altarica::MainFrame::_nodePanelSplitterWindow
protected

Definition at line 45 of file MainFrame.hh.

◆ _nodeTreeCtrl

wxTreeCtrl* Diades::Altarica::MainFrame::_nodeTreeCtrl
protected

Definition at line 47 of file MainFrame.hh.

◆ _nodeTreePanel

wxPanel* Diades::Altarica::MainFrame::_nodeTreePanel
protected

Definition at line 46 of file MainFrame.hh.

◆ _root

AltaricaTree* Diades::Altarica::MainFrame::_root
protected

Definition at line 58 of file MainFrame.hh.

◆ _syntaxicalTreeCtrl

wxTreeCtrl* Diades::Altarica::MainFrame::_syntaxicalTreeCtrl
protected

Definition at line 37 of file MainFrame.hh.

◆ _syntaxicalTreePanel

wxPanel* Diades::Altarica::MainFrame::_syntaxicalTreePanel
protected

Definition at line 36 of file MainFrame.hh.


The documentation for this class was generated from the following file: