21 #ifndef GV_VIEWERWINDOW__H
22 #define GV_VIEWERWINDOW__H
29 class ViewerWindowConfig ;
30 class ViewerWindowHandler ;
40 std::string m_mask_file ;
51 virtual void onChar(
char ) = 0 ;
57 virtual void onMouseButtonUp(
int x ,
int y ,
bool shift ,
bool control ) = 0 ;
92 virtual void init() = 0 ;
97 virtual void display(
int dx ,
int dy ,
int channels ,
const char * ,
size_t ) = 0 ;
100 virtual int dx()
const = 0 ;
104 virtual int dy()
const = 0 ;
virtual void display(int dx, int dy, int channels, const char *, size_t)=0
Displays the given image.
virtual void onMouseButtonUp(int x, int y, bool shift, bool control)=0
Called when the left mouse button is released.
virtual void init()=0
An initialisation function that is called after contstruction.
An abstract base class for a viewer window.
virtual int dy() const =0
Returns the height of the window.
virtual ~ViewerWindowHandler()
Destructor.
A configuration structure for Gv::ViewerWindow.
virtual ~ViewerWindow()
Destructor.
virtual void onChar(char)=0
Called when a key is pressed.
virtual void onMouseMove(int x, int y)=0
Called when the mouse moves (typically also depending on whether ViewerWindowConfig::m_mouse_moves is...
virtual void onMouseButtonDown(int x, int y, bool shift, bool control)=0
Called when the left mouse button is pressed.
static ViewerWindow * create(Handler &, ViewerWindow::Config, int image_dx, int image_dy)
A factory function that returns a new'ed ViewerWindow.
virtual int dx() const =0
Returns the width of the window.
virtual void onInvalid()=0
Called when the window needs to be re-display()ed.
A callback interface for Gv::ViewerWindow.