![]() |
BSB Developer Docs
|
Rectangle widget with configurable background and border. More...
#include <gui/widget.h>Go to the source code of this file.
Typedefs | |
| typedef struct RectangleWidget | RectangleWidget |
| Rectangle opaque structure. | |
Functions | |
| RectangleWidget * | rectangle_widget_alloc (Widget *parent) |
| Create a new RectangleWidget instance. | |
| void | rectangle_widget_free (RectangleWidget *instance) |
| Delete a RectangleWidget instance. | |
| Widget * | rectangle_widget_get_base (RectangleWidget *instance) |
| Get a pointer to the base class instance. | |
| void | rectangle_widget_set_size (RectangleWidget *instance, size_t width, size_t height, int8_t radius) |
| Set the size of a RectangleWidget instance. | |
| void | rectangle_widget_set_background (RectangleWidget *instance, RectangleWidgetBackgroundType type, Color color_start, Color color_end) |
| Set the background type of a RectangleWidget instance. | |
| void | rectangle_widget_set_border (RectangleWidget *instance, int8_t width, Color color) |
| Set the border properties of a RectangleWidget instance. | |
Rectangle widget with configurable background and border.
| RectangleWidget * rectangle_widget_alloc | ( | Widget * | parent | ) |
Create a new RectangleWidget instance.
| [in,out] | parent | pointer to the parent Widget instance |
| void rectangle_widget_free | ( | RectangleWidget * | instance | ) |
Delete a RectangleWidget instance.
| [in,out] | instance | pointer to the RectangleWidget instance to be deleted |
| Widget * rectangle_widget_get_base | ( | RectangleWidget * | instance | ) |
Get a pointer to the base class instance.
The return value can be used in all Widget methods.
| [in,out] | instance | pointer to the RectangleWidget instance to be queried |
| void rectangle_widget_set_background | ( | RectangleWidget * | instance, |
| RectangleWidgetBackgroundType | type, | ||
| Color | color_start, | ||
| Color | color_end ) |
Set the background type of a RectangleWidget instance.
| [in,out] | instance | pointer to the RectangleWidget instance |
| [in] | type | the background type to set |
| [in] | color_start | the starting color for the background |
| [in] | color_end | the ending color for the background (used for gradients) |
| void rectangle_widget_set_border | ( | RectangleWidget * | instance, |
| int8_t | width, | ||
| Color | color ) |
Set the border properties of a RectangleWidget instance.
| [in,out] | instance | pointer to the RectangleWidget instance |
| [in] | width | the width of the border |
| [in] | color | the color of the border |
| void rectangle_widget_set_size | ( | RectangleWidget * | instance, |
| size_t | width, | ||
| size_t | height, | ||
| int8_t | radius ) |
Set the size of a RectangleWidget instance.
| [in,out] | instance | pointer to the RectangleWidget instance |
| [in] | width | the width of the rectangle |
| [in] | height | the height of the rectangle |
| [in] | radius | the radius of the rectangle corners |