PCPositionEH.h
Classes
- PCPositionEH -- PixelCanvas Event Handler for managing keyboard and mouse button events (full description)
Interface
- Public Members
- PCPositionEH()
- virtual void operator ()(const PCPositionEvent & eh)
- virtual ~PCPositionEH()
Prerequisite
Etymology
PCPositionEH : PixelCanvas Position Event Handler
Synopsis
Designed for derivation, this class is the base class which
is communicated to when an X button or keyboard event is sent
to the PixelCanvas. The application programmer should derive
from this class, add any data fields needed, and override
operator () to respond properly to keyboard and mouse button
events.
Motivation
Wanted a standard method for event management. It was felt
that a class might be more flexible than callback methods
because a class can contain data and other functions as
well.
Example
see the WorldCanvas code
see the Display test directory
Member Description
Default Constructor Required
Default just prints the event to cout
Destructor