PCMotionEvent.h

Classes

PCMotionEvent -- Class which stores PixelCanvas motion event information. (full description)

class PCMotionEvent : public PixelCanvasEvent

Interface

Public Members
PCMotionEvent(PixelCanvas *pc, const Int &x, const Int &y, const uInt &modifiers)
virtual ~PCMotionEvent()
virtual Int x() const
virtual Int y() const
virtual uInt modifiers() const
Protected Members
PCMotionEvent()
PCMotionEvent(const PCMotionEvent &other)
PCMotionEvent &operator=(const PCMotionEvent &other)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"PCMotionEvent" is a contraction and concatenation of "PixelCanvas", "Motion" and "Event", and describes motion events occuring on PixelCanvases.

Prerequisite

Synopsis

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

Thrown Exceptions

To Do

Member Description

PCMotionEvent(PixelCanvas *pc, const Int &x, const Int &y, const uInt &modifiers)

Constructor taking a pointer to the PixelCanvas for which the event is valid, the position of the event, and the keyboard and pointer modifiers.

virtual ~PCMotionEvent()

Destructor.

virtual Int x() const
virtual Int y() const

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

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.

PCMotionEvent()

(Required) default constructor.

PCMotionEvent(const PCMotionEvent &other)

(Required) copy constructor.

PCMotionEvent &operator=(const PCMotionEvent &other)

(Required) copy assignment.