BSB Developer Docs
Loading...
Searching...
No Matches
rectangle.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <gui/widget.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef enum {
15 RectangleWidgetBackgroundNone,
16 RectangleWidgetBackgroundSolid,
17 RectangleWidgetBackgroundGradientH,
18 RectangleWidgetBackgroundGradientV,
19
20 RectangleWidgetBackgroundMax,
21} RectangleWidgetBackgroundType;
22
25
34
41
51
61 RectangleWidget* instance,
62 size_t width,
63 size_t height,
64 int8_t radius);
65
75 RectangleWidget* instance,
76 RectangleWidgetBackgroundType type,
77 Color color_start,
78 Color color_end);
79
87void rectangle_widget_set_border(RectangleWidget* instance, int8_t width, Color color);
88
89#ifdef __cplusplus
90}
91#endif
void rectangle_widget_free(RectangleWidget *instance)
Delete a RectangleWidget instance.
Definition rectangle.c:28
Widget * rectangle_widget_get_base(RectangleWidget *instance)
Get a pointer to the base class instance.
Definition rectangle.c:33
void rectangle_widget_set_border(RectangleWidget *instance, int8_t width, Color color)
Set the border properties of a RectangleWidget instance.
Definition rectangle.c:93
void rectangle_widget_set_background(RectangleWidget *instance, RectangleWidgetBackgroundType type, Color color_start, Color color_end)
Set the background type of a RectangleWidget instance.
Definition rectangle.c:50
RectangleWidget * rectangle_widget_alloc(Widget *parent)
Create a new RectangleWidget instance.
Definition rectangle.c:18
void rectangle_widget_set_size(RectangleWidget *instance, size_t width, size_t height, int8_t radius)
Set the size of a RectangleWidget instance.
Definition rectangle.c:38
RGB color structure.
Definition color.h:42
Definition rectangle.c:7
Definition widget_i.h:35
Base widget class.