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

A class which creates and manages "panelled" displays. More...

#include <PanelDisplay.h>

Inheritance diagram for casa::PanelDisplay:
casa::MultiWCHolder casa::DisplayOptions

List of all members.

Public Types

enum  FillOrder { LEFT_TOP }

Public Member Functions

 PanelDisplay (PixelCanvas *pixelcanvas, const Int nx=3, const Int ny=2, const Float xOrigin=0.0, const Float yOrigin=0.0, const Float xSize=1.0, const Float ySize=1.0, const Float dx=0.0, const Float dy=0.0, const PanelDisplay::FillOrder order=LEFT_TOP)
 Constructor taking: a pointer to the PixelCanvas on which to lay the panels, the number of panels in the x and y directions, the extent of the PixelCanvas to cover with panels, and the fractional spacing between the panels.
virtual ~PanelDisplay ()
 Destructor.
virtual void setDefaultOptions ()
 Install the default options for this PanelDisplay.
virtual Bool setOptions (const Record &rec, Record &updatedOptions)
 Apply options stored in rec to the PanelDisplay; these get forwarded to all underlying WorldCanvases.
virtual Record getOptions () const
virtual void setAttributes (AttributeBuffer &at)
 Set attributes on all WolrdCanvases.
virtual void getAttributeValue (const String &name, Int &newValue) const
virtual void getGeometry (Int &nx, Int &ny, Float &xOrigin, Float &yOrigin, Float &xSize, Float &ySize, Float &dx, Float &dy, PanelDisplay::FillOrder &order) const
 Describe or set the geometry of the panels, either explicitly or in RecordInterface form.
virtual void getGeometry (RecordInterface &rec) const
virtual void setGeometry (const Int nx, const Int ny, const Float xOrigin, const Float yOrigin, const Float xSize, const Float ySize, const Float dx, const Float dy, const PanelDisplay::FillOrder order)
virtual void setGeometry (const RecordInterface &rec)
virtual void clear ()
 Clear our part of the PC.
virtual WorldCanvasHolderwcHolder (WorldCanvas *wc) const
virtual PixelCanvaspixelCanvas ()
virtual void addTool (const String &key, const std::tr1::shared_ptr< MultiWCTool > &)
virtual void removeTool (const String &key)
virtual void setToolKey (const String &toolname, const Display::KeySym &keysym)
virtual Bool hasTools ()
virtual void updateTools (Bool remove=True, Bool add=True)
virtual void disableTools ()
virtual void enableTools ()
virtual void enableTool (const String &toolname)
virtual void disableTool (const String &toolname)
virtual const
std::tr1::shared_ptr
< MultiWCTool
getTool (const String &key)
virtual ListIter< WorldCanvas * > wcs ()
virtual Bool isCSmaster (const DisplayData *dd) const
 Is the specified DisplayData the one in charge of coordinate state of the Panel's WCs?
void setCSmaster (DisplayData *dd)
float getDrawUnit () const
 Returns the current mapping of PGP units to pixel units.
int getColumnCount () const
 Returns the number of columns of plots that are currently being displayed.
int getRowCount () const
 Returns the number of rows of plots that are currently being displayed.

Public Attributes

ConstListIter< WorldCanvas * > * myWCLI

Static Public Attributes

static const String X_ORIGIN
static const String Y_ORIGIN
static const String X_SIZE
static const String Y_SIZE

Private Member Functions

void unSetupGeometry ()
 unSetup the Geometry.

Private Attributes

PixelCanvasitsPixelCanvas
 The PixelCanvas on which the panels are laid.
Int itsNX
 The number of panels in x and y.
Int itsNY
Float itsXOrigin
 The origin and size of the used area of the PixelCanvas.
Float itsYOrigin
Float itsXSize
Float itsYSize
Float itsDX
 The offset between each panel.
Float itsDY
Int itslpgm
 The pgmargins.
Int itsrpgm
Int itstpgm
Int itsbpgm
FillOrder itsOrder
 What order do we fill the canvases in?
Bool itsGeometrySet
 Whether the geometry is currently setup?
List< WorldCanvas * > itsWCList
 The WorldCanvases which we made, and a convenient iterator.
List< WorldCanvasHolder * > itsWCHList
 ListIter<WorldCanvas* >* itsWCLI;.
SimpleOrderedMap< String,
std::tr1::shared_ptr
< MultiWCTool > > 
itsMWCTools
 ListIter<WorldCanvasHolder* >* itsWCHLI;.

Detailed Description

A class which creates and manages "panelled" displays.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

The PanelDisplay class provides a display consisting of a number of panels.

Synopsis

This class uses the MultiWCHolder class to provide a regular set of panels for display multi-view DisplayDatas.

Example

Motivation

Definition at line 81 of file PanelDisplay.h.


Member Enumeration Documentation

Enumerator:
LEFT_TOP 

left to right, then top to bottom

others are imaginable

Definition at line 85 of file PanelDisplay.h.


Constructor & Destructor Documentation

casa::PanelDisplay::PanelDisplay ( PixelCanvas pixelcanvas,
const Int  nx = 3,
const Int  ny = 2,
const Float  xOrigin = 0.0,
const Float  yOrigin = 0.0,
const Float  xSize = 1.0,
const Float  ySize = 1.0,
const Float  dx = 0.0,
const Float  dy = 0.0,
const PanelDisplay::FillOrder  order = LEFT_TOP 
)

Constructor taking: a pointer to the PixelCanvas on which to lay the panels, the number of panels in the x and y directions, the extent of the PixelCanvas to cover with panels, and the fractional spacing between the panels.

virtual casa::PanelDisplay::~PanelDisplay ( ) [virtual]

Destructor.


