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

WorldCanvasEvent:contains info on the WC point selected by MWCCrosshairTool. More...

#include <CrosshairEvent.h>

Inheritance diagram for casa::CrosshairEvent:
casa::WorldCanvasEvent casa::DisplayEvent

List of all members.

Public Member Functions

 CrosshairEvent (WorldCanvas *wc, const Int pixX, const Int pixY, const String &evtype)
 Constructor taking a pointer to the WorldCanvas where the event occured, and the pixel coordinates of the event.
virtual Int pixX () const
 The x and y pixel position of the crosshair when the event occurred.
virtual Int pixY () const
virtual String evtype () const

Private Attributes

Int itsPixX
 
   

Int itsPixY
String itsEvType
 "down", "move", or "up", according to mouse state.

Detailed Description

WorldCanvasEvent:contains info on the WC point selected by MWCCrosshairTool.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"CrosshairEvent" holds information about a point selected by the user with the MWCCrosshairTool.

Synopsis

CrosshairEvent is created by MWCCrosshairTool when a point is selected by the crosshair on a WorldCanvas draw area. The event is passed (via WorldCanvas::handleEvent()) to the generic DisplayEH s registered with the WorldCanvas.

Motivation

A mechanism was needed to notify library objects associated with a WorldCanvas (in particular, DisplayData s) when a position was selected on the WC via MWCCrosshairTool. Formerly, this information was sent only to glish. This event is on a different level from the mouse/keyboard WorldCanvasEvents and serves a different purpose, so a new event type was created.

Thrown Exceptions

.

Definition at line 81 of file CrosshairEvent.h.


Constructor & Destructor Documentation

casa::CrosshairEvent::CrosshairEvent ( WorldCanvas wc,
const Int  pixX,
const Int  pixY,
const String evtype 
) [inline]

Constructor taking a pointer to the WorldCanvas where the event occured, and the pixel coordinates of the event.

evtype should be "down", "move", or "up", according to mouse state.

Definition at line 88 of file CrosshairEvent.h.


Member Function Documentation

virtual String casa::CrosshairEvent::evtype ( ) const [inline, virtual]

Definition at line 99 of file CrosshairEvent.h.

References itsEvType.

virtual Int casa::CrosshairEvent::pixX ( ) const [inline, virtual]

The x and y pixel position of the crosshair when the event occurred.

Definition at line 97 of file CrosshairEvent.h.

References itsPixX.

virtual Int casa::CrosshairEvent::pixY ( ) const [inline, virtual]

Definition at line 98 of file CrosshairEvent.h.

References itsPixY.


Member Data Documentation

"down", "move", or "up", according to mouse state.

Definition at line 107 of file CrosshairEvent.h.

Referenced by evtype().

   

pixel position of the event

Definition at line 105 of file CrosshairEvent.h.

Referenced by pixX().

Definition at line 105 of file CrosshairEvent.h.

Referenced by pixY().


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