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

Base class for any layout. More...

#include <PlotCanvasLayout.h>

Inheritance diagram for casa::PlotCanvasLayout:
casa::PlotLayoutGrid casa::PlotLayoutSingle

List of all members.

Public Member Functions

 PlotCanvasLayout ()
 Constructor.
virtual ~PlotCanvasLayout ()
 Destructor.
virtual Plotterplotter () const
 Returns the plotter this layout is used in, or NULL for none.
virtual void attach (Plotter *p)
 Attaches this layout to the given plotter.
virtual bool coordIsValid (const PlotLayoutCoordinate &coord) const =0
 ABSTRACT METHODS //.
virtual int coordToIndex (const PlotLayoutCoordinate &coord) const =0
 turn the coordinate into an index.
virtual void setCanvasAt (const PlotLayoutCoordinate &coord, PlotCanvasPtr canvas)=0
 Sets the canvas at the given coordinate to the given canvas.
virtual PlotCanvasPtr canvasAt (const PlotLayoutCoordinate &coord) const =0
 Returns the canvas at the given coordinate.
virtual PlotCanvasPtr canvas () const =0
 For single layouts, returns the canvas; otherwise returns the "first".
virtual vector< PlotCanvasPtrallCanvases () const =0
 Returns all canvases in this layout.
virtual bool isValid () const =0
 Indicates whether the layout is valid.
virtual unsigned int spacing () const =0
 Gets/sets the spacing between the canvases in the layout.
virtual void setSpacing (unsigned int spacing)=0

Protected Attributes

Plotterm_plotter
 
     


Detailed Description

Base class for any layout.

Definition at line 54 of file PlotCanvasLayout.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 57 of file PlotCanvasLayout.h.

virtual casa::PlotCanvasLayout::~PlotCanvasLayout ( ) [inline, virtual]

Destructor.

Definition at line 60 of file PlotCanvasLayout.h.


Member Function Documentation

virtual vector<PlotCanvasPtr> casa::PlotCanvasLayout::allCanvases ( ) const [pure virtual]

Returns all canvases in this layout.

Implemented in casa::PlotLayoutGrid, and casa::PlotLayoutSingle.

virtual void casa::PlotCanvasLayout::attach ( Plotter p) [inline, virtual]

Attaches this layout to the given plotter.

The plotter's layoutOptionsChanged method can then be called when the layout changes.

Definition at line 68 of file PlotCanvasLayout.h.

References m_plotter.

virtual PlotCanvasPtr casa::PlotCanvasLayout::canvas ( ) const [pure virtual]

For single layouts, returns the canvas; otherwise returns the "first".

Implemented in casa::PlotLayoutGrid, and casa::PlotLayoutSingle.

virtual PlotCanvasPtr casa::PlotCanvasLayout::canvasAt ( const PlotLayoutCoordinate coord) const [pure virtual]

Returns the canvas at the given coordinate.

Implemented in casa::PlotLayoutGrid, and casa::PlotLayoutSingle.

virtual bool casa::PlotCanvasLayout::coordIsValid ( const PlotLayoutCoordinate coord) const [pure virtual]

ABSTRACT METHODS //.

Returns true if the given coordinate is valid for this layout.

Implemented in casa::PlotLayoutGrid, and casa::PlotLayoutSingle.

virtual int casa::PlotCanvasLayout::coordToIndex ( const PlotLayoutCoordinate coord) const [pure virtual]

turn the coordinate into an index.

the index should >= 0 and < the total number of canvases in the layout.

Implemented in casa::PlotLayoutGrid, and casa::PlotLayoutSingle.

virtual bool casa::PlotCanvasLayout::isValid ( ) const [pure virtual]

Indicates whether the layout is valid.

Implemented in casa::PlotLayoutGrid, and casa::PlotLayoutSingle.

virtual Plotter* casa::PlotCanvasLayout::plotter ( ) const [inline, virtual]

Returns the plotter this layout is used in, or NULL for none.

Definition at line 64 of file PlotCanvasLayout.h.

References m_plotter.

virtual void casa::PlotCanvasLayout::setCanvasAt ( const PlotLayoutCoordinate coord,
PlotCanvasPtr  canvas 
) [pure virtual]

Sets the canvas at the given coordinate to the given canvas.

Implemented in casa::PlotLayoutGrid, and casa::PlotLayoutSingle.

virtual void casa::PlotCanvasLayout::setSpacing ( unsigned int  spacing) [pure virtual]
virtual unsigned int casa::PlotCanvasLayout::spacing ( ) const [pure virtual]

Gets/sets the spacing between the canvases in the layout.

May not be valid for all layout types. The implementation for Plotter should use this attribute appropriately.

Implemented in casa::PlotLayoutGrid, and casa::PlotLayoutSingle.


Member Data Documentation

     

Definition at line 105 of file PlotCanvasLayout.h.

Referenced by attach(), and plotter().


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