A painting canvas.
More...
#include <GWidgets.h>
List of all members.
Public Member Functions |
| GWidgetCanvas (GWidgetGroup *pParent, int x, int y, int w, int h, GImage *pImage) |
virtual | ~GWidgetCanvas () |
virtual WidgetType | type () |
virtual void | draw (GImage *pCanvas, int x, int y) |
| Draws this widget on pCanvas at (x,y)
|
void | setDirty () |
float | zoom () |
void | setZoom (float f) |
void | zoomToFit () |
void | setHorizScroll (int x) |
void | setVertScroll (int y) |
void | setImage (GImage *pImage) |
void | setSelectionMask (GImage *pMask) |
| Only the alpha channel of the mask is used. The other values should be constant, or else the selection border will cut through the selection. If you change what is selected, you should call this method again, even though it may still be the same mask image.
|
Protected Member Functions |
virtual void | onMouseMove (int dx, int dy) |
virtual void | grab (int button, int x, int y) |
virtual void | release (int button) |
Protected Attributes |
GImage * | m_pImageIn |
GImage * | m_pSelectionMask |
float | m_fZoom |
int | m_nHScroll |
int | m_nVScroll |
bool | m_pressed |
int | m_nMouseX |
int | m_nMouseY |
Detailed Description
Constructor & Destructor Documentation
GClasses::GWidgetCanvas::GWidgetCanvas |
( |
GWidgetGroup * |
pParent, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h, |
|
|
GImage * |
pImage |
|
) |
| |
virtual GClasses::GWidgetCanvas::~GWidgetCanvas |
( |
| ) |
[virtual] |
Member Function Documentation
virtual void GClasses::GWidgetCanvas::draw |
( |
GImage * |
pCanvas, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| [virtual] |
virtual void GClasses::GWidgetCanvas::grab |
( |
int |
button, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| [protected, virtual] |
virtual void GClasses::GWidgetCanvas::onMouseMove |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| [protected, virtual] |
virtual void GClasses::GWidgetCanvas::release |
( |
int |
button | ) |
[protected, virtual] |
void GClasses::GWidgetCanvas::setDirty |
( |
| ) |
|
void GClasses::GWidgetCanvas::setHorizScroll |
( |
int |
x | ) |
|
void GClasses::GWidgetCanvas::setImage |
( |
GImage * |
pImage | ) |
|
void GClasses::GWidgetCanvas::setSelectionMask |
( |
GImage * |
pMask | ) |
|
Only the alpha channel of the mask is used. The other values should be constant, or else the selection border will cut through the selection. If you change what is selected, you should call this method again, even though it may still be the same mask image.
void GClasses::GWidgetCanvas::setVertScroll |
( |
int |
y | ) |
|
void GClasses::GWidgetCanvas::setZoom |
( |
float |
f | ) |
|
virtual WidgetType GClasses::GWidgetCanvas::type |
( |
| ) |
[inline, virtual] |
float GClasses::GWidgetCanvas::zoom |
( |
| ) |
[inline] |
void GClasses::GWidgetCanvas::zoomToFit |
( |
| ) |
|
Member Data Documentation