casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
casa::DrawingDisplayData Class Reference

DisplayData which provides interactive drawing capabilities. More...

#include <DrawingDisplayData.h>

Inheritance diagram for casa::DrawingDisplayData:
casa::PassiveCachingDD casa::CachingDisplayData casa::DisplayData casa::DisplayOptions casa::DisplayEH casa::DlTarget

List of all members.

Public Member Functions

 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.
virtual Record getOptions ()
 Retrieve the current and default options and parameter types.
virtual Display::DisplayDataType classType ()
 Return the type of this DisplayData.
virtual CachingDisplayMethodnewDisplayMethod (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.
virtual AttributeBuffer optionsAsAttributes ()
 Return the current options of this DisplayData as an AttributeBuffer.
virtual void refreshEH (const WCRefreshEvent &ev)
 Negotiatiate WorldCanvas linear coordinate system when asked to do so by the WorldCanvasHolder.
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)
 Set/get which key to catch.
virtual Display::KeySym key () const
virtual Display::KeyModifier keyModifier () const
virtual Double doubleClickInterval () const
 Double click interval.
virtual void doubleClick (const Int objectID)
 Called when a double click occurred for the identified object.

Protected Member Functions

 DrawingDisplayData (const DrawingDisplayData &other)
 (Required) copy constructor.
void operator= (const DrawingDisplayData &other)
 (Required) copy assignment.

Private Member Functions

void installDefaultOptions ()
 Install the default options for this DisplayData.

Private Attributes

Display::KeySym itsKeySym
 The key to handle.
Display::KeyModifier itsKeyModifier
 The modifier mask for the key.
Double itsDoubleClickInterval
 Double click interval (seconds)
List< void * > itsDDDOList
 List containing the DDDObjects for this DrawingDisplayData.
ListIter< void * > * itsDDDOListIter
 Iterator for itsDDDOList.
DDDObjectitsObjectWhichIsShowingHandles
 Obvious!
String itsOptionsLabelPosition
 Option: position for labels.

Friends

class DrawingDisplayMethod

Detailed Description

DisplayData which provides interactive drawing capabilities.

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.

Definition at line 55 of file DrawingDisplayData.h.


Constructor & Destructor Documentation

Constructor.

Destructor.

(Required) copy constructor.


Member Function Documentation

virtual void casa::DrawingDisplayData::addObject ( const Record description) [virtual]

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

Return the type of this DisplayData.

Implements casa::DisplayData.

Definition at line 79 of file DrawingDisplayData.h.

References casa::Display::CanvasAnnotation.

virtual Record casa::DrawingDisplayData::description ( const Int  objectID) [virtual]

Get the description of the object with the given id.

virtual void casa::DrawingDisplayData::doubleClick ( const Int  objectID) [virtual]

Called when a double click occurred for the identified object.

Null implementation in this class, derived classes can over-ride.

virtual Double casa::DrawingDisplayData::doubleClickInterval ( ) const [inline, virtual]

Double click interval.

Definition at line 127 of file DrawingDisplayData.h.

References itsDoubleClickInterval.

Retrieve the current and default options and parameter types.

Reimplemented from casa::PassiveCachingDD.

Install the default options for this DisplayData.

Reimplemented from casa::CachingDisplayData.

virtual Display::KeySym casa::DrawingDisplayData::key ( ) const [inline, virtual]

Definition at line 120 of file DrawingDisplayData.h.

References itsKeySym.

virtual Display::KeyModifier casa::DrawingDisplayData::keyModifier ( ) const [inline, virtual]

Definition at line 122 of file DrawingDisplayData.h.

References itsKeyModifier.

virtual String casa::DrawingDisplayData::labelPosition ( ) [inline, virtual]

Return the current setting of the labelposition option.

Definition at line 114 of file DrawingDisplayData.h.

References itsOptionsLabelPosition.

virtual CachingDisplayMethod* casa::DrawingDisplayData::newDisplayMethod ( WorldCanvas worldCanvas,
AttributeBuffer wchAttributes,
AttributeBuffer ddAttributes,
CachingDisplayData dd 
) [virtual]

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.

Implements casa::CachingDisplayData.

void casa::DrawingDisplayData::operator= ( const DrawingDisplayData other) [protected]

(Required) copy assignment.

Return the current options of this DisplayData as an AttributeBuffer.

Reimplemented from casa::PassiveCachingDD.

virtual void casa::DrawingDisplayData::refreshEH ( const WCRefreshEvent ev) [virtual]

Negotiatiate WorldCanvas linear coordinate system when asked to do so by the WorldCanvasHolder.

In this implementation, simply return False to indicate that this DisplayData will not negotiate coordinates: it is a passive DisplayData.

Reimplemented from casa::PassiveCachingDD.

virtual void casa::DrawingDisplayData::removeObject ( const Int  objectID) [virtual]

Remove the object with the given id.

virtual void casa::DrawingDisplayData::setDefaultOptions ( ) [virtual]

Install the default options for this DisplayData.

Reimplemented from casa::PassiveCachingDD.

virtual void casa::DrawingDisplayData::setDescription ( const Int  objectID,
const Record rec 
) [virtual]

Set the description of the object with the given id.

virtual void casa::DrawingDisplayData::setHandleState ( DDDObject item,
const Bool  state 
) [virtual]

Set the handle state of the particular item.

virtual void casa::DrawingDisplayData::setKey ( const Display::KeySym keysym) [virtual]

Set/get which key to catch.

virtual Bool casa::DrawingDisplayData::setOptions ( Record rec,
Record recOut 
) [virtual]

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.

Reimplemented from casa::PassiveCachingDD.


Friends And Related Function Documentation

friend class DrawingDisplayMethod [friend]

Definition at line 144 of file DrawingDisplayData.h.


Member Data Documentation

List containing the DDDObjects for this DrawingDisplayData.

Definition at line 156 of file DrawingDisplayData.h.

Iterator for itsDDDOList.

Definition at line 159 of file DrawingDisplayData.h.

Double click interval (seconds)

Definition at line 153 of file DrawingDisplayData.h.

Referenced by doubleClickInterval().

The modifier mask for the key.

Definition at line 150 of file DrawingDisplayData.h.

Referenced by keyModifier().

The key to handle.

Definition at line 147 of file DrawingDisplayData.h.

Referenced by key().

Obvious!

Definition at line 162 of file DrawingDisplayData.h.

Option: position for labels.

Definition at line 168 of file DrawingDisplayData.h.

Referenced by labelPosition().


The documentation for this class was generated from the following file: