casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casa::PlotMouseTool Class Referenceabstract

A PlotMouseTool is a specialization of PlotTool that handles all mouse events. More...

#include <PlotTool.h>

Inheritance diagram for casa::PlotMouseTool:
casa::PlotWheelEventHandler casa::PlotMouseMoveEventHandler casa::PlotMouseDragEventHandler casa::PlotMouseReleaseEventHandler casa::PlotMousePressEventHandler casa::PlotClickEventHandler casa::PlotSelectEventHandler casa::PlotTool casa::PlotMSAnnotator casa::PlotSelectTool

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 PlotCanvascanvas () const
 Returns the canvas this tool is attached to, or NULL for none. More...
 
virtual PlotFactoryfactory () 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
PlotCanvasm_canvas
 Attached canvas (or NULL for none). More...
 
PlotFactorym_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

casa::PlotMouseTool::PlotMouseTool ( PlotCoordinate::System  coordSys = PlotCoordinate::WORLD)
inline

Constructor which takes the tool's coordinate system.

Definition at line 175 of file PlotTool.h.

casa::PlotMouseTool::PlotMouseTool ( PlotAxis  xAxis,
PlotAxis  yAxis,
PlotCoordinate::System  coordSys = PlotCoordinate::WORLD 
)
inline

Constructor which takes the tool's axes and coordinate system.

Definition at line 179 of file PlotTool.h.

virtual casa::PlotMouseTool::~PlotMouseTool ( )
inlinevirtual

Destructor.

Definition at line 184 of file PlotTool.h.

Member Function Documentation

virtual void casa::PlotMouseTool::handleClick ( const PlotClickEvent event)
inlinevirtual

Handle the given event.

Implements casa::PlotClickEventHandler.

Definition at line 191 of file PlotTool.h.

References handleMouseEvent().

virtual void casa::PlotMouseTool::handleMouseDrag ( const PlotMouseDragEvent event)
inlinevirtual

Handle the given event.

Implements casa::PlotMouseDragEventHandler.

Definition at line 197 of file PlotTool.h.

References handleMouseEvent().

virtual void casa::PlotMouseTool::handleMouseEvent ( const PlotEvent event)
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().

virtual void casa::PlotMouseTool::handleMouseMove ( const PlotMouseMoveEvent event)
inlinevirtual

Handle the given event.

Implements casa::PlotMouseMoveEventHandler.

Definition at line 199 of file PlotTool.h.

References handleMouseEvent().

virtual void casa::PlotMouseTool::handleMousePress ( const PlotMousePressEvent event)
inlinevirtual

Handle the given event.

Implements casa::PlotMousePressEventHandler.

Definition at line 193 of file PlotTool.h.

References handleMouseEvent().

virtual void casa::PlotMouseTool::handleMouseRelease ( const PlotMouseReleaseEvent event)
inlinevirtual

Handle the given event.

Implements casa::PlotMouseReleaseEventHandler.

Definition at line 195 of file PlotTool.h.

References handleMouseEvent().

virtual void casa::PlotMouseTool::handleSelect ( const PlotSelectEvent event)
inlinevirtual

Event handling methods.

Implements casa::PlotSelectEventHandler.

Definition at line 189 of file PlotTool.h.

References handleMouseEvent().

virtual void casa::PlotMouseTool::handleWheel ( const PlotWheelEvent event)
inlinevirtual

Handle the given event.

Implements casa::PlotWheelEventHandler.

Definition at line 201 of file PlotTool.h.

References handleMouseEvent().


The documentation for this class was generated from the following file: