DrawingDisplayData.h

Classes

DrawingDisplayData -- DisplayData which provides interactive drawing capabilities. (full description)

class DrawingDisplayData : public PassiveCachingDD

Interface

Public Members
DrawingDisplayData(const Display::KeySym keysym = Display::K_Pointer_Button1)
virtual ~DrawingDisplayData()
virtual void setDefaultOptions()
virtual Bool setOptions(Record &rec, Record &recOut)
virtual Record getOptions()
virtual Display::DisplayDataType classType()
virtual CachingDisplayMethod *newDisplayMethod(WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd)
virtual AttributeBuffer optionsAsAttributes()
virtual void refreshEH(const WCRefreshEvent &ev)
virtual void addObject(const Record &description)
virtual Record description(const Int objectID)
virtual void setDescription(const Int objectID, const Record &rec)
virtual void removeObject(const Int objectID)
virtual void setHandleState(DDDObject *item, const Bool state)
virtual String labelPosition()
virtual void setKey(const Display::KeySym &keysym)
virtual Display::KeySym key() const
virtual Display::KeyModifier keyModifier() const
virtual Double doubleClickInterval() const
virtual void doubleClick(const Int objectID)
Protected Members
DrawingDisplayData(const DrawingDisplayData &other)
void operator=(const DrawingDisplayData &other)
Private Members
void installDefaultOptions()

Description

Synopsis

This class provides an implementation of a PassiveCachingDD which provides the ability for the programmer to add various objects to the display (eg. rectangles), and then modify them, or allow the user to interactively modify the objects.

Member Description

DrawingDisplayData(const Display::KeySym keysym = Display::K_Pointer_Button1)

Constructor.

virtual ~DrawingDisplayData()

Destructor.

virtual void setDefaultOptions()

Install the default options for this DisplayData.

virtual Bool setOptions(Record &rec, Record &recOut)

Apply options stored in rec to the DisplayData. A return value of True means a refresh is needed. recOut contains any fields which were implicitly changed as a result of the call to this function.

virtual Record getOptions()

Retrieve the current and default options and parameter types.

virtual Display::DisplayDataType classType()

Return the type of this DisplayData.

virtual CachingDisplayMethod *newDisplayMethod(WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd)

Create a new AxesDisplayMethod for drawing on the given WorldCanvas when the AttributeBuffers are suitably matched to the current state of this DisplayData and of the WorldCanvas/Holder. The tag is a unique number used to identify the age of the newly constructed CachingDisplayMethod.

virtual AttributeBuffer optionsAsAttributes()

Return the current options of this DisplayData as an AttributeBuffer.

virtual void refreshEH(const WCRefreshEvent &ev)

virtual void addObject(const Record &description)

Add an object to the drawing as described in the given Record.

virtual Record description(const Int objectID)

Get the description of the object with the given id.

virtual void setDescription(const Int objectID, const Record &rec)

Set the description of the object with the given id.

virtual void removeObject(const Int objectID)

Remove the object with the given id.

virtual void setHandleState(DDDObject *item, const Bool state)

Set the handle state of the particular item.

virtual String labelPosition()

Return the current setting of the labelposition option.

virtual void setKey(const Display::KeySym &keysym)
virtual Display::KeySym key() const
virtual Display::KeyModifier keyModifier() const

Set/get which key to catch.

virtual Double doubleClickInterval() const

Double click interval.

virtual void doubleClick(const Int objectID)

Called when a double click occurred for the identified object. Null implementation in this class, derived classes can over-ride.

DrawingDisplayData(const DrawingDisplayData &other)

(Required) copy constructor.

void operator=(const DrawingDisplayData &other)

(Required) copy assignment.

void installDefaultOptions()

Install the default options for this DisplayData.