casa
$Rev:20696$
|
WorldCanvasEvent:contains info on the WC point selected by MWCCrosshairTool. More...
#include <CrosshairEvent.h>
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. |
WorldCanvasEvent:contains info on the WC point selected by MWCCrosshairTool.
Public interface
"CrosshairEvent" holds information about a point selected by the user with the MWCCrosshairTool.
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.
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.
.
Definition at line 81 of file CrosshairEvent.h.
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.
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.
String casa::CrosshairEvent::itsEvType [private] |
"down", "move", or "up", according to mouse state.
Definition at line 107 of file CrosshairEvent.h.
Referenced by evtype().
Int casa::CrosshairEvent::itsPixX [private] |
Int casa::CrosshairEvent::itsPixY [private] |
Definition at line 105 of file CrosshairEvent.h.
Referenced by pixY().