WCMotionEvent.h

Classes

WCMotionEvent -- Class which stores WorldCanvas motion event information. (full description)

class WCMotionEvent : public WorldCanvasEvent

Interface

Public Members
WCMotionEvent(WorldCanvas *wc, const uInt &modifiers, const Int &pixX, const Int &pixY, const Double &linX, const Double &linY, const Vector<Double> &world)
virtual ~WCMotionEvent()
virtual Int pixX() const
virtual Int pixY() const
virtual Double linX() const
virtual Double linY() const
virtual const Vector<Double> &world() const
virtual uInt modifiers() const
Protected Members
WCMotionEvent()
WCMotionEvent(const WCMotionEvent &other)
WCMotionEvent &operator=(const WCMotionEvent &other)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"WCMotionEvent" is a contraction and concatentation of "WorldCanvas", "Motion" and "Event", and describes motion events occuring on WorldCanvases.

Synopsis

This class adds to the information stored in the WorldCanvasEvent class. It adds informatino describing the current position of the mouse or pointing device, and the state of the keyboard modifiers (including the mouse buttons).

Example

Motivation

A compact way of passing motion event information around the WorldCanvas-oriented display classes was needed, with a functional but tight and efficient interface.

Thrown Exceptions

To Do

Member Description

WCMotionEvent(WorldCanvas *wc, const uInt &modifiers, const Int &pixX, const Int &pixY, const Double &linX, const Double &linY, const Vector<Double> &world)

Constructor taking a pointer to the WorldCanvas for which the event is valid, the state of the keyboard and pointer modifiers, and the pixel, linear and world coordinates of the event.

virtual ~WCMotionEvent()

Destructor.

virtual Int pixX() const
virtual Int pixY() const

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

virtual Double linX() const
virtual Double linY() const

The x and y linear coordinates of the event.

virtual const Vector<Double> &world() const

The world coordinates describing where the event occurred.

virtual uInt modifiers() const

Return the state of the "modifiers": this is made up of mask bits referring to various keys on the keyboard (eg. Control, Shift, etc.) and the mouse buttons.

WCMotionEvent()

(Required) default constructor.

WCMotionEvent(const WCMotionEvent &other)

(Required) copy constructor.

WCMotionEvent &operator=(const WCMotionEvent &other)

(Required) copy assignment.