casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
casa::PlotSelectTool Class Reference

A PlotSelectTool is a concrete subclass of PlotMouseTool that mainly handles select events. More...

#include <PlotTool.h>

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

List of all members.

Public Member Functions

 PlotSelectTool (PlotCoordinate::System system=PlotCoordinate::WORLD)
 Constructor which takes the tool's coordinate system.
 PlotSelectTool (PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System system=PlotCoordinate::WORLD)
 Constructor which takes the tool's axes and coordinate system.
virtual ~PlotSelectTool ()
 Destructor.
virtual void addNotifier (PlotSelectToolNotifier *notifier)
 Adds the given notifier.
virtual void setSelectLine (PlotLinePtr line)
 Sets the selection line to the given.
virtual void setSubtractLine (PlotLinePtr line)
virtual void setSelectLine (bool on=true)
virtual void setDrawRects (bool on=true)
 Sets the attributes for drawing selected regions.
virtual void setRectLine (PlotLinePtr line)
virtual void setRectFill (PlotAreaFillPtr fill)
virtual unsigned int numSelectedRects () const
 Selected regions.
virtual void getSelectedRects (vector< double > &upperLeftXs, vector< double > &upperLeftYs, vector< double > &lowerRightXs, vector< double > &lowerRightYs, PlotCoordinate::System system=PlotCoordinate::WORLD) const
virtual vector< PlotRegiongetSelectedRects (PlotCoordinate::System system=PlotCoordinate::WORLD) const
virtual void clearSelectedRects ()
virtual void setActive (bool active=true)
 Overrides PlotTool::setActive().
virtual void handleMouseEvent (const PlotEvent &event)
 Implements PlotMouseTool::handleMouseEvent().
bool inSubtractionMode ()

Public Attributes

bool m_subtraction_mode

Protected Member Functions

virtual void attach (PlotCanvas *canvas)
 Overrides PlotTool::attach().
virtual void detach ()
 Overrides PlotTool::detach().

Protected Attributes

vector< PlotSelectToolNotifier * > m_notifiers
 Notifiers.
PlotLinePtr m_selLine
 Copy of selection line to set on the canvas, or NULL if none has been set.
PlotLinePtr m_subLine
bool m_drawRects
 Whether or not to draw selected regions on the canvas.
PlotLinePtr m_rectLine
 Line for drawing selected regions, or NULL if none has been set.
PlotAreaFillPtr m_rectFill
 Area fill for drawing selected regions, or NULL if none has been set.
vector< PlotShapeRectanglePtr > m_rects
 Selected regions.

Detailed Description

A PlotSelectTool is a concrete subclass of PlotMouseTool that mainly handles select events.

Note that plotting implementations may wish to override this class with an implementation-specific version that may be more efficient. PlotSelectTool is responsible for: 1) managing the select line (the line show while the user is click-dragging to select a region on the canvas) and cursors, 2) keeping track of selected regions, 3) showing/hiding the regions on the canvas, and 4) notifying any interested classes whenever the selected regions changes.

Definition at line 254 of file PlotTool.h.


Constructor & Destructor Documentation

casa::PlotSelectTool::PlotSelectTool ( PlotCoordinate::System  system = PlotCoordinate::WORLD)

Constructor which takes the tool's coordinate system.

casa::PlotSelectTool::PlotSelectTool ( PlotAxis  xAxis,
PlotAxis  yAxis,
PlotCoordinate::System  system = PlotCoordinate::WORLD 
)

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

Destructor.


Member Function Documentation

virtual void casa::PlotSelectTool::addNotifier ( PlotSelectToolNotifier *  notifier) [virtual]

Adds the given notifier.

This object will be notified when the list of selected regions changes (either by adding one from the mouse, or clearing them).

virtual void casa::PlotSelectTool::attach ( PlotCanvas canvas) [protected, virtual]

Overrides PlotTool::attach().

Reimplemented from casa::PlotTool.

virtual void casa::PlotSelectTool::clearSelectedRects ( ) [virtual]
virtual void casa::PlotSelectTool::detach ( ) [protected, virtual]

Overrides PlotTool::detach().

Reimplemented from casa::PlotTool.

virtual void casa::PlotSelectTool::getSelectedRects ( vector< double > &  upperLeftXs,
vector< double > &  upperLeftYs,
vector< double > &  lowerRightXs,
vector< double > &  lowerRightYs,
PlotCoordinate::System  system = PlotCoordinate::WORLD 
) const [virtual]
virtual vector<PlotRegion> casa::PlotSelectTool::getSelectedRects ( PlotCoordinate::System  system = PlotCoordinate::WORLD) const [virtual]
virtual void casa::PlotSelectTool::handleMouseEvent ( const PlotEvent event) [virtual]

Definition at line 305 of file PlotTool.h.

References m_subtraction_mode.

virtual unsigned int casa::PlotSelectTool::numSelectedRects ( ) const [virtual]

Selected regions.

virtual void casa::PlotSelectTool::setActive ( bool  active = true) [virtual]

Overrides PlotTool::setActive().

Reimplemented from casa::PlotTool.

virtual void casa::PlotSelectTool::setDrawRects ( bool  on = true) [virtual]

Sets the attributes for drawing selected regions.

virtual void casa::PlotSelectTool::setRectFill ( PlotAreaFillPtr  fill) [virtual]
virtual void casa::PlotSelectTool::setRectLine ( PlotLinePtr  line) [virtual]
virtual void casa::PlotSelectTool::setSelectLine ( PlotLinePtr  line) [virtual]

Sets the selection line to the given.

virtual void casa::PlotSelectTool::setSelectLine ( bool  on = true) [virtual]
virtual void casa::PlotSelectTool::setSubtractLine ( PlotLinePtr  line) [virtual]

Member Data Documentation

Whether or not to draw selected regions on the canvas.

Definition at line 322 of file PlotTool.h.

vector<PlotSelectToolNotifier*> casa::PlotSelectTool::m_notifiers [protected]

Notifiers.

Definition at line 314 of file PlotTool.h.

Area fill for drawing selected regions, or NULL if none has been set.

Definition at line 328 of file PlotTool.h.

Line for drawing selected regions, or NULL if none has been set.

Definition at line 325 of file PlotTool.h.

vector<PlotShapeRectanglePtr> casa::PlotSelectTool::m_rects [protected]

Selected regions.

Definition at line 331 of file PlotTool.h.

Copy of selection line to set on the canvas, or NULL if none has been set.

Definition at line 318 of file PlotTool.h.

Definition at line 319 of file PlotTool.h.

Definition at line 309 of file PlotTool.h.

Referenced by inSubtractionMode().


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