OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
GUICommand Class Referenceabstract

#include <GUICommand.hh>

Inherited by AddBusEntryCmd, AddCostFunctionPluginCmd, AddFUArchFromADFCmd, AddFUEntryCmd, AddFUImplementationCmd, AddOperationImplementationCmd, AddOperationImplementationResourceCmd, AddRFArchitectureCmd, AddRFEntryCmd, AddRFImplementationCmd, AddSocketEntryCmd, ClearDisassemblyHighlightCmd, CreateHDBCmd, EditorCommand, HDBEditorAboutCmd, HDBEditorDeleteCmd, HDBEditorModifyCmd, HDBEditorQuitCmd, HighlightExecPercentageCmd, HighlightTopExecCountsCmd, OpenHDBCmd, OSEdAboutCmd, OSEdAddModuleCmd, OSEdAddOperationCmd, OSEdBuildAllCmd, OSEdBuildCmd, OSEdMemoryCmd, OSEdModifyBehaviorCmd, OSEdOptionsCmd, OSEdPropertiesCmd, OSEdQuitCmd, OSEdRemoveModuleCmd, OSEdRemoveOperationCmd, OSEdSimulateCmd, OSEdUserManualCmd, ProximAboutCmd, ProximCDCmd, ProximClearConsoleCmd, ProximExecuteFileCmd, ProximFindCmd, ProximKillCmd, ProximNewPortWindowCmd, ProximNewRegisterWindowCmd, ProximNextICmd, ProximOpenMachineCmd, ProximOpenProgramCmd, ProximOptionsCmd, ProximQuitCmd, ProximResumeCmd, ProximRunCmd, ProximSimulatorSettingsCmd, ProximStepICmd, SetCostFunctionPluginCmd, SetFUArchitectureCmd, SetRFArchitectureCmd, and UserManualCmd.

Collaboration diagram for GUICommand:
Collaboration graph

Public Member Functions

 GUICommand (std::string name, wxWindow *parent)
 
virtual ~GUICommand ()
 
virtual int id () const =0
 
virtual GUICommandcreate () const =0
 
virtual bool Do ()=0
 
virtual bool isEnabled ()=0
 
virtual std::string icon () const =0
 
virtual bool isChecked () const
 
virtual std::string shortName () const
 
void setParentWindow (wxWindow *view)
 
wxWindow * parentWindow () const
 
std::string name () const
 

Private Attributes

wxWindow * parent_
 Parent window of the command. More...
 
std::string name_
 Name of the command. More...
 

Detailed Description

Base class for editor commands, which can be added to menus or toolbar.

Definition at line 43 of file GUICommand.hh.

Constructor & Destructor Documentation

◆ GUICommand()

GUICommand::GUICommand ( std::string  name,
wxWindow *  parent = NULL 
)

The Constructor.

Definition at line 42 of file GUICommand.cc.

42  :
43  parent_(parent), name_(name) {
44 
45 }

◆ ~GUICommand()

GUICommand::~GUICommand ( )
virtual

The Destructor.

Definition at line 52 of file GUICommand.cc.

52  {
53 }

Member Function Documentation

◆ create()

virtual GUICommand* GUICommand::create ( ) const
pure virtual

Creates a new GUICommand instance.

Returns
New GUICommand instance.

