last update 20 Sep 2009 |
#include <cvrViewer2D.h>
Public Member Functions | |
mainWindow (viewer2D &parent) | |
const information & | getInformation () const |
bool | getFormattedData (const irectangle &area, image &img) |
virtual ipoint | computeCanvasSize () const |
virtual bool | saveButtonPressed (const std::string &filename) |
Protected Member Functions | |
virtual void | initToolkit () |
virtual void | destroyToolkit () |
The only task for this class is to show a 2D color cvr::image in the window taking care of the scrollbars. The corresponding painter (cvr::viewer2DPainter) is the one in charge of painting anything into the cvr::image.
cvr::viewer2D::viewer2D::mainWindow::mainWindow | ( | viewer2D & | parent | ) |
Main window constructor.
virtual ipoint cvr::viewer2D::viewer2D::mainWindow::computeCanvasSize | ( | ) | const [virtual] |
Compute the new canvas size.
Nothing but the computation has to be done here. If it is applied or not will be a decision of the setCanvasSize() method.
The viewer2D computes the size as the product of zoom time the image size.
Reimplemented from cvr::viewerBase::viewerBase::mainWindow.
virtual void cvr::viewer2D::viewer2D::mainWindow::destroyToolkit | ( | ) | [protected, virtual] |
Destroy toolkit dependent class.
This is called at destruction time and is implemented by the toolkit being used.
Reimplemented from cvr::viewerBase::viewerBase::mainWindow.
bool cvr::viewer2D::viewer2D::mainWindow::getFormattedData | ( | const irectangle & | area, | |
image & | img | |||
) |
Get data as an image for the window indicated by area.
const information& cvr::viewer2D::viewer2D::mainWindow::getInformation | ( | ) | const |
Get information block of the parent class.
Reimplemented from cvr::viewerBase::viewerBase::mainWindow.
virtual void cvr::viewer2D::viewer2D::mainWindow::initToolkit | ( | ) | [protected, virtual] |
Initialize toolkit dependent class.
This is called at construction time but is implemented by the toolkit being used.
Reimplemented from cvr::viewerBase::viewerBase::mainWindow.
virtual bool cvr::viewer2D::viewer2D::mainWindow::saveButtonPressed | ( | const std::string & | filename | ) | [virtual] |
Method called when the user pressed the save button.
(Implemented in toolkit dependent files, as it needs some collaboration with the GUI to detect the current window configuration)