WCRTRegion.h

Classes

WCRTRegion -- WorldCanvas event-based rectangle region drawer (full description)

class WCRTRegion : public WCRectTool

Interface

Public Members
WCRTRegion(WorldCanvas *wcanvas, Display::KeySym keysym = Display::K_Pointer_Button1)
virtual ~WCRTRegion()
virtual void doubleInside()
virtual void regionReady()
Private Members
void getLinearCoords(Vector<Double> &blc, Vector<Double> &trc)

Description

  • WCRectTool

    Etymology

    WCRTRegion stands for WorldCanvas Rectangle Tool Region

    Synopsis

    This class finalises the functionality in WCRectTool 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

    WCRTRegion(WorldCanvas *wcanvas, Display::KeySym keysym = Display::K_Pointer_Button1)

    Constructor

    virtual ~WCRTRegion()

    Destructor

    virtual void doubleInside()

    Functions specific to the region drawing - these are called by lower-level event handlers in the base classes

    virtual void 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

    void getLinearCoords(Vector<Double> &blc, Vector<Double> &trc)

    get the linear coords of the current rectangular region