Implemented in FullyConnectBussesCmd, PasteComponentCmd, ProximCDCmd, ProximNextICmd, ProximResumeCmd, OSEdAboutCmd, OSEdAddModuleCmd, OSEdAddOperationCmd, OSEdBuildAllCmd, OSEdBuildCmd, OSEdMemoryCmd, OSEdModifyBehaviorCmd, OSEdOptionsCmd, OSEdPropertiesCmd, OSEdQuitCmd, OSEdRemoveModuleCmd, OSEdRemoveOperationCmd, OSEdSimulateCmd, OSEdUserManualCmd, ProximExecuteFileCmd, ProximKillCmd, ProximOpenMachineCmd, ProximOpenProgramCmd, ProximOptionsCmd, ProximQuitCmd, ProximRunCmd, ProximSimulatorSettingsCmd, ProximStepICmd, CreateHDBCmd, OpenHDBCmd, AddBridgeCmd, AddGCUCmd, CallExplorerPluginCmd, EditOTAFormatsCmd, EditTemplatesCmd, ImplementMachineCmd, ProDeExportCmd, HighlightTopExecCountsCmd, ProximAboutCmd, ProximFindCmd, HDBEditorAboutCmd, AddASCmd, AddBusCmd, AddFUCmd, AddIUCmd, AddRFCmd, AddSocketCmd, CopyComponentCmd, CutComponentCmd, DeleteComponentCmd, EditConnectionsCmd, EditOptionsCmd, ModifyComponentCmd, PrintPreviewCmd, SaveOptionsCmd, VerifyMachineCmd, VLIWConnectICCmd, ClearDisassemblyHighlightCmd, HighlightExecPercentageCmd, ProximClearConsoleCmd, ProximNewPortWindowCmd, ProximNewRegisterWindowCmd, AddBusEntryCmd, AddCostFunctionPluginCmd, AddFUArchFromADFCmd, AddFUEntryCmd, AddFUImplementationCmd, AddRFArchitectureCmd, AddRFEntryCmd, AddRFImplementationCmd, AddSocketEntryCmd, AddFUArchFromADFCmd, HDBEditorDeleteCmd, HDBEditorModifyCmd, HDBEditorQuitCmd, SetCostFunctionPluginCmd, SetFUArchitectureCmd, SetRFArchitectureCmd, AddFUFromHDBCmd, AddIUFromHDBCmd, AddRFFromHDBCmd, BlocksConnectICCmd, CloseDocumentCmd, EditBusOrderCmd, EditImmediateSlotsCmd, NewDocumentCmd, OpenDocumentCmd, PrintCmd, QuitCmd, RedoCmd, SaveDocumentAsCmd, SaveDocumentCmd, SelectCmd, ToggleUnitDetailsCmd, UndoCmd, UserManualCmd, AboutCmd, EditAddressSpacesCmd, FitHeightCmd, FitWidthCmd, FitWindowCmd, ZoomInCmd, ZoomOutCmd, EditMachineCmd, AddOperationImplementationCmd, and AddOperationImplementationResourceCmd.

◆ Do()

virtual bool GUICommand::Do ( )
pure virtual

Executes the command.

Returns
True, if the command was succesfully executed, false otherwise.

Implemented in FullyConnectBussesCmd, PasteComponentCmd, OSEdAboutCmd, OSEdAddModuleCmd, OSEdAddOperationCmd, OSEdBuildAllCmd, OSEdBuildCmd, OSEdMemoryCmd, OSEdModifyBehaviorCmd, OSEdOptionsCmd, OSEdPropertiesCmd, OSEdQuitCmd, OSEdRemoveModuleCmd, OSEdRemoveOperationCmd, OSEdSimulateCmd, OSEdUserManualCmd, ProximCDCmd, ProximNextICmd, ProximResumeCmd, ProximExecuteFileCmd, ProximKillCmd, ProximOpenMachineCmd, ProximOpenProgramCmd, ProximOptionsCmd, ProximQuitCmd, ProximRunCmd, ProximStepICmd, CreateHDBCmd, OpenHDBCmd, AddBridgeCmd, AddGCUCmd, CallExplorerPluginCmd, EditOTAFormatsCmd, EditTemplatesCmd, ImplementMachineCmd, ProDeExportCmd, HighlightTopExecCountsCmd, ProximAboutCmd, ProximFindCmd, HDBEditorAboutCmd, AddASCmd, AddBusCmd, AddFUCmd, AddIUCmd, AddRFCmd, AddSocketCmd, CopyComponentCmd, CutComponentCmd, DeleteComponentCmd, EditConnectionsCmd, EditOptionsCmd, ModifyComponentCmd, PrintPreviewCmd, SaveOptionsCmd, VerifyMachineCmd, VLIWConnectICCmd, ClearDisassemblyHighlightCmd, HighlightExecPercentageCmd, ProximClearConsoleCmd, ProximNewPortWindowCmd, ProximNewRegisterWindowCmd, ProximSimulatorSettingsCmd, AddBusEntryCmd, AddCostFunctionPluginCmd, AddFUArchFromADFCmd, AddFUEntryCmd, AddFUImplementationCmd, AddRFArchitectureCmd, AddRFEntryCmd, AddRFImplementationCmd, AddSocketEntryCmd, AddFUArchFromADFCmd, HDBEditorDeleteCmd, HDBEditorModifyCmd, HDBEditorQuitCmd, SetCostFunctionPluginCmd, SetFUArchitectureCmd, SetRFArchitectureCmd, AddFUFromHDBCmd, AddIUFromHDBCmd, AddRFFromHDBCmd, BlocksConnectICCmd, CloseDocumentCmd, EditBusOrderCmd, EditImmediateSlotsCmd, NewDocumentCmd, OpenDocumentCmd, PrintCmd, QuitCmd, RedoCmd, SaveDocumentAsCmd, SaveDocumentCmd, SelectCmd, ToggleUnitDetailsCmd, UndoCmd, UserManualCmd, AboutCmd, EditAddressSpacesCmd, FitHeightCmd, FitWidthCmd, FitWindowCmd, ZoomInCmd, ZoomOutCmd, EditMachineCmd, AddOperationImplementationCmd, and AddOperationImplementationResourceCmd.

