OpenASIP
2.0
|
#include <CommandRegistry.hh>
Public Member Functions | |
CommandRegistry () | |
~CommandRegistry () | |
void | addCommand (GUICommand *command) |
GUICommand * | createCommand (const int id) |
GUICommand * | createCommand (const std::string name) |
GUICommand * | firstCommand () |
GUICommand * | nextCommand () |
std::string | commandName (int id) const |
std::string | commandShortName (const std::string name) const |
int | commandId (const std::string name) const |
std::string | commandIcon (const std::string name) const |
bool | isEnabled (const std::string command) |
Private Attributes | |
std::vector< GUICommand * > | commands_ |
Commands in the registry. More... | |
std::vector< GUICommand * >::iterator | iterator_ |
The position of the iteration. Used by the firstCommand() and nextCommand(). More... | |
List of editor commands which can be added to the toolbar or executed using a keyboard shortcut.
Definition at line 47 of file CommandRegistry.hh.
CommandRegistry::CommandRegistry | ( | ) |
CommandRegistry::~CommandRegistry | ( | ) |
void CommandRegistry::addCommand | ( | GUICommand * | command | ) |
Referenced by EVT_MENU_RANGE().
std::string CommandRegistry::commandIcon | ( | const std::string | name | ) | const |
Returns icon for the GUICommand.
name | Name of the GUICommand. |
Definition at line 155 of file CommandRegistry.cc.
References __func__, and commands_.
Referenced by GUIOptions::createToolbar().
int CommandRegistry::commandId | ( | const std::string | name | ) | const |
Returns enumerated ID of the command.
name | Name of the GUICommand. |
Definition at line 137 of file CommandRegistry.cc.
References commands_.
Referenced by GUIOptions::createToolbar(), and MainFrame::updateUI().
std::string CommandRegistry::commandName | ( | int | id | ) | const |
Returns name of the GUICommand.
id | ID of the GUICommand. |
Definition at line 173 of file CommandRegistry.cc.
References __func__, and commands_.
Referenced by MainFrame::menuAccelerator(), and ProximMainFrame::menuAccelerator().
std::string CommandRegistry::commandShortName | ( | const std::string | name | ) | const |
Returns short name of the GUICommand.
name | Name of the GUICommand. |
Definition at line 191 of file CommandRegistry.cc.
References __func__, and commands_.
Referenced by GUIOptions::createToolbar().
GUICommand * CommandRegistry::createCommand | ( | const int | id | ) |
Creates a new command corresponding to the id.
id | Enumerated ID of the GUICommand. |
Definition at line 69 of file CommandRegistry.cc.
References commands_.
Referenced by OSEdMainFrame::onCommandEvent(), HDBEditorMainFrame::onCommandEvent(), OSEdTreeView::onItemClicked(), HDBEditorMainFrame::onUpdateUI(), and MainFrame::onUpdateUI().
GUICommand * CommandRegistry::createCommand | ( | const std::string | name | ) |
Creates a new command corresponding to the command name.
name | Name of the GUICommand. |
Definition at line 87 of file CommandRegistry.cc.
References commands_.
GUICommand * CommandRegistry::firstCommand | ( | ) |
Returns first command in the registry.
Definition at line 104 of file CommandRegistry.cc.
References commands_, and iterator_.
Referenced by OptionsDialog::readCommands(), DropDownMenu::updateMenu(), and OSEdMainFrame::updateMenuBar().
bool CommandRegistry::isEnabled | ( | const std::string | command | ) |
Returns true, if command is executable and should be enabled, false if not.
command | The command which is checked for enabled/disabled state. |
Definition at line 210 of file CommandRegistry.cc.
References __func__, and commands_.
Referenced by SelectTool::createDefaultMenu(), GUIOptions::createToolbar(), SelectTool::popContextMenu(), ConnectTool::rightClick(), and MainFrame::updateUI().
GUICommand * CommandRegistry::nextCommand | ( | ) |
Returns next command in the registry.
Definition at line 120 of file CommandRegistry.cc.
References commands_, and iterator_.
Referenced by OptionsDialog::readCommands(), DropDownMenu::updateMenu(), and OSEdMainFrame::updateMenuBar().
|
private |
Commands in the registry.
Definition at line 65 of file CommandRegistry.hh.
Referenced by commandIcon(), commandId(), commandName(), commandShortName(), createCommand(), firstCommand(), isEnabled(), nextCommand(), and ~CommandRegistry().
|
private |
The position of the iteration. Used by the firstCommand() and nextCommand().
Definition at line 68 of file CommandRegistry.hh.
Referenced by firstCommand(), and nextCommand().