| OpenASIP 2.2
    | 
#include <SelectTool.hh>


| Public Member Functions | |
| SelectTool (ChildFrame *frame, MDFView *view) | |
| virtual | ~SelectTool () | 
| virtual void | activate () | 
| virtual void | deactivate () | 
| virtual void | onMouseEvent (wxMouseEvent &event, wxDC &dc) | 
| virtual Figure * | figure () | 
|  Public Member Functions inherited from MachineCanvasTool | |
| virtual | ~MachineCanvasTool () | 
| Private Types | |
| enum | { ID_CONTEXT_MODIFY = 11000 , ID_CONTEXT_DELETE , ID_CONTEXT_COPY , ID_CONTEXT_CUT , ID_ADD_SUBMENU } | 
| IDs for the context menu items.  More... | |
| Private Member Functions | |
| void | leftClick (EditPart *part) | 
| void | popContextMenu (EditPart *part, int x, int y) | 
| wxMenu * | createDefaultMenu () | 
| Private Attributes | |
| ChildFrame * | frame_ | 
| Parent frame of the Canvas. | |
| MDFView * | view_ | 
| View displayed on the Canvas. | |
| bool | active_ | 
| Tells if the tool is active or not. | |
| SelectionFigure * | figure_ | 
| Selection figure;. | |
| Additional Inherited Members | |
|  Protected Member Functions inherited from MachineCanvasTool | |
| MachineCanvasTool (MachineCanvas *canvas) | |
|  Protected Attributes inherited from MachineCanvasTool | |
| MachineCanvas * | canvas_ | 
| Machine canvas where the tool is used. | |
Tool for selecting components in the canvas.
Definition at line 47 of file SelectTool.hh.
| 
 | private | 
IDs for the context menu items.
| Enumerator | |
|---|---|
| ID_CONTEXT_MODIFY | |
| ID_CONTEXT_DELETE | |
| ID_CONTEXT_COPY | |
| ID_CONTEXT_CUT | |
| ID_ADD_SUBMENU | |
Definition at line 70 of file SelectTool.hh.
| SelectTool::SelectTool | ( | ChildFrame * | frame, | 
| MDFView * | view | ||
| ) | 
The Constructor.
Definition at line 58 of file SelectTool.cc.
References figure_.
| 
 | virtual | 
| 
 | virtual | 
Activates the tool.
Implements MachineCanvasTool.
Definition at line 81 of file SelectTool.cc.
References active_.
| 
 | private | 
Returns a popup menu to be used as a default context menu on the canvas.
Definition at line 238 of file SelectTool.cc.
References ProDeConstants::CMD_NAME_PASTE, ProDeConstants::CMD_NAME_REDO, ProDeConstants::CMD_NAME_UNDO, ProDeConstants::COMMAND_ADD_AS, ProDeConstants::COMMAND_ADD_BRIDGE, ProDeConstants::COMMAND_ADD_BUS, ProDeConstants::COMMAND_ADD_FU, ProDeConstants::COMMAND_ADD_GCU, ProDeConstants::COMMAND_ADD_IU, ProDeConstants::COMMAND_ADD_RF, ProDeConstants::COMMAND_ADD_SOCKET, ProDeConstants::COMMAND_EDIT_CONNECTIONS, ProDeConstants::COMMAND_PASTE, ProDeConstants::COMMAND_REDO, ProDeConstants::COMMAND_SELECT, ProDeConstants::COMMAND_UNDO, ProDeConstants::COMMAND_VERIFY_MACHINE, ID_ADD_SUBMENU, and CommandRegistry::isEnabled().
Referenced by popContextMenu().

| 
 | virtual | 
Deactivates the tool.
Implements MachineCanvasTool.
Definition at line 90 of file SelectTool.cc.
References active_.
| 
 | virtual | 
Returns figure of the selection.
Reimplemented from MachineCanvasTool.
Definition at line 100 of file SelectTool.cc.
| 
 | private | 
Selects Component at cursor position, if there is a selectable EditPart at the coordinates.
| part | Component to select. | 
Definition at line 173 of file SelectTool.cc.
References MachineCanvasTool::canvas_, MachineCanvas::clearSelection(), EditPart::figure(), figure_, MachineCanvas::select(), EditPart::selectable(), and SelectionFigure::setSelection().
Referenced by onMouseEvent().

| 
 | virtual | 
Handles mouse events on the Canvas.
| event | Mouse event to handle. | 
| dc | Device context. | 
Implements MachineCanvasTool.
Definition at line 111 of file SelectTool.cc.
References active_, EditPart::canHandle(), MachineCanvasTool::canvas_, ModifyComponentCmd::Do(), ComponentCommand::Do(), MachineCanvas::findEditPart(), frame_, leftClick(), EditPart::performRequest(), popContextMenu(), GUICommand::setParentWindow(), ChildFrame::setStatus(), EditorCommand::setView(), Request::STATUS_REQUEST, and view_.

| 
 | private | 
Pops a context menu for the EditPart at the coordinates;
| part | Context component. | 
| x | X-coordinate for the menu. | 
| y | Y-coordinate for the menu. | 
Definition at line 191 of file SelectTool.cc.
References MDFView::canvas(), ProDeConstants::CMD_NAME_COPY, ProDeConstants::CMD_NAME_CUT, ProDeConstants::CMD_NAME_MODIFY_COMP, ProDeConstants::COMMAND_COPY, ProDeConstants::COMMAND_CUT, ProDeConstants::COMMAND_DELETE_COMP, ProDeConstants::COMMAND_MODIFY_COMP, createDefaultMenu(), CommandRegistry::isEnabled(), and view_.
Referenced by onMouseEvent().

| 
 | private | 
Tells if the tool is active or not.
Definition at line 65 of file SelectTool.hh.
Referenced by activate(), deactivate(), and onMouseEvent().
| 
 | private | 
Selection figure;.
Definition at line 67 of file SelectTool.hh.
Referenced by leftClick(), SelectTool(), and ~SelectTool().
| 
 | private | 
Parent frame of the Canvas.
Definition at line 61 of file SelectTool.hh.
Referenced by onMouseEvent().
| 
 | private | 
View displayed on the Canvas.
Definition at line 63 of file SelectTool.hh.
Referenced by onMouseEvent(), and popContextMenu().