Referenced by QuitCmd::Do(), ProximMainFrame::onClose(), OSEdMainFrame::onCommandEvent(), HDBEditorMainFrame::onCommandEvent(), MainFrame::onCommandEvent(), ProximMainFrame::onCommandEvent(), and OSEdTreeView::onItemClicked().

◆ icon()

virtual std::string GUICommand::icon ( ) const
pure virtual

Returns name of the command icon file.

Returns
Name of the command icon file.

Implemented in PasteComponentCmd, EditorCommand, OSEdAboutCmd, OSEdAddModuleCmd, OSEdAddOperationCmd, OSEdBuildAllCmd, OSEdBuildCmd, OSEdMemoryCmd, OSEdModifyBehaviorCmd, OSEdOptionsCmd, OSEdPropertiesCmd, OSEdQuitCmd, OSEdRemoveModuleCmd, OSEdRemoveOperationCmd, OSEdSimulateCmd, OSEdUserManualCmd, ProximCDCmd, ProximNextICmd, ProximResumeCmd, ProximExecuteFileCmd, ProximKillCmd, ProximOpenMachineCmd, ProximOpenProgramCmd, ProximOptionsCmd, ProximQuitCmd, ProximRunCmd, ProximStepICmd, CreateHDBCmd, OpenHDBCmd, CallExplorerPluginCmd, DeleteComponentCmd, EditOptionsCmd, EditOTAFormatsCmd, EditTemplatesCmd, ImplementMachineCmd, ModifyComponentCmd, PrintPreviewCmd, HighlightTopExecCountsCmd, ProximAboutCmd, ProximFindCmd, HDBEditorAboutCmd, CloseDocumentCmd, CopyComponentCmd, CutComponentCmd, EditConnectionsCmd, NewDocumentCmd, OpenDocumentCmd, SaveDocumentAsCmd, SaveDocumentCmd, SaveOptionsCmd, VerifyMachineCmd, ClearDisassemblyHighlightCmd, HighlightExecPercentageCmd, ProximClearConsoleCmd, ProximNewPortWindowCmd, ProximNewRegisterWindowCmd, ProximSimulatorSettingsCmd, AddBusEntryCmd, AddCostFunctionPluginCmd, AddFUArchFromADFCmd, AddFUEntryCmd, AddFUImplementationCmd, AddRFArchitectureCmd, AddRFEntryCmd, AddRFImplementationCmd, AddSocketEntryCmd, AddFUArchFromADFCmd, HDBEditorDeleteCmd, HDBEditorModifyCmd, HDBEditorQuitCmd, SetCostFunctionPluginCmd, SetFUArchitectureCmd, SetRFArchitectureCmd, AboutCmd, AddFUFromHDBCmd, AddIUFromHDBCmd, AddRFFromHDBCmd, EditImmediateSlotsCmd, PrintCmd, QuitCmd, RedoCmd, SelectCmd, UndoCmd, UserManualCmd, EditAddressSpacesCmd, FitHeightCmd, FitWidthCmd, FitWindowCmd, ZoomInCmd, ZoomOutCmd, EditMachineCmd, AddOperationImplementationCmd, and AddOperationImplementationResourceCmd.

