WCPTRegion.h

Classes

WCPTRegion -- WorldCanvas event-based polygon region drawer (full description)

class WCPTRegion : public WCPolyTool

Interface

Public Members
WCPTRegion(WorldCanvas *wcanvas, Display::KeySym keysym = Display::K_Pointer_Button1)
virtual ~WCPTRegion()
virtual void doubleInside()
virtual void regionReady()

Description

  • WCRectTool

    Etymology

    WCPTRegion stands for WorldCanvas Polygon Tool Region

    Synopsis

    This class finalises the functionality in WCRectTool to implement event-based drawing of polygonal regions on a WorldCanvas. Double clicking inside the constructed polygon emits the region, whilst pressing Escape cancels the region.

    Example

    Motivation

    Polygonal regions are the most common regions, and constructing them visually can be very efficient.

    To Do

    Member Description

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

    Constructor

    virtual ~WCPTRegion()

    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 functio 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