casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Private Attributes
casa::PCMotionEvent Class Reference

Class which stores PixelCanvas motion event information. More...

#include <PCMotionEvent.h>

Inheritance diagram for casa::PCMotionEvent:
casa::PixelCanvasEvent casa::DisplayEvent casa::PCPositionEvent

List of all members.

Public Member Functions

 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
 The x and y pixel position of the pointer when the event occured.
virtual Int y () const
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.

Protected Member Functions

 PCMotionEvent ()
 (Required) default constructor.
 PCMotionEvent (const PCMotionEvent &other)
 (Required) copy constructor.
PCMotionEventoperator= (const PCMotionEvent &other)
 (Required) copy assignment.

Private Attributes

Int itsX
 Store the position of the event here.
Int itsY
uInt itsModifiers
 Store the button and keyboard modifier masks here.

Detailed Description

Class which stores PixelCanvas motion event information.

Intended use:

Public interface

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

.

Definition at line 82 of file PCMotionEvent.h.


Constructor & Destructor Documentation

casa::PCMotionEvent::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 casa::PCMotionEvent::~PCMotionEvent ( ) [virtual]

Destructor.

(Required) default constructor.

casa::PCMotionEvent::PCMotionEvent ( const PCMotionEvent other) [protected]

(Required) copy constructor.


Member Function Documentation

virtual uInt casa::PCMotionEvent::modifiers ( ) const [inline, virtual]

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.

Definition at line 106 of file PCMotionEvent.h.

References itsModifiers.

PCMotionEvent& casa::PCMotionEvent::operator= ( const PCMotionEvent other) [protected]

(Required) copy assignment.

virtual Int casa::PCMotionEvent::x ( ) const [inline, virtual]

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

Definition at line 97 of file PCMotionEvent.h.

References itsX.

virtual Int casa::PCMotionEvent::y ( ) const [inline, virtual]

Definition at line 99 of file PCMotionEvent.h.

References itsY.


Member Data Documentation

Store the button and keyboard modifier masks here.

Definition at line 126 of file PCMotionEvent.h.

Referenced by modifiers().

Store the position of the event here.

Definition at line 123 of file PCMotionEvent.h.

Referenced by x().

Definition at line 123 of file PCMotionEvent.h.

Referenced by y().


The documentation for this class was generated from the following file: