MWCRTRegion.h
Classes
- MWCRTRegion -- WorldCanvas event-based rectangle region drawer (full description)
Interface
- Public Members
- MWCRTRegion(Display::KeySym keysym = Display::K_Pointer_Button2)
- virtual ~MWCRTRegion()
- virtual void handleEvent(DisplayEvent& ev)
- Protected Members
- virtual void doubleInside()
- virtual void regionReady()
- Private Members
- void getLinearCoords(Vector<Double> &blc, Vector<Double> &trc)
MWCRectTool
Etymology
MWCRTRegion stands for MultiWorldCanvas Rectangle Tool Region
Synopsis
This class finalises the functionality in MWCRectTool to
implement event-based drawing of rectangular regions on a
WorldCanvas. Double clicking inside the constructed rectangle
emits the region, whilst pressing Escape cancels the region.
Example
Motivation
Rectangular regions are the most common regions, and constructing
them visually can be very efficient.
To Do
Member Description
Constructor
Destructor
handle events, via new-style interface. Currently just for reset event.
Handle double-click inside the rectangle. Invokes regionReady().
This function is called when a region is deliberately "finished"
by the user. It can be implemented to do further actions, such
as report the region to the application
get the linear coords of the current rectangular region