casa
$Rev:20696$
|
Base class for handling WorldCanvas position events.
#include <WCPositionEH.h>
Public Member Functions | |
WCPositionEH () | |
Default Constructor Required. | |
virtual void | operator() (const WCPositionEvent &ev)=0 |
Default just prints the event to cout. | |
virtual | ~WCPositionEH () |
Destructor. |
Base class for handling WorldCanvas position events.
WCPositionEH : WorldCanvas Position Event-Handler
WCPositionEH is a base class. Its operator() function is called by mechanisms within the Display Library when a keyboard key or mouse button is pressed while within the area of the world canvas.
Users must derive from this class and override the op () function to catch key and button presses. Positions in world, linear, and pixel coordinates are returned.
This base class does have a concrete implementation, namely to report to stdout events it receives. To effect this behaviour, create an instance this class and register it as an event-handler on a WorldCanvas.
Provide the user with an object-oriented approach to event handling and include world-coordinate position information.
see the test programs in Display/test.
Definition at line 75 of file WCPositionEH.h.
Default Constructor Required.
virtual casa::WCPositionEH::~WCPositionEH | ( | ) | [virtual] |
Destructor.
virtual void casa::WCPositionEH::operator() | ( | const WCPositionEvent & | ev | ) | [pure virtual] |
Default just prints the event to cout.
Implemented in casa::Profile2dDD, casa::WorldCanvasHolder, casa::MultiWCTool, casa::DDDObject, casa::DDDEllipse, casa::DDDPolygon, casa::DDDRectangle, casa::SliceEH, casa::viewer::RegionToolManager, casa::AniPosEH, and casa::WCToolPosEH.