VideoTools
|
An abstract base class for a viewer window. More...
#include <gvviewerwindow.h>
Public Types | |
typedef ViewerWindowHandler | Handler |
typedef ViewerWindowConfig | Config |
Public Member Functions | |
virtual void | init ()=0 |
An initialisation function that is called after contstruction. More... | |
virtual void | display (int dx, int dy, int channels, const char *, size_t)=0 |
Displays the given image. | |
virtual int | dx () const =0 |
Returns the width of the window. More... | |
virtual int | dy () const =0 |
Returns the height of the window. More... | |
virtual | ~ViewerWindow () |
Destructor. | |
Static Public Member Functions | |
static ViewerWindow * | create (Handler &, ViewerWindow::Config, int image_dx, int image_dy) |
A factory function that returns a new'ed ViewerWindow. More... | |
An abstract base class for a viewer window.
The concrete derived class is chosen by the factory class.
Definition at line 76 of file gvviewerwindow.h.
|
static |
A factory function that returns a new'ed ViewerWindow.
The dx and dy parameters are the size of the image that triggered the creation of the window, not necessarily the size of the window.
The new window should have its init() method called immediately after construction.
Definition at line 35 of file gvviewerwindowfactory.cpp.
|
pure virtual |
Returns the width of the window.
This may not be the same as what was passed to the constructor. The mouse coordinates relate to this value.
Implemented in Gv::ViewerWindowX, Gv::ViewerWindowAnsi, and Gv::ViewerWindowCurses.
|
pure virtual |
Returns the height of the window.
This may not be the same as what was passed to the constructor. The mouse coordinates relate to this value.
Implemented in Gv::ViewerWindowX, Gv::ViewerWindowAnsi, and Gv::ViewerWindowCurses.
|
pure virtual |
An initialisation function that is called after contstruction.
Keeping it as a separate function makes cleanup simpler in the face of exceptions, for some derived classes.
Implemented in Gv::ViewerWindowX, Gv::ViewerWindowAnsi, and Gv::ViewerWindowCurses.