CVR-Lib last update 20 Sep 2009

cvr::viewer2D::viewer2D::mainWindow Class Reference

Main window of the 2D viewer. More...

#include <cvrViewer2D.h>

Inheritance diagram for cvr::viewer2D::viewer2D::mainWindow:

Inheritance graph
[legend]
Collaboration diagram for cvr::viewer2D::viewer2D::mainWindow:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 mainWindow (viewer2D &parent)
const informationgetInformation () 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 ()


Detailed Description

Main window of the 2D viewer.

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.


Constructor & Destructor Documentation

cvr::viewer2D::viewer2D::mainWindow::mainWindow ( viewer2D parent  ) 

Main window constructor.


Member Function Documentation

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)


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

Generated on Sun Sep 20 22:09:10 2009 for CVR-Lib by Doxygen 1.5.8