OpenASIP  2.0
Public Member Functions | List of all members
EditOptionsCmd Class Reference

#include <EditOptionsCmd.hh>

Inheritance diagram for EditOptionsCmd:
Inheritance graph
Collaboration diagram for EditOptionsCmd:
Collaboration graph

Public Member Functions

 EditOptionsCmd ()
 
virtual ~EditOptionsCmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual EditOptionsCmdcreate () const
 
virtual std::string shortName () const
 
virtual std::string icon () const
 
virtual bool isEnabled ()
 
- Public Member Functions inherited from EditorCommand
 EditorCommand (std::string name, wxWindow *parent=NULL)
 
virtual ~EditorCommand ()
 
void setView (wxView *view)
 
wxView * view () const
 
- Public Member Functions inherited from GUICommand
 GUICommand (std::string name, wxWindow *parent)
 
virtual ~GUICommand ()
 
virtual bool isChecked () const
 
void setParentWindow (wxWindow *view)
 
wxWindow * parentWindow () const
 
std::string name () const
 

Detailed Description

wxCommand for editing editor options.

Creates and shows an OptionsDialog.

Definition at line 42 of file EditOptionsCmd.hh.

Constructor & Destructor Documentation

◆ EditOptionsCmd()

EditOptionsCmd::EditOptionsCmd ( )

The Constructor.

Definition at line 45 of file EditOptionsCmd.cc.

Referenced by create().

◆ ~EditOptionsCmd()

EditOptionsCmd::~EditOptionsCmd ( )
virtual

The Destructor.

Definition at line 54 of file EditOptionsCmd.cc.

54  {
55 }

Member Function Documentation

◆ create()

EditOptionsCmd * EditOptionsCmd::create ( ) const
virtual

Creates and returns a new instance of this command.

Returns
Newly created instance of this command.

Implements GUICommand.

Definition at line 95 of file EditOptionsCmd.cc.

95  {
96  return new EditOptionsCmd();
97 }

References EditOptionsCmd().

Here is the call graph for this function:

◆ Do()

bool EditOptionsCmd::Do ( )
virtual

Executes the command.

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

Implements GUICommand.

Definition at line 64 of file EditOptionsCmd.cc.

64  {
65 
66  ProDeOptionsDialog dialog(
67  parentWindow(), *wxGetApp().options(), *wxGetApp().commandRegistry());
68  if (dialog.ShowModal() == wxID_OK) {
69  if (wxGetApp().options()->toolbarVisibility()) {
70  wxGetApp().mainFrame()->createToolbar();
71  wxGetApp().mainFrame()->createMenubar();
72  }
73  }
74  return true;
75 }

References options, and GUICommand::parentWindow().

Here is the call graph for this function:

◆ icon()

string EditOptionsCmd::icon ( ) const
virtual

Returns path to the command's icon file.

Returns
Full path to the command's icon file.

Reimplemented from EditorCommand.

Definition at line 117 of file EditOptionsCmd.cc.

117  {
119 }

References ProDeConstants::CMD_ICON_EDIT_OPTIONS.

◆ id()

int EditOptionsCmd::id ( ) const
virtual

Returns id of this command.

Returns
ID for this command to be used in menus and toolbars.

Implements GUICommand.

Definition at line 84 of file EditOptionsCmd.cc.

84  {
86 }

References ProDeConstants::COMMAND_EDIT_OPTIONS.

◆ isEnabled()

bool EditOptionsCmd::isEnabled ( )
virtual

This command is always executable.

Returns
Always true.

Reimplemented from EditorCommand.

Definition at line 128 of file EditOptionsCmd.cc.

128  {
129  return true;
130 }

◆ shortName()

string EditOptionsCmd::shortName ( ) const
virtual

Returns short version of the command name.

Returns
Short name of the command to be used in the toolbar.

Reimplemented from GUICommand.

Definition at line 106 of file EditOptionsCmd.cc.

106  {
108 }

References ProDeConstants::CMD_SNAME_EDIT_OPTIONS.


The documentation for this class was generated from the following files:
ProDeConstants::CMD_ICON_EDIT_OPTIONS
static const std::string CMD_ICON_EDIT_OPTIONS
Icon location for the "Edit Options" command.
Definition: ProDeConstants.hh:320
ProDeConstants::CMD_NAME_EDIT_OPTIONS
static const std::string CMD_NAME_EDIT_OPTIONS
Command name for the "Edit Options" command.
Definition: ProDeConstants.hh:177
EditorCommand::EditorCommand
EditorCommand(std::string name, wxWindow *parent=NULL)
Definition: EditorCommand.cc:42
ProDeConstants::COMMAND_EDIT_OPTIONS
@ COMMAND_EDIT_OPTIONS
Definition: ProDeConstants.hh:462
ProDeOptionsDialog
Definition: ProDeOptionsDialog.hh:48
ProDeConstants::CMD_SNAME_EDIT_OPTIONS
static const std::string CMD_SNAME_EDIT_OPTIONS
Command name for the "Edit Options" command.
Definition: ProDeConstants.hh:256
options
static MachInfoCmdLineOptions options
Definition: MachInfo.cc:46
EditOptionsCmd::EditOptionsCmd
EditOptionsCmd()
Definition: EditOptionsCmd.cc:45
GUICommand::parentWindow
wxWindow * parentWindow() const
Definition: GUICommand.cc:75