MWCPTRegion.h

Classes

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

class MWCPTRegion : public MWCPolyTool

Interface

Public Members
MWCPTRegion(Display::KeySym keysym = Display::K_Pointer_Button3)
virtual ~MWCPTRegion()
Protected Members
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

    MWCPTRegion(Display::KeySym keysym = Display::K_Pointer_Button3)

    Constructor

    virtual ~MWCPTRegion()

    Destructor

    virtual void doubleInside()

    Handle double-click inside the polygon. Invokes regionReady().

    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.