27 #ifndef PLOTCANVASLAYOUT_H_
28 #define PLOTCANVASLAYOUT_H_
89 virtual std::vector<PlotCanvasPtr>
allCanvases()
const = 0;
92 virtual bool isValid()
const = 0;
98 virtual unsigned int spacing()
const = 0;
181 unsigned int rows()
const;
184 unsigned int cols()
const;
An n x m grid of canvases.
void setCanvasAt(const PlotLayoutCoordinate &coord, PlotCanvasPtr c)
Implements PlotCanvasLayout::setCanvasAt().
PlotLayoutGrid(unsigned int rows, unsigned int cols)
Constructor which takes the number of rows and columns.
PlotCanvasPtr canvas() const
Implements PlotCanvasLayout::canvas().
PlotLayoutSingle(PlotCanvasPtr c)
Constructor which takes the canvas.
void setSpacing(unsigned int)
Implements PlotCanvasLayout::setSpacing().
virtual void attach(Plotter *p)
Attaches this layout to the given plotter.
int coordToIndex(const PlotLayoutCoordinate &) const
Implements PlotCanvasLayout::coordToIndex().
PlotCanvasLayout()
Constructor.
unsigned int spacing() const
Implements PlotCanvasLayout::spacing().
PlotCanvasPtr canvas() const
Implements PlotCanvasLayout::canvas().
bool coordIsValid(const PlotLayoutCoordinate &coord) const
Implements PlotCanvasLayout::coordIsValid().
SMART POINTER DEFINITIONS *typedef casacore::CountedPtr< PlotCanvasLayout > PlotCanvasLayoutPtr
virtual unsigned int spacing() const =0
Gets/sets the spacing between the canvases in the layout.
void setCanvasAt(const PlotLayoutCoordinate &coord, PlotCanvasPtr canvas)
Implements PlotCanvasLayout::setCanvasAt().
A Plotter can be thought of as a frame that holds one or more PlotCanvases in a configuration determi...
~PlotLayoutGrid()
Destructor.
Base class for any layout.
virtual ~PlotCanvasLayout()
Destructor.
virtual int coordToIndex(const PlotLayoutCoordinate &coord) const =0
turn the coordinate into an index.
virtual bool coordIsValid(const PlotLayoutCoordinate &coord) const =0
ABSTRACT METHODS //.
std::vector< std::vector< PlotCanvasPtr > > m_panels
PlotCanvasPtr canvasAt(const PlotLayoutCoordinate &coord) const
Implements PlotCanvasLayout::canvasAt().
unsigned int cols() const
Returns the number of columns.
virtual ~PlotLayoutCoordinate()
void setSpacing(unsigned int spacing)
Implements PlotCanvasLayout::setSpacing().
virtual PlotCanvasPtr canvas() const =0
For single layouts, returns the canvas; otherwise returns the "first".
bool coordIsValid(const PlotLayoutCoordinate &) const
Implements PlotCanvasLayout::coordIsValid().
virtual void setSpacing(unsigned int spacing)=0
virtual Plotter * plotter() const
Returns the plotter this layout is used in, or NULL for none.
~PlotLayoutSingle()
Destructor.
void setCanvas(PlotCanvasPtr canvas)
Sets this layout's canvas to the given.
PlotCanvasPtr canvasAt(const PlotLayoutCoordinate &coord) const
Implements PlotCanvasLayout::canvasAt().
virtual bool isValid() const =0
Indicates whether the layout is valid.
INHERITANCE_POINTER2(PlotLayoutSingle, PlotLayoutSinglePtr, PlotCanvasLayout, PlotCanvasLayoutPtr) INHERITANCE_POINTER2(PlotLayoutGrid
virtual void setCanvasAt(const PlotLayoutCoordinate &coord, PlotCanvasPtr canvas)=0
Sets the canvas at the given coordinate to the given canvas.
std::vector< PlotCanvasPtr > allCanvases() const
Implements PlotCanvasLayout::allCanvases().
unsigned int spacing() const
Implements PlotCanvasLayout::spacing().
const Double c
Fundamental physical constants (SI units):
virtual std::vector< PlotCanvasPtr > allCanvases() const =0
Returns all canvases in this layout.
bool isValid() const
Implements PlotCanvasLayout::isValid().
int coordToIndex(const PlotLayoutCoordinate &coord) const
Implements PlotCanvasLayout::coordToIndex().
PlotGridCoordinate(unsigned int r, unsigned int c)
std::vector< PlotCanvasPtr > allCanvases() const
Implements PlotCanvasLayout::allCanvases().
virtual PlotCanvasPtr canvasAt(const PlotLayoutCoordinate &coord) const =0
Returns the canvas at the given coordinate.
unsigned int rows() const
Returns the number of rows.
bool isValid() const
Implements PlotCanvasLayout::isValid().