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

#include <ZoomInCmd.hh>

Inheritance diagram for ZoomInCmd:
Inheritance graph
Collaboration diagram for ZoomInCmd:
Collaboration graph

Public Member Functions

 ZoomInCmd ()
 
virtual ~ZoomInCmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual ZoomInCmdcreate () 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 in the canvas.

Definition at line 40 of file ZoomInCmd.hh.

Constructor & Destructor Documentation

◆ ZoomInCmd()

ZoomInCmd::ZoomInCmd ( )

The Constructor.

Definition at line 45 of file ZoomInCmd.cc.

Referenced by create().

◆ ~ZoomInCmd()

ZoomInCmd::~ZoomInCmd ( )
virtual

The Destructor.

Definition at line 53 of file ZoomInCmd.cc.

53  {
54 }

Member Function Documentation

◆ create()

ZoomInCmd * ZoomInCmd::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 ZoomInCmd.cc.

90  {
91  return new ZoomInCmd();
92 }

References ZoomInCmd().

Here is the call graph for this function:

◆ Do()

bool ZoomInCmd::Do ( )
virtual

Executes the command.

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

Implements GUICommand.

Definition at line 64 of file ZoomInCmd.cc.

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

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

Here is the call graph for this function:

◆ icon()

string ZoomInCmd::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 ZoomInCmd.cc.

101  {
103 }

References ProDeConstants::CMD_ICON_ZOOM_IN.

◆ id()

int ZoomInCmd::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 ZoomInCmd.cc.

79  {
81 }

References ProDeConstants::COMMAND_ZOOM_IN.

◆ isEnabled()

bool ZoomInCmd::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 ZoomInCmd.cc.

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

◆ shortName()

string ZoomInCmd::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 ZoomInCmd.cc.

112  {
114 }

References ProDeConstants::CMD_SNAME_ZOOM_IN.


The documentation for this class was generated from the following files:
ProDeConstants::CMD_NAME_ZOOM_IN
static const std::string CMD_NAME_ZOOM_IN
Command name for the "Zoom In" command.
Definition: ProDeConstants.hh:156
MachineCanvas
Definition: MachineCanvas.hh:64
MDFView::canvas
MachineCanvas * canvas() const
Definition: MDFView.cc:229
EditorCommand::EditorCommand
EditorCommand(std::string name, wxWindow *parent=NULL)
Definition: EditorCommand.cc:42
ProDeConstants::COMMAND_ZOOM_IN
@ COMMAND_ZOOM_IN
Definition: ProDeConstants.hh:447
EditorCommand::view
wxView * view() const
Definition: EditorCommand.cc:76
ZoomInCmd::ZoomInCmd
ZoomInCmd()
Definition: ZoomInCmd.cc:45
ProDeConstants::CMD_ICON_ZOOM_IN
static const std::string CMD_ICON_ZOOM_IN
Icon location for the "Zoom In" command.
Definition: ProDeConstants.hh:328
MachineCanvas::zoomIn
void zoomIn()
Definition: MachineCanvas.cc:240
ProDeConstants::CMD_SNAME_ZOOM_IN
static const std::string CMD_SNAME_ZOOM_IN
Command name for the "Zoom In" command.
Definition: ProDeConstants.hh:270
MDFView
Definition: MDFView.hh:59