PCPositionEvent.h

Classes

PCPositionEvent -- Class which stores PixelCanvas position event information. (full description)

class PCPositionEvent : public PCMotionEvent

Interface

Public Members
PCPositionEvent(PixelCanvas *pc, const Display::KeySym &key, const Bool &keystate, const Int &x, const Int &y, const uInt &modifiers)
virtual ~PCPositionEvent()
virtual Display::KeySym key() const
virtual Bool keystate() const
Protected Members
PCPositionEvent()
PCPositionEvent(const PCPositionEvent &other)
PCPositionEvent &operator=(const PCPositionEvent &other)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"PCPositionEvent" is a contraction and concatenation of "PixelCanvas", "Position" and "Event", and describes position events occuring on PixelCanvases.

Prerequisite

Synopsis

This class adds to the information stored in the PCMotionEvent 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 PixelCanvas-oriented display classes was needed, with a functional but tight and efficient interface.

Thrown Exceptions

To Do

Member Description

PCPositionEvent(PixelCanvas *pc, const Display::KeySym &key, const Bool &keystate, const Int &x, const Int &y, const uInt &modifiers)

Constructor taking a pointer to the PixelCanvas for which the event is valid, the symbol of the key, the state of the key, the position of the pointer, and the input "modifiers". User Constructor

virtual ~PCPositionEvent()

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.

PCPositionEvent()

(Required) default constructor.

PCPositionEvent(const PCPositionEvent &other)

(Required) copy constructor.

PCPositionEvent &operator=(const PCPositionEvent &other)

(Required) copy assignment.