DDDRectangle.h

Classes

DDDRectangle -- Implementation of a rectangular object for DrawingDisplayData class. (full description)

class DDDRectangle : public DDDObject

Interface

Public Members
DDDRectangle(const Record &description, DrawingDisplayData *owner)
virtual ~DDDRectangle()
virtual void draw(const Display::RefreshReason &reason, WorldCanvas *worldcanvas)
virtual Record description()
virtual void setDescription(const Record &rec)
virtual void operator()(const WCRefreshEvent &ev)
virtual void operator()(const WCPositionEvent &ev)
virtual void operator()(const WCMotionEvent &ev)
Protected Members
DDDRectangle()
DDDRectangle(const DDDRectangle &other)
void operator=(const DDDRectangle &other)

Description

Synopsis

This class implements the interface defined by DDDObject, to provide a rectangle object for registration with DrawingDisplayData objects.

Member Description

DDDRectangle(const Record &description, DrawingDisplayData *owner)

Constructor taking a Record description. Fields in the record, on top of what is consumed by the DDDObject constructor, are: blc and trc.

virtual ~DDDRectangle()

Destructor.

virtual void draw(const Display::RefreshReason &reason, WorldCanvas *worldcanvas)

Draw this rectangle object for the given reason on the provided WorldCanvas.

virtual Record description()

Return a record describing this object.

virtual void setDescription(const Record &rec)

Update this object based on the information in the provided Record.

virtual void operator()(const WCRefreshEvent &ev)
virtual void operator()(const WCPositionEvent &ev)
virtual void operator()(const WCMotionEvent &ev)

Event handlers. The parent DrawingDisplayData will distribute events as necessary to the various DDDObjects which comprise it.

DDDRectangle()

(Required) default constructor.

DDDRectangle(const DDDRectangle &other)

(Required) copy constructor.

void operator=(const DDDRectangle &other)

(Required) copy assignment.