#include <CornerImage.h>
Inherits Wt::WImage.
Inheritance diagram for CornerImage:

Public Types | |
| TopLeft = Top | Left | |
| Top left. | |
| TopRight = Top | Right | |
| Top right. | |
| BottomLeft = Bottom | Left | |
| Bottom left. | |
| BottomRight = Bottom | Right | |
| Bottom right. | |
| enum | Corner { TopLeft = Top | Left, TopRight = Top | Right, BottomLeft = Bottom | Left, BottomRight = Bottom | Right } |
| One of the four corners of a widget. More... | |
Public Member Functions | |
| CornerImage (Corner corner, WColor fg, WColor bg, int radius, WContainerWidget *parent=0) | |
| Construct a new CornerImage. | |
| ~CornerImage () | |
| CornerImage destructor. | |
| void | setRadius (int radius) |
| Change the corner radius (and image dimensions). | |
| int | radius () const |
| Get the corner radius. | |
| void | setForeground (WColor color) |
| Change the foreground color. | |
| WColor | foreground () const |
| Get the foreground color. | |
| void | setBackground (WColor color) |
| Change the background color. | |
| WColor | background () const |
| Get the background color. | |
Private Member Functions | |
| void | compute () |
| Regenerate the image. | |
Private Attributes | |
| Corner | corner_ |
| One of the four corners, which this image represents. | |
| WColor | fg_ |
| Foreground color. | |
| WColor | bg_ |
| Background color. | |
| int | radius_ |
| Radius. | |
| WMemoryResource * | resource_ |
| The resource which contains the generated image. | |
The CornerImage is a dynamically generated WImage, which draws an arc of 90°, to represent one of the four corners of a widget.
The CornerImage is part of the Wt style example.
Definition at line 33 of file CornerImage.h.
| enum CornerImage::Corner |
| CornerImage::CornerImage | ( | Corner | corner, | |
| WColor | fg, | |||
| WColor | bg, | |||
| int | radius, | |||
| WContainerWidget * | parent = 0 | |||
| ) |
Construct a new CornerImage.
Construct a corner image, to draw the specified corner, with the given foreground and background color, and the specified radius.
The colors must be constructed using red/green/blue values, using WColor::WColor(int, int, int).
Definition at line 13 of file CornerImage.C.
| CornerImage::~CornerImage | ( | ) |
| WColor CornerImage::background | ( | ) | const [inline] |
| void CornerImage::compute | ( | ) | [private] |
| WColor CornerImage::foreground | ( | ) | const [inline] |
| int CornerImage::radius | ( | ) | const [inline] |
| void CornerImage::setBackground | ( | WColor | color | ) |
Change the background color.
| void CornerImage::setForeground | ( | WColor | color | ) |
| void CornerImage::setRadius | ( | int | radius | ) |
WColor CornerImage::bg_ [private] |
Corner CornerImage::corner_ [private] |
WColor CornerImage::fg_ [private] |
int CornerImage::radius_ [private] |
WMemoryResource* CornerImage::resource_ [private] |
1.4.7