casa
5.7.0-16
|
A PlotMouseTool is a specialization of PlotTool that handles all mouse events. More...
#include <PlotTool.h>
Public Member Functions | |
PlotMouseTool (PlotCoordinate::System coordSys=PlotCoordinate::WORLD) | |
Constructor which takes the tool's coordinate system. More... | |
PlotMouseTool (PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System coordSys=PlotCoordinate::WORLD) | |
Constructor which takes the tool's axes and coordinate system. More... | |
virtual | ~PlotMouseTool () |
Destructor. More... | |
virtual void | handleSelect (const PlotSelectEvent &event) |
Event handling methods. More... | |
virtual void | handleClick (const PlotClickEvent &event) |
Handle the given event. More... | |
virtual void | handleMousePress (const PlotMousePressEvent &event) |
Handle the given event. More... | |
virtual void | handleMouseRelease (const PlotMouseReleaseEvent &event) |
Handle the given event. More... | |
virtual void | handleMouseDrag (const PlotMouseDragEvent &event) |
Handle the given event. More... | |
virtual void | handleMouseMove (const PlotMouseMoveEvent &event) |
Handle the given event. More... | |
virtual void | handleWheel (const PlotWheelEvent &event) |
Handle the given event. More... | |
virtual void | handleMouseEvent (const PlotEvent &event)=0 |
ABSTRACT METHODS //. More... | |
Public Member Functions inherited from casa::PlotTool | |
PlotTool (PlotCoordinate::System sys=PlotCoordinate::WORLD) | |
Constructor which takes which coordinate system events should be processed in. More... | |
PlotTool (PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System sys=PlotCoordinate::WORLD) | |
Constructor which takes the two axes and the coordinate system which events should be processed in. More... | |
virtual | ~PlotTool () |
Destructor. More... | |
virtual bool | isActive () const |
Returns whether this tool is currently active or not. More... | |
virtual void | setActive (bool isActive=true) |
Sets whether this tool is currently active or not. More... | |
virtual bool | isBlocking () const |
Returns whether this tool is blocking or not. More... | |
virtual void | setBlocking (bool blocking=true) |
Sets whether this tool is blocking or not. More... | |
virtual PlotAxis | getXAxis () const |
Gets the axes on which the tool operates. More... | |
virtual PlotAxis | getYAxis () const |
virtual PlotCoordinate::System | getCoordinateSystem () const |
Gets the coordinate system in which the tool wants to process events. More... | |
virtual bool | lastEventWasHandled () const |
Returns whether the last event was handled or not. More... | |
virtual void | reset () |
Resets any internal state such as history/stacks. More... | |
Public Member Functions inherited from casa::PlotSelectEventHandler | |
PlotSelectEventHandler () | |
virtual | ~PlotSelectEventHandler () |
Public Member Functions inherited from casa::PlotClickEventHandler | |
PlotClickEventHandler () | |
virtual | ~PlotClickEventHandler () |
Public Member Functions inherited from casa::PlotMousePressEventHandler | |
PlotMousePressEventHandler () | |
virtual | ~PlotMousePressEventHandler () |
Public Member Functions inherited from casa::PlotMouseReleaseEventHandler | |
PlotMouseReleaseEventHandler () | |
virtual | ~PlotMouseReleaseEventHandler () |
Public Member Functions inherited from casa::PlotMouseDragEventHandler | |
PlotMouseDragEventHandler () | |
virtual | ~PlotMouseDragEventHandler () |
Public Member Functions inherited from casa::PlotMouseMoveEventHandler | |
PlotMouseMoveEventHandler () | |
virtual | ~PlotMouseMoveEventHandler () |
Public Member Functions inherited from casa::PlotWheelEventHandler | |
PlotWheelEventHandler () | |
virtual | ~PlotWheelEventHandler () |
Additional Inherited Members | |
Protected Member Functions inherited from casa::PlotTool | |
virtual PlotCanvas * | canvas () const |
Returns the canvas this tool is attached to, or NULL for none. More... | |
virtual PlotFactory * | factory () const |
Returns a factory that can be used for generating implementation-specific classes, or NULL for none. More... | |
virtual bool | isAttached () const |
Returns true if this tool is attached to a canvas, false otherwise. More... | |
virtual void | attach (PlotCanvas *canvas) |
Attaches this tool to the given canvas. More... | |
virtual void | detach () |
Detaches this tool from its canvas. More... | |
Protected Attributes inherited from casa::PlotTool | |
PlotCanvas * | m_canvas |
Attached canvas (or NULL for none). More... | |
PlotFactory * | m_factory |
Factory for creating implementation-specific objects. More... | |
bool | m_active |
Whether this tool is active. More... | |
bool | m_blocking |
Whether this tool is blocking. More... | |
PlotAxis | m_xAxis |
The tool axes. More... | |
PlotAxis | m_yAxis |
PlotCoordinate::System | m_coordSystem |
The tool coordinate system. More... | |
bool | m_lastEventHandled |
Last event handled flag. More... | |
A PlotMouseTool is a specialization of PlotTool that handles all mouse events.
It is abstract, and combines all mouse event handling methods into one for convenience.
Definition at line 165 of file PlotTool.h.
|
inline |
Constructor which takes the tool's coordinate system.
Definition at line 175 of file PlotTool.h.
|
inline |
Constructor which takes the tool's axes and coordinate system.
Definition at line 179 of file PlotTool.h.
|
inlinevirtual |
Destructor.
Definition at line 184 of file PlotTool.h.
|
inlinevirtual |
Handle the given event.
Implements casa::PlotClickEventHandler.
Definition at line 191 of file PlotTool.h.
References handleMouseEvent().
|
inlinevirtual |
Handle the given event.
Implements casa::PlotMouseDragEventHandler.
Definition at line 197 of file PlotTool.h.
References handleMouseEvent().
|
pure virtual |
ABSTRACT METHODS //.
Handles the given mouse event. Guaranteed to be one of the mouse events (select, click, press, release, drag, move, wheel). The implementing class should also update the last event handled flag as necessary.
Implemented in casa::PlotSelectTool, and casa::PlotMSAnnotator.
Referenced by handleClick(), handleMouseDrag(), handleMouseMove(), handleMousePress(), handleMouseRelease(), handleSelect(), and handleWheel().
|
inlinevirtual |
Handle the given event.
Implements casa::PlotMouseMoveEventHandler.
Definition at line 199 of file PlotTool.h.
References handleMouseEvent().
|
inlinevirtual |
Handle the given event.
Implements casa::PlotMousePressEventHandler.
Definition at line 193 of file PlotTool.h.
References handleMouseEvent().
|
inlinevirtual |
Handle the given event.
Implements casa::PlotMouseReleaseEventHandler.
Definition at line 195 of file PlotTool.h.
References handleMouseEvent().
|
inlinevirtual |
Event handling methods.
Implements casa::PlotSelectEventHandler.
Definition at line 189 of file PlotTool.h.
References handleMouseEvent().
|
inlinevirtual |
Handle the given event.
Implements casa::PlotWheelEventHandler.
Definition at line 201 of file PlotTool.h.
References handleMouseEvent().