|
OpenASIP 2.2
|
#include <HDBEditorMainFrame.hh>


Public Member Functions | |
| HDBEditorMainFrame (const wxString &title, const wxPoint &position, const wxSize &size) | |
| virtual | ~HDBEditorMainFrame () |
| bool | setHDB (const std::string &hdbFile) |
| bool | createHDB (const std::string &filePath) |
| HDB::HDBManager * | hdbManager () |
| HDBBrowserWindow * | browser () const |
| void | update () |
Private Member Functions | |
| void | onCommandEvent (wxCommandEvent &event) |
| void | onUpdateUI (wxUpdateUIEvent &event) |
Private Attributes | |
| CommandRegistry * | commandRegistry_ |
| Command registry. | |
| HDB::CachedHDBManager * | hdb_ |
| HDBBrowserWindow * | browser_ |
Main window of the editor.
Definition at line 50 of file HDBEditorMainFrame.hh.
| HDBEditorMainFrame::HDBEditorMainFrame | ( | const wxString & | title, |
| const wxPoint & | position, | ||
| const wxSize & | size | ||
| ) |
The Constructor.
| title | Title of the MainFrame. |
| position | Position of the MainFrame on the screen. |
| size | Size of the MainFrame on the screen. |
Definition at line 83 of file HDBEditorMainFrame.cc.
References HDBEditorConstants::COMMAND_ABOUT, HDBEditorConstants::COMMAND_ADD_BUS_ENTRY, HDBEditorConstants::COMMAND_ADD_COST_PLUGIN, HDBEditorConstants::COMMAND_ADD_FU_ENTRY, HDBEditorConstants::COMMAND_ADD_FU_FROM_ADF, HDBEditorConstants::COMMAND_ADD_FU_IMPLEMENTATION, HDBEditorConstants::COMMAND_ADD_OPERATION_IMPLEMENTATION, HDBEditorConstants::COMMAND_ADD_OPERATION_IMPLEMENTATION_RESOURCE, HDBEditorConstants::COMMAND_ADD_RF_ARCHITECTURE, HDBEditorConstants::COMMAND_ADD_RF_ENTRY, HDBEditorConstants::COMMAND_ADD_RF_IMPLEMENTATION, HDBEditorConstants::COMMAND_ADD_SOCKET_ENTRY, HDBEditorConstants::COMMAND_CREATE_HDB, HDBEditorConstants::COMMAND_DELETE, UserManualCmd::COMMAND_ID, HDBEditorConstants::COMMAND_MODIFY, HDBEditorConstants::COMMAND_OPEN_HDB, HDBEditorConstants::COMMAND_QUIT, and HDBEditorConstants::COMMAND_SET_COST_PLUGIN.
|
virtual |
| HDBBrowserWindow * HDBEditorMainFrame::browser | ( | ) | const |
Returns pointer to the HDB browser window.
Definition at line 335 of file HDBEditorMainFrame.cc.
References browser_.
Referenced by HDBEditor::browser().
| bool HDBEditorMainFrame::createHDB | ( | const std::string & | filePath | ) |
Creates a new HDB and opens it in the main frame.
| filePath | Full path of the HDB to be created. |
Definition at line 283 of file HDBEditorMainFrame.cc.
References browser_, HDB::CachedHDBManager::createNew(), Exception::errorMessage(), FileSystem::fileOfPath(), hdb_, HDBBrowserWindow::setHDBManager(), and WxConversion::toWxString().

| HDB::HDBManager * HDBEditorMainFrame::hdbManager | ( | ) |
Returns pointer to the HDBManager managing the current HDB.
Definition at line 315 of file HDBEditorMainFrame.cc.
References hdb_.
|
private |
Handles menu and toolbar events.
| event | Event to handle. |
Definition at line 210 of file HDBEditorMainFrame.cc.
References commandRegistry_, CommandRegistry::createCommand(), GUICommand::Do(), and GUICommand::setParentWindow().

|
private |
Updates toolbar and menubar item enabled/disabled states.
| event | Update event for the menu or toolbar item to be updated. |
Definition at line 231 of file HDBEditorMainFrame.cc.
References commandRegistry_, CommandRegistry::createCommand(), and GUICommand::isEnabled().

| bool HDBEditorMainFrame::setHDB | ( | const std::string & | hdbFile | ) |
Sets the HDB to be displayed and modified with the main frame.
| HDB | to be opened in the main frame. |
Definition at line 252 of file HDBEditorMainFrame.cc.
References browser_, Exception::errorMessage(), FileSystem::fileOfPath(), HDB::HDBRegistry::hdb(), hdb_, HDB::HDBRegistry::instance(), HDBBrowserWindow::setHDBManager(), and WxConversion::toWxString().
Referenced by HDBEditor::OnInit().

| void HDBEditorMainFrame::update | ( | ) |
Updates the HDB window.
Definition at line 324 of file HDBEditorMainFrame.cc.
References browser_, and HDBBrowserWindow::update().

|
private |
Definition at line 72 of file HDBEditorMainFrame.hh.
Referenced by browser(), createHDB(), setHDB(), and update().
|
private |
Command registry.
Definition at line 69 of file HDBEditorMainFrame.hh.
Referenced by onCommandEvent(), and onUpdateUI().
|
private |
Definition at line 71 of file HDBEditorMainFrame.hh.
Referenced by createHDB(), hdbManager(), and setHDB().