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

Represents a single page of PlotCanvases, arranged in a grid. More...

#include <PlotMSPage.h>

List of all members.

Public Member Functions

 PlotMSPage (const PlotMSPage &copy)
 Copy constructor.
 ~PlotMSPage ()
 Destructor.
unsigned int pageNumber () const
 Returns this page's page number.
unsigned int canvasRows () const
 Returns the number of rows/columns of the canvas grid on this page.
unsigned int canvasCols () const
PlotMSPageoperator= (const PlotMSPage &copy)
 Copy operator.

Private Member Functions

 PlotMSPage (PlotMSPages &parent, unsigned int pageNumber)
 Constructor.
void resize (unsigned int nrows, unsigned int ncols)
 Resizes the grid to the given number of rows and columns.
PlotCanvasPtr canvas (unsigned int row, unsigned int col)
 Returns the canvas at the given row and column, or NULL if invalid.
PlotMSPlotowner (unsigned int row, unsigned int col)
 Returns the owner plot at the given row and column, or NULL if invalid or there is no owner for that canvas.
bool setOwner (unsigned int row, unsigned int col, PlotMSPlot *plot)
 Sets the owner for the canvas at the given row and column to the given plot; returns true for success, false otherwise.
bool isOwned (unsigned int row, unsigned int col)
 Returns true if the canvas at the given row and column exists and is owned, false otherwise.
bool disown (unsigned int row, unsigned int col)
 Sets the canvas at the given row and column to be owned by no one.
void setupPage ()
 Sets up this page on the plotter.

Private Attributes

PlotMSPagesitsParent_
 Parent.
unsigned int itsPageNum_
 Page number.
vector< vector< PlotCanvasPtr > > itsCanvases_
 Canvases grid.
vector< vector< PlotMSPlot * > > itsCanvasOwners_
 Owner grid.

Friends

class PlotMSOverPlot
class PlotMSMultiPlot
class PlotMSPages
class PlotMSSinglePlot
class PlotMSIterPlot

Detailed Description

Represents a single page of PlotCanvases, arranged in a grid.

Definition at line 43 of file PlotMSPage.h.


Constructor & Destructor Documentation

Copy constructor.

Destructor.

casa::PlotMSPage::PlotMSPage ( PlotMSPages parent,
unsigned int  pageNumber 
) [private]

Constructor.


Member Function Documentation

PlotCanvasPtr casa::PlotMSPage::canvas ( unsigned int  row,
unsigned int  col 
) [private]

Returns the canvas at the given row and column, or NULL if invalid.

unsigned int casa::PlotMSPage::canvasCols ( ) const
unsigned int casa::PlotMSPage::canvasRows ( ) const

Returns the number of rows/columns of the canvas grid on this page.

bool casa::PlotMSPage::disown ( unsigned int  row,
unsigned int  col 
) [private]

Sets the canvas at the given row and column to be owned by no one.

All items are removed from the canvas. Returns true for success, false for failure.

bool casa::PlotMSPage::isOwned ( unsigned int  row,
unsigned int  col 
) [inline, private]

Returns true if the canvas at the given row and column exists and is owned, false otherwise.

Definition at line 108 of file PlotMSPage.h.

References owner().

PlotMSPage& casa::PlotMSPage::operator= ( const PlotMSPage copy)

Copy operator.

PlotMSPlot* casa::PlotMSPage::owner ( unsigned int  row,
unsigned int  col 
) [private]

Returns the owner plot at the given row and column, or NULL if invalid or there is no owner for that canvas.

Referenced by isOwned().

unsigned int casa::PlotMSPage::pageNumber ( ) const

Returns this page's page number.

void casa::PlotMSPage::resize ( unsigned int  nrows,
unsigned int  ncols 
) [private]

Resizes the grid to the given number of rows and columns.

bool casa::PlotMSPage::setOwner ( unsigned int  row,
unsigned int  col,
PlotMSPlot plot 
) [private]

Sets the owner for the canvas at the given row and column to the given plot; returns true for success, false otherwise.

If the given canvas is already owned, it must first be disowned by its old owner.

void casa::PlotMSPage::setupPage ( ) [private]

Sets up this page on the plotter.


Friends And Related Function Documentation

friend class PlotMSIterPlot [friend]

Definition at line 50 of file PlotMSPage.h.

friend class PlotMSMultiPlot [friend]

Definition at line 47 of file PlotMSPage.h.

friend class PlotMSOverPlot [friend]

Definition at line 46 of file PlotMSPage.h.

friend class PlotMSPages [friend]

Definition at line 48 of file PlotMSPage.h.

friend class PlotMSSinglePlot [friend]

Definition at line 49 of file PlotMSPage.h.


Member Data Documentation

vector<vector<PlotCanvasPtr> > casa::PlotMSPage::itsCanvases_ [private]

Canvases grid.

Definition at line 81 of file PlotMSPage.h.

vector<vector<PlotMSPlot*> > casa::PlotMSPage::itsCanvasOwners_ [private]

Owner grid.

Definition at line 84 of file PlotMSPage.h.

unsigned int casa::PlotMSPage::itsPageNum_ [private]

Page number.

Definition at line 78 of file PlotMSPage.h.

Parent.

Definition at line 75 of file PlotMSPage.h.


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