casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
casa::PlotCanvasLayout Class Referenceabstract

Base class for any layout. More...

#include <PlotCanvasLayout.h>

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

Public Member Functions

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

Protected Attributes

Plotterm_plotter
 

Detailed Description

Base class for any layout.

Definition at line 52 of file PlotCanvasLayout.h.

Constructor & Destructor Documentation

casa::PlotCanvasLayout::PlotCanvasLayout ( )
inline

Constructor.

Definition at line 55 of file PlotCanvasLayout.h.

virtual casa::PlotCanvasLayout::~PlotCanvasLayout ( )
inlinevirtual

Destructor.

Definition at line 58 of file PlotCanvasLayout.h.

Member Function Documentation

virtual std::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)
inlinevirtual

Attaches this layout to the given plotter.

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

Definition at line 66 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
inlinevirtual

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

Definition at line 62 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

Plotter* casa::PlotCanvasLayout::m_plotter
protected

Definition at line 103 of file PlotCanvasLayout.h.

Referenced by attach(), and plotter().


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