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

#include <ZoomOutCmd.hh>

Inheritance diagram for ZoomOutCmd:
Inheritance graph
Collaboration diagram for ZoomOutCmd:
Collaboration graph

Public Member Functions

 ZoomOutCmd ()
 
virtual ~ZoomOutCmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual ZoomOutCmdcreate () const
 
virtual std::string icon () const
 
virtual std::string shortName () 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

EditorCommand for zooming out the canvas.

Definition at line 40 of file ZoomOutCmd.hh.

Constructor & Destructor Documentation

◆ ZoomOutCmd()

ZoomOutCmd::ZoomOutCmd ( )

The Constructor.

Definition at line 45 of file ZoomOutCmd.cc.

Referenced by create().

◆ ~ZoomOutCmd()

ZoomOutCmd::~ZoomOutCmd ( )
virtual

The Destructor.

Definition at line 53 of file ZoomOutCmd.cc.

53  {
54 }

Member Function Documentation

◆ create()

ZoomOutCmd * ZoomOutCmd::create ( ) const
virtual

Creates and returns a new instance of this command.

Returns
Newly created instance of this command.

Implements GUICommand.

Definition at line 90 of file ZoomOutCmd.cc.

90  {
91  return new ZoomOutCmd();
92 }

References ZoomOutCmd().

Here is the call graph for this function:

◆ Do()

bool ZoomOutCmd::Do ( )
virtual

Executes the command.

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

Implements GUICommand.

Definition at line 64 of file ZoomOutCmd.cc.

64  {
65  MDFView* mView = dynamic_cast<MDFView*>(view());
66  MachineCanvas* canvas = mView->canvas();
67 
68  canvas->zoomOut();
69  return true;
70 }

References MDFView::canvas(), EditorCommand::view(), and MachineCanvas::zoomOut().

Here is the call graph for this function:

◆ icon()

string ZoomOutCmd::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 101 of file ZoomOutCmd.cc.

101  {
103 }

References ProDeConstants::CMD_ICON_ZOOM_OUT.

◆ id()

int ZoomOutCmd::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 79 of file ZoomOutCmd.cc.

79  {
81 }

References ProDeConstants::COMMAND_ZOOM_OUT.

◆ isEnabled()

bool ZoomOutCmd::isEnabled ( )
virtual

Returns true when the command is executable, false when not.

This command is executable when a document is open.

Returns
True, if a document is open.

Reimplemented from EditorCommand.

Definition at line 125 of file ZoomOutCmd.cc.

125  {
126  wxDocManager* manager = wxGetApp().docManager();
127  if (manager->GetCurrentView() != NULL) {
128  return true;
129  }
130  return false;
131 }

◆ shortName()

string ZoomOutCmd::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 112 of file ZoomOutCmd.cc.

112  {
114 }

References ProDeConstants::CMD_SNAME_ZOOM_OUT.


The documentation for this class was generated from the following files:
MachineCanvas
Definition: MachineCanvas.hh:64
ProDeConstants::CMD_ICON_ZOOM_OUT
static const std::string CMD_ICON_ZOOM_OUT
Icon location for the "Zoom Out" command.
Definition: ProDeConstants.hh:330
MDFView::canvas
MachineCanvas * canvas() const
Definition: MDFView.cc:229
EditorCommand::EditorCommand
EditorCommand(std::string name, wxWindow *parent=NULL)
Definition: EditorCommand.cc:42
ZoomOutCmd::ZoomOutCmd
ZoomOutCmd()
Definition: ZoomOutCmd.cc:45
EditorCommand::view
wxView * view() const
Definition: EditorCommand.cc:76
ProDeConstants::COMMAND_ZOOM_OUT
@ COMMAND_ZOOM_OUT
Definition: ProDeConstants.hh:448
ProDeConstants::CMD_NAME_ZOOM_OUT
static const std::string CMD_NAME_ZOOM_OUT
Command name for the "Zoom Out" command.
Definition: ProDeConstants.hh:158
ProDeConstants::CMD_SNAME_ZOOM_OUT
static const std::string CMD_SNAME_ZOOM_OUT
Command name for the "Zoom Out" command.
Definition: ProDeConstants.hh:272
MachineCanvas::zoomOut
void zoomOut()
Definition: MachineCanvas.cc:251
MDFView
Definition: MDFView.hh:59