◆ id()

virtual int GUICommand::id ( ) const
pure virtual

Returns the ID of the command.

Returns
The ID of the command.

Implemented in FullyConnectBussesCmd, PasteComponentCmd, ProximCDCmd, ProximNextICmd, ProximResumeCmd, OSEdAboutCmd, OSEdAddModuleCmd, OSEdAddOperationCmd, OSEdBuildAllCmd, OSEdBuildCmd, OSEdMemoryCmd, OSEdModifyBehaviorCmd, OSEdOptionsCmd, OSEdPropertiesCmd, OSEdQuitCmd, OSEdRemoveModuleCmd, OSEdRemoveOperationCmd, OSEdSimulateCmd, OSEdUserManualCmd, ProximExecuteFileCmd, ProximKillCmd, ProximOpenMachineCmd, ProximOpenProgramCmd, ProximOptionsCmd, ProximQuitCmd, ProximRunCmd, ProximStepICmd, CreateHDBCmd, OpenHDBCmd, AddBridgeCmd, AddGCUCmd, CallExplorerPluginCmd, EditOTAFormatsCmd, EditTemplatesCmd, ImplementMachineCmd, ProDeExportCmd, HighlightTopExecCountsCmd, ProximAboutCmd, ProximFindCmd, ProximSimulatorSettingsCmd, HDBEditorAboutCmd, AddASCmd, AddBusCmd, AddFUCmd, AddIUCmd, AddRFCmd, AddSocketCmd, CopyComponentCmd, CutComponentCmd, DeleteComponentCmd, EditConnectionsCmd, EditOptionsCmd, ModifyComponentCmd, PrintPreviewCmd, SaveOptionsCmd, VerifyMachineCmd, VLIWConnectICCmd, ClearDisassemblyHighlightCmd, HighlightExecPercentageCmd, ProximClearConsoleCmd, ProximNewPortWindowCmd, ProximNewRegisterWindowCmd, AddBusEntryCmd, AddCostFunctionPluginCmd, AddFUArchFromADFCmd, AddFUEntryCmd, AddFUImplementationCmd, AddRFArchitectureCmd, AddRFEntryCmd, AddRFImplementationCmd, AddSocketEntryCmd, AddFUArchFromADFCmd, HDBEditorDeleteCmd, HDBEditorModifyCmd, HDBEditorQuitCmd, SetCostFunctionPluginCmd, SetFUArchitectureCmd, SetRFArchitectureCmd, AddFUFromHDBCmd, AddIUFromHDBCmd, AddRFFromHDBCmd, BlocksConnectICCmd, CloseDocumentCmd, EditBusOrderCmd, EditImmediateSlotsCmd, NewDocumentCmd, OpenDocumentCmd, PrintCmd, QuitCmd, RedoCmd, SaveDocumentAsCmd, SaveDocumentCmd, SelectCmd, ToggleUnitDetailsCmd, UndoCmd, UserManualCmd, AboutCmd, EditAddressSpacesCmd, FitHeightCmd, FitWidthCmd, FitWindowCmd, ZoomInCmd, ZoomOutCmd, EditMachineCmd, AddOperationImplementationCmd, and AddOperationImplementationResourceCmd.

Referenced by OptionsDialog::readCommands(), DropDownMenu::updateMenu(), and OSEdMainFrame::updateMenuBar().

◆ isChecked()

bool GUICommand::isChecked ( ) const
virtual

Returns true if a checkbox related to the command is checked.

This is meaningful only for toggle-type commands.

Returns
True, if the command feature is toggled on.

Reimplemented in ToggleUnitDetailsCmd.

Definition at line 112 of file GUICommand.cc.

112  {
113  return false;
114 }

Referenced by MainFrame::onUpdateUI().

