22 #ifndef __ZoomImageCanvas_hh__
23 #define __ZoomImageCanvas_hh__
25 #include <bias_config.h>
27 #ifndef BIAS_HAVE_WXWIDGETS
28 # error BIAS_HAVE_WXWIDGETS not defined but required by ZoomImageCanvas. Please enable BIAS_HAVE_WXWIDGETS in CMake configure step.
31 #include <Base/Common/BIASpragmaStart.hh>
33 #include <wx/dcbuffer.h>
34 #include <Base/Common/BIASpragmaEnd.hh>
35 #include <Base/Image/Image.hh>
47 wxWindowID
id = -1,
const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxSize(320, 240),
49 long style = wxTAB_TRAVERSAL,
50 const wxString& name = wxT(
"ZoomImageCanvas"));
54 void NewCoo(
unsigned x,
unsigned y);
55 void NewZoom(
int zoom);
62 { ClearDrawingContext_=clear; }
65 void UpdateStatusBar(
unsigned x,
unsigned y);
68 void OnResize(wxSizeEvent & event);
69 void OnPaint(wxPaintEvent & event);
70 void OnMouseMove(wxMouseEvent &event);
71 void OnMouseLeave(wxMouseEvent &event);
72 void OnRightMouse(wxMouseEvent &event);
73 void OnLeftMouse(wxMouseEvent &event);
74 void OnKey(wxKeyEvent &event);
75 void OnLeftMouseDoubleClicked(wxMouseEvent &event);
88 unsigned ZoomFactor_, ZoomX_,
ZoomY_;
101 #endif // __ZoomImageCanvas_hh__
BIAS::Image< unsigned char > zim_
void SetClearDrawingContext(bool clear)
Canvas now uses double buffering to avoid flickering, so it should be ok to always clear the canvas...
bool ClearDrawingContext_
This is the base class for images in BIAS.