casa
$Rev:20696$
|
A class which creates and manages "panelled" displays. More...
#include <PanelDisplay.h>
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 WorldCanvasHolder * | wcHolder (WorldCanvas *wc) const |
virtual PixelCanvas * | pixelCanvas () |
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 | |
PixelCanvas * | itsPixelCanvas |
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;. |
A class which creates and manages "panelled" displays.
Public interface
The PanelDisplay class provides a display consisting of a number of panels.
This class uses the MultiWCHolder class to provide a regular set of panels for display multi-view DisplayDatas.
Definition at line 81 of file PanelDisplay.h.
Definition at line 85 of file PanelDisplay.h.
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.
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] |
int casa::PanelDisplay::getColumnCount | ( | ) | const |
Returns the number of columns of plots that are currently being displayed.
float casa::PanelDisplay::getDrawUnit | ( | ) | const |
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] |
int casa::PanelDisplay::getRowCount | ( | ) | const |
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.
void casa::PanelDisplay::setCSmaster | ( | DisplayData * | dd | ) |
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] |
void casa::PanelDisplay::unSetupGeometry | ( | ) | [private] |
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] |
Int casa::PanelDisplay::itsbpgm [private] |
Definition at line 211 of file PanelDisplay.h.
Float casa::PanelDisplay::itsDX [private] |
The offset between each panel.
Definition at line 208 of file PanelDisplay.h.
Float casa::PanelDisplay::itsDY [private] |
Definition at line 208 of file PanelDisplay.h.
Bool casa::PanelDisplay::itsGeometrySet [private] |
Whether the geometry is currently setup?
Definition at line 217 of file PanelDisplay.h.
Int casa::PanelDisplay::itslpgm [private] |
The pgmargins.
Definition at line 211 of file PanelDisplay.h.
SimpleOrderedMap<String, std::tr1::shared_ptr<MultiWCTool> > casa::PanelDisplay::itsMWCTools [private] |
ListIter<WorldCanvasHolder* >* itsWCHLI;.
Definition at line 238 of file PanelDisplay.h.
Int casa::PanelDisplay::itsNX [private] |
The number of panels in x and y.
Definition at line 202 of file PanelDisplay.h.
Int casa::PanelDisplay::itsNY [private] |
Definition at line 202 of file PanelDisplay.h.
FillOrder casa::PanelDisplay::itsOrder [private] |
What order do we fill the canvases in?
Definition at line 214 of file PanelDisplay.h.
PixelCanvas* casa::PanelDisplay::itsPixelCanvas [private] |
The PixelCanvas on which the panels are laid.
Definition at line 199 of file PanelDisplay.h.
Referenced by pixelCanvas().
Int casa::PanelDisplay::itsrpgm [private] |
Definition at line 211 of file PanelDisplay.h.
Int casa::PanelDisplay::itstpgm [private] |
Definition at line 211 of file PanelDisplay.h.
List<WorldCanvasHolder* > casa::PanelDisplay::itsWCHList [private] |
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.
List<WorldCanvas* > casa::PanelDisplay::itsWCList [private] |
The WorldCanvases which we made, and a convenient iterator.
Definition at line 220 of file PanelDisplay.h.
Referenced by wcs().
Float casa::PanelDisplay::itsXOrigin [private] |
The origin and size of the used area of the PixelCanvas.
Definition at line 205 of file PanelDisplay.h.
Float casa::PanelDisplay::itsXSize [private] |
Definition at line 205 of file PanelDisplay.h.
Float casa::PanelDisplay::itsYOrigin [private] |
Definition at line 205 of file PanelDisplay.h.
Float casa::PanelDisplay::itsYSize [private] |
Definition at line 205 of file PanelDisplay.h.
Definition at line 144 of file PanelDisplay.h.
const String casa::PanelDisplay::X_ORIGIN [static] |
Definition at line 188 of file PanelDisplay.h.
const String casa::PanelDisplay::X_SIZE [static] |
Definition at line 190 of file PanelDisplay.h.
const String casa::PanelDisplay::Y_ORIGIN [static] |
Definition at line 189 of file PanelDisplay.h.
const String casa::PanelDisplay::Y_SIZE [static] |
Definition at line 191 of file PanelDisplay.h.