WCPositionEvent.h

Classes

WCPositionEvent -- Class which stores WorldCanvas position event information. (full description)

class WCPositionEvent : public WCMotionEvent

Interface

Public Members
WCPositionEvent(WorldCanvas * wc, const Display::KeySym &key, const Bool &keyState, const uInt &modifiers, const Int &pixX, const Int &pixY, const Double &linX, const Double &linY, const Vector<Double> &world)
virtual ~WCPositionEvent()
virtual Display::KeySym key() const
virtual Bool keystate() const
Protected Members
WCPositionEvent()
WCPositionEvent(const WCPositionEvent &other)
WCPositionEvent &operator=(const WCPositionEvent &other)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"WCPositionEvent" is a contraction and concatenation of "WorldCanvas", "Position" and "Event", and describes position events occuring on WorldCanvases.

Prerequisite

Synopsis

This class adds to the information stored in the WCMotionEvent class. It adds information describing key that has been pressed or released, and the state of that key.

Example

Motivation

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

Thrown Exceptions

To Do

Member Description

WCPositionEvent(WorldCanvas * wc, const Display::KeySym &key, const Bool &keyState, 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 key which is pressed and its state (ie. pressed or released), the state of the keyboard and pointer modifiers, and the pixel, linear and world coordinates of the event.

virtual ~WCPositionEvent()

Destructor.

virtual Display::KeySym key() const

Which key was pressed or released?

virtual Bool keystate() const

What state is the key in: True for pressed, False for released.

WCPositionEvent()

(Required) default constructor.

WCPositionEvent(const WCPositionEvent &other)

(Required) copy constructor.

WCPositionEvent &operator=(const WCPositionEvent &other)

(Required) copy assignment.