MWCRTRegion.h

Classes

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

class MWCRTRegion : public MWCRectTool

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)

Description

  • 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

    MWCRTRegion(Display::KeySym keysym = Display::K_Pointer_Button2)

    Constructor

    virtual ~MWCRTRegion()

    Destructor

    virtual void handleEvent(DisplayEvent& ev)

    handle events, via new-style interface. Currently just for reset event.

    virtual void doubleInside()

    Handle double-click inside the rectangle. 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

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

    get the linear coords of the current rectangular region