DTVisible.h

Classes

DTVisible -- Class providing draw style settings for visible DisplayTools. (full description)

class DTVisible

Interface

Public Members
DTVisible()
virtual ~DTVisible()
virtual String drawColor() const
virtual Int lineWidth() const
virtual Double doubleClickInterval() const
Protected Members
DTVisible(const DTVisible &other)
DTVisible &operator=(const DTVisible &other)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"DTVisible" is a contraction and concatenation of "DisplayTool" and "Visible", and provides additional interface features describing drawing options for visible DisplayTools.

Synopsis

The purpose of this class is to store and provide information describing drawing settings for DisplayTools which will need to draw on a PixelCanvas or WorldCanvas. Presently it only stores the drawing color and line width, and double click interval, but it will probably grow into something more sophisticated. The settings are taken from the users .aipsrc file as follows:

display.controls.color
Either a named color (eg. red) can be given, or the individual red, green and blue components specified in hexadecimal (eg. #f0f033). The default color is orange.

display.controls.linewidth
An integer should be given specifying the line width to use when drawing DisplayTools. The default value is one.

display.controls.doubleclickinterval
A real number specifying the time interval in seconds, in which a double click will be deemed to have occurred. The default value is 0.5 seconds.

Example

Motivation

Since many PixelCanvas- and WorldCanvas-based tools (derived from PCTool and WCTool respectively) will need to draw on the canvas, it makes sense to unify their selection of drawing color and style in one place: this class.

Thrown Exceptions

    None.

To Do

    None.

Member Description

DTVisible()

Default constructor.

virtual ~DTVisible()

Destructor.

virtual String drawColor() const

Return the color to use.

virtual Int lineWidth() const

Return the line width to use.

virtual Double doubleClickInterval() const

Return the double click interval (in seconds).

DTVisible(const DTVisible &other)

(Required) copy constructor.

DTVisible &operator=(const DTVisible &other)

(Required) copy assignment.