◆ isEnabled()

virtual bool GUICommand::isEnabled ( )
pure virtual

Returns true if the command is executable, false otherwise.

Returns
True, if the command is executable, false otherwise.

Implemented in FullyConnectBussesCmd, PasteComponentCmd, EditorCommand, ProximCDCmd, ProximNextICmd, ProximResumeCmd, CallExplorerPluginCmd, EditOTAFormatsCmd, EditTemplatesCmd, ImplementMachineCmd, OSEdAboutCmd, OSEdAddModuleCmd, OSEdAddOperationCmd, OSEdBuildAllCmd, OSEdBuildCmd, OSEdMemoryCmd, OSEdModifyBehaviorCmd, OSEdOptionsCmd, OSEdPropertiesCmd, OSEdQuitCmd, OSEdRemoveModuleCmd, OSEdRemoveOperationCmd, OSEdSimulateCmd, OSEdUserManualCmd, ProximExecuteFileCmd, ProximKillCmd, ProximOpenMachineCmd, ProximOpenProgramCmd, ProximOptionsCmd, ProximQuitCmd, ProximRunCmd, ProximStepICmd, CreateHDBCmd, OpenHDBCmd, AddBridgeCmd, AddGCUCmd, DeleteComponentCmd, EditConnectionsCmd, EditOptionsCmd, ModifyComponentCmd, PrintPreviewCmd, SaveOptionsCmd, VerifyMachineCmd, HighlightTopExecCountsCmd, ProximAboutCmd, ProximFindCmd, HDBEditorAboutCmd, AddASCmd, AddBusCmd, AddFUCmd, AddFUFromHDBCmd, AddIUCmd, AddIUFromHDBCmd, AddRFCmd, AddRFFromHDBCmd, AddSocketCmd, CloseDocumentCmd, CopyComponentCmd, CutComponentCmd, EditImmediateSlotsCmd, NewDocumentCmd, OpenDocumentCmd, ProDeExportCmd, SaveDocumentAsCmd, SaveDocumentCmd, UserManualCmd, ClearDisassemblyHighlightCmd, HighlightExecPercentageCmd, ProximClearConsoleCmd, ProximNewPortWindowCmd, ProximNewRegisterWindowCmd, AddBusEntryCmd, AddCostFunctionPluginCmd, AddFUArchFromADFCmd, AddFUEntryCmd, AddFUImplementationCmd, AddRFArchitectureCmd, AddRFEntryCmd, AddRFImplementationCmd, AddSocketEntryCmd, AddFUArchFromADFCmd, HDBEditorDeleteCmd, HDBEditorModifyCmd, HDBEditorQuitCmd, SetCostFunctionPluginCmd, SetFUArchitectureCmd, SetRFArchitectureCmd, EditAddressSpacesCmd, FitHeightCmd, FitWidthCmd, FitWindowCmd, PrintCmd, QuitCmd, RedoCmd, SelectCmd, ToggleUnitDetailsCmd, UndoCmd, VLIWConnectICCmd, ZoomInCmd, ZoomOutCmd, BlocksConnectICCmd, EditBusOrderCmd, EditMachineCmd, AboutCmd, ProximSimulatorSettingsCmd, AddOperationImplementationCmd, and AddOperationImplementationResourceCmd.

Referenced by ProximMainFrame::onClose(), MainFrame::onCommandEvent(), HDBEditorMainFrame::onUpdateUI(), MainFrame::onUpdateUI(), ProximMainFrame::updateCommand(), DropDownMenu::updateMenu(), and OSEdMainFrame::updateMenuBar().

◆ name()

std::string GUICommand::name ( ) const

Returns name of the command.

Returns
Long name of the command.

Definition at line 99 of file GUICommand.cc.

99  {
100  return name_;
101 }

References name_.

Referenced by OptionsDialog::readCommands().

◆ parentWindow()

wxWindow * GUICommand::parentWindow ( ) const

Returns parent window of the command.

Returns
Parent window of the command.

Definition at line 75 of file GUICommand.cc.

75  {
76  return parent_;
77 }

References parent_.

