Wt
3.3.0
|
A interactive area in a widget, specified by a rectangle. More...
#include <Wt/WRectArea>
Public Member Functions | |
WRectArea () | |
Default constructor. | |
WRectArea (int x, int y, int width, int height) | |
Creates a rectangular area with given geometry. | |
WRectArea (double x, double y, double width, double height) | |
Creates a rectangular area with given geometry. | |
WRectArea (const WRectF &rect) | |
Creates a rectangular area with given geometry. | |
void | setX (int x) |
Sets the top-left X coordinate. | |
int | x () const |
Returns the top-left X coordinate. | |
void | setY (int y) |
Sets the top-left Y coordinate. | |
int | y () const |
Returns the top-left Y coordinate. | |
void | setWidth (int width) |
Sets the width. | |
int | width () const |
Returns the width. | |
void | setHeight (int height) |
Sets the height. | |
int | height () const |
Returns the height. |
A interactive area in a widget, specified by a rectangle.
The area may be added to a WImage or WPaintedWidget to provide interactivity on a rectangular area of the image. The rectangle is specified in pixel coordinates.
Wt::WImage *image = new Wt::WImage("images/family.jpg"); Wt::WRectArea *face = new Wt::WRectArea(100, 120, 200, 130); face->setToolTip("Uncle Frank"); image->addArea(face);
Wt::WRectArea::WRectArea | ( | ) |
Default constructor.
The default constructor creates a rectangular area spans the whole widget.
Wt::WRectArea::WRectArea | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Creates a rectangular area with given geometry.
The arguments are in pixel units.
Wt::WRectArea::WRectArea | ( | double | x, |
double | y, | ||
double | width, | ||
double | height | ||
) |
Creates a rectangular area with given geometry.
The arguments are in pixel units.
Wt::WRectArea::WRectArea | ( | const WRectF & | rect | ) |
Creates a rectangular area with given geometry.
The rect
argument is in pixel units.