CrosshairEvent.h
Classes
- CrosshairEvent -- WorldCanvasEvent:contains info on the WC point selected by MWCCrosshairTool (full description)
Interface
- Public Members
- CrosshairEvent(WorldCanvas *wc, const Int pixX, const Int pixY, const String& evtype) : WorldCanvasEvent(wc), itsPixX(pixX), itsPixY(pixY), itsEvType(evtype)
- virtual Int pixX() const
- virtual Int pixY() const
- virtual String evtype() const
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
DisplayEHs
registered with the WorldCanvas.
Motivation
A mechanism was needed to notify library objects associated with a
WorldCanvas (in particular,
DisplayDatas)
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
To Do
Member Description
CrosshairEvent(WorldCanvas *wc, const Int pixX, const Int pixY, const String& evtype) : WorldCanvasEvent(wc), itsPixX(pixX), itsPixY(pixY), itsEvType(evtype)
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.
virtual Int pixX() const
virtual Int pixY() const
virtual String evtype() const
The x and y pixel position of the crosshair when the event occurred.