Referenced by UserManualCmd::askFromUser(), HDBEditorDeleteCmd::confirmDeletion(), EditMachineCmd::Do(), EditAddressSpacesCmd::Do(), AboutCmd::Do(), SetRFArchitectureCmd::Do(), AddRFImplementationCmd::Do(), QuitCmd::Do(), SetCostFunctionPluginCmd::Do(), HDBEditorModifyCmd::Do(), SetFUArchitectureCmd::Do(), AddFUFromHDBCmd::Do(), AddFUImplementationCmd::Do(), AddCostFunctionPluginCmd::Do(), AddFUArchFromADFCmd::Do(), EditBusOrderCmd::Do(), EditImmediateSlotsCmd::Do(), PrintCmd::Do(), AddIUFromHDBCmd::Do(), AddRFArchitectureCmd::Do(), AddRFFromHDBCmd::Do(), HDBEditorDeleteCmd::Do(), ProximSimulatorSettingsCmd::Do(), SaveOptionsCmd::Do(), VerifyMachineCmd::Do(), AddBusCmd::Do(), AddFUCmd::Do(), AddSocketCmd::Do(), ModifyComponentCmd::Do(), CopyComponentCmd::Do(), CutComponentCmd::Do(), AddASCmd::Do(), DeleteComponentCmd::Do(), AddIUCmd::Do(), PrintPreviewCmd::Do(), ProximAboutCmd::Do(), EditOptionsCmd::Do(), AddRFCmd::Do(), ProximFindCmd::Do(), HDBEditorAboutCmd::Do(), ProximKillCmd::Do(), ProximQuitCmd::Do(), ProximOpenProgramCmd::Do(), CallExplorerPluginCmd::Do(), OpenHDBCmd::Do(), ProximOptionsCmd::Do(), ProximOpenMachineCmd::Do(), CreateHDBCmd::Do(), AddGCUCmd::Do(), EditOTAFormatsCmd::Do(), AddBridgeCmd::Do(), ProximExecuteFileCmd::Do(), ProDeExportCmd::Do(), EditTemplatesCmd::Do(), ImplementMachineCmd::Do(), ProximCDCmd::Do(), OSEdOptionsCmd::Do(), OSEdAddModuleCmd::Do(), OSEdRemoveOperationCmd::Do(), OSEdAddOperationCmd::Do(), OSEdBuildAllCmd::Do(), OSEdSimulateCmd::Do(), OSEdModifyBehaviorCmd::Do(), OSEdPropertiesCmd::Do(), OSEdRemoveModuleCmd::Do(), OSEdBuildCmd::Do(), OSEdMemoryCmd::Do(), OSEdAboutCmd::Do(), and PasteComponentCmd::Do().

◆ setParentWindow()

void GUICommand::setParentWindow ( wxWindow *  parent)

Sets the parent window of the command.

Window will be used as parent for the dialogs created by this command.

Parameters
parentParent window for the command dialogs.

Definition at line 64 of file GUICommand.cc.

64  {
65  parent_ = parent;
66 }

References parent_.

Referenced by ProximMainFrame::onClose(), OSEdMainFrame::onCommandEvent(), HDBEditorMainFrame::onCommandEvent(), MainFrame::onCommandEvent(), ProximMainFrame::onCommandEvent(), OSEdTreeView::onItemClicked(), and SelectTool::onMouseEvent().

◆ shortName()

std::string GUICommand::shortName ( ) const
virtual

Member Data Documentation

◆ name_

std::string GUICommand::name_
private

Name of the command.

Definition at line 93 of file GUICommand.hh.

Referenced by name(), and shortName().

◆ parent_

wxWindow* GUICommand::parent_
private

Parent window of the command.

Definition at line 91 of file GUICommand.hh.

Referenced by parentWindow(), and setParentWindow().


The documentation for this class was generated from the following files:
GUICommand::name_
std::string name_
Name of the command.
Definition: GUICommand.hh:93
GUICommand::parent_
wxWindow * parent_
Parent window of the command.
Definition: GUICommand.hh:91
GUICommand::name
std::string name() const
Definition: GUICommand.cc:99