#include <MAUI/WidgetSkin.h>
Public Types | |
enum | eType { SELECTED = 0, UNSELECTED = 1 } |
Public Member Functions | |
WidgetSkin () | |
WidgetSkin (MAHandle selectedImage, MAHandle unselectedImage, int x1, int x2, int y1, int y2, bool selectedTransparent=true, bool unselectedTransparent=true) | |
void | setStartX (int x) |
void | setEndX (int x) |
void | setStartY (int y) |
void | setEndY (int y) |
int | getStartX () const |
int | getStartY () const |
int | getEndX () const |
int | getEndY () const |
MAHandle | getUnselectedImage () const |
MAHandle | getSelectedImage () const |
void | setSelectedImage (MAHandle image) |
void | setUnselectedImage (MAHandle image) |
void | draw (int x, int y, int width, int height, eType type) |
int | getImageHeight () const |
int | getImageWidth () const |
bool | isSelectedTransparent () const |
bool | isUnselectedTransparent () const |
|
Enumerator for the different drawing states of a WidgetSkin. |
|
The default constructor. |
|
The WidgetSkin constructor takes two images (selected and unselected) and 2 coordinate pairs, defining the 9 segments of the images. Finally it takes two bools that specifies if the images are transparent or not (default true). |
|
Set the start x coordinate of the WidgetSkin rect. |
|
Set the end x coordinate of the WidgetSkin rect. |
|
Set the start y coordinate of the WidgetSkin rect. |
|
Set the end y coordinate of the WidgetSkin rect. |
|
Get the start x coordinate of the WidgetSkin rect. |
|
Get the start y coordinate of the WidgetSkin rect. |
|
Get the end x coordinate of the WidgetSkin rect. |
|
Get the end y coordinate of the WidgetSkin rect. |
|
Get the image used to display an unselected state. |
|
Get the image used to display a selected state. |
|
Set the selected image, returns false if there is an unselected image and the dimensions of the selected image does not equal the unselected image. |
|
Set the unselected image, returns false if there is a selected image and the dimensions of the unselected image does not equal the selected image. |
|
Use this to draw the WidgetSkin. The upper-left corner is placed at 'x' and 'y' and the skin is automatically resized to 'width' and 'height. 'type' specifies which drawing state should be used when drawing the widget skin. |
|
Get the image height. |
|
Get the image width. |
|
Returns whether the selected image is transparent or not. |
|
Returns whether the unselected image is transparent or not. |