Member Function Documentation

virtual void casa::PanelDisplay::addTool ( const String key,
const std::tr1::shared_ptr< MultiWCTool > &   
) [virtual]
virtual void casa::PanelDisplay::clear ( ) [virtual]

Clear our part of the PC.

(Clears both front and back buffers.)

Reimplemented from casa::MultiWCHolder.

virtual void casa::PanelDisplay::disableTool ( const String toolname) [virtual]
virtual void casa::PanelDisplay::disableTools ( ) [virtual]
virtual void casa::PanelDisplay::enableTool ( const String toolname) [virtual]
virtual void casa::PanelDisplay::enableTools ( ) [virtual]
virtual void casa::PanelDisplay::getAttributeValue ( const String name,
Int newValue 
) const [virtual]

Returns the number of columns of plots that are currently being displayed.

Returns the current mapping of PGP units to pixel units.

This number varies depending on the data units of the plot.

virtual void casa::PanelDisplay::getGeometry ( Int nx,
Int ny,
Float xOrigin,
Float yOrigin,
Float xSize,
Float ySize,
Float dx,
Float dy,
PanelDisplay::FillOrder order 
) const [virtual]

Describe or set the geometry of the panels, either explicitly or in RecordInterface form.

(Note: setGeometry() does not automatically refresh; when called within setOptions it does, though.)

virtual void casa::PanelDisplay::getGeometry ( RecordInterface rec) const [virtual]
virtual Record casa::PanelDisplay::getOptions ( ) const [virtual]

Returns the number of rows of plots that are currently being displayed.

virtual const std::tr1::shared_ptr<MultiWCTool> casa::PanelDisplay::getTool ( const String key) [virtual]
virtual Bool casa::PanelDisplay::hasTools ( ) [virtual]
virtual Bool casa::PanelDisplay::isCSmaster ( const DisplayData dd) const [virtual]

Is the specified DisplayData the one in charge of coordinate state of the Panel's WCs?

virtual PixelCanvas* casa::PanelDisplay::pixelCanvas ( ) [inline, virtual]

Definition at line 140 of file PanelDisplay.h.

References itsPixelCanvas.

virtual void casa::PanelDisplay::removeTool ( const String key) [virtual]
virtual void casa::PanelDisplay::setAttributes ( AttributeBuffer at) [virtual]

Set attributes on all WolrdCanvases.

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

Install the default options for this PanelDisplay.

virtual void casa::PanelDisplay::setGeometry ( const Int  nx,
const Int  ny,
const Float  xOrigin,
const Float  yOrigin,
const Float  xSize,
const Float  ySize,
const Float  dx,
const Float  dy,
const PanelDisplay::FillOrder  order 
) [virtual]
virtual void casa::PanelDisplay::setGeometry ( const RecordInterface rec) [virtual]
virtual Bool casa::PanelDisplay::setOptions ( const Record rec,
Record updatedOptions 
) [virtual]

Apply options stored in rec to the PanelDisplay; these get forwarded to all underlying WorldCanvases.

virtual void casa::PanelDisplay::setToolKey ( const String toolname,
const Display::KeySym keysym 
) [virtual]

unSetup the Geometry.

virtual void casa::PanelDisplay::updateTools ( Bool  remove = True,
Bool  add = True 
) [virtual]
virtual WorldCanvasHolder* casa::PanelDisplay::wcHolder ( WorldCanvas wc) const [virtual]
virtual ListIter<WorldCanvas* > casa::PanelDisplay::wcs ( ) [inline, virtual]

return itsWCLI;

Definition at line 159 of file PanelDisplay.h.

References itsWCList.


Member Data Documentation

Definition at line 211 of file PanelDisplay.h.

The offset between each panel.

Definition at line 208 of file PanelDisplay.h.

Definition at line 208 of file PanelDisplay.h.

Whether the geometry is currently setup?

Definition at line 217 of file PanelDisplay.h.

The pgmargins.

Definition at line 211 of file PanelDisplay.h.

ListIter<WorldCanvasHolder* >* itsWCHLI;.

Definition at line 238 of file PanelDisplay.h.

The number of panels in x and y.

Definition at line 202 of file PanelDisplay.h.

Definition at line 202 of file PanelDisplay.h.

What order do we fill the canvases in?

Definition at line 214 of file PanelDisplay.h.

The PixelCanvas on which the panels are laid.

Definition at line 199 of file PanelDisplay.h.

Referenced by pixelCanvas().

Definition at line 211 of file PanelDisplay.h.

Definition at line 211 of file PanelDisplay.h.

ListIter<WorldCanvas* >* itsWCLI;.

The WorldCanvasHolders which we made, and a convenient iterator.

(dk note: you should create a local iterator instead of using member iterators. Otherwise, a call chain may include two methods in the class stepping on each other's iterator use. Even if you think that won't happen currently, it creates a maintenance minefield).

Also note: exactly the same list (with the same name, even) is maintained on MWCH level (to be fixed).

Reimplemented from casa::MultiWCHolder.

Definition at line 234 of file PanelDisplay.h.

The WorldCanvases which we made, and a convenient iterator.

Definition at line 220 of file PanelDisplay.h.

Referenced by wcs().

The origin and size of the used area of the PixelCanvas.

Definition at line 205 of file PanelDisplay.h.

Definition at line 205 of file PanelDisplay.h.

Definition at line 205 of file PanelDisplay.h.

Definition at line 205 of file PanelDisplay.h.

Definition at line 144 of file PanelDisplay.h.

Definition at line 188 of file PanelDisplay.h.

Definition at line 190 of file PanelDisplay.h.

Definition at line 189 of file PanelDisplay.h.

Definition at line 191 of file PanelDisplay.h.


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