|
libGumball 0.0.1
C23-Based, libGimbal-powered UI Library
|
Go to the source code of this file.
Macros | |
| #define | GUM_Widget_create(...) |
Type System | |
Type UUID and cast operators | |
| #define | GUM_WIDGET_TYPE |
| #define | GUM_WIDGET(self) |
| #define | GUM_WIDGET_CLASS(klass) |
| #define | GUM_WIDGET_CLASSOF(self) |
Variables | |
Properties | |
Widget properties you can set/get at or after creation. | |
| float | x |
| float | y |
| float | w |
| float | h |
| uint8_t | r |
| uint8_t | g |
| uint8_t | b |
| uint8_t | a |
| uint8_t | border_r |
| uint8_t | border_g |
| uint8_t | border_b |
| uint8_t | border_a |
| uint8_t | border_width |
| float | border_radius |
| bool | border_highlight |
| bool | isRelative |
| GblStringRef * | label |
| GUM_Font * | font |
| GUM_TextAlignment | textAlignment |
| GUM_Texture * | texture |
| uint8_t | font_size |
| uint8_t | font_r |
| uint8_t | font_g |
| uint8_t | font_b |
| uint8_t | font_a |
| uint8_t | font_border_r |
| uint8_t | font_border_g |
| uint8_t | font_border_b |
| uint8_t | font_border_a |
| uint8_t | font_border_thickness |
| uint8_t | z_index |
GUM_Widget data structure and hierarchy graph
GUM_Widget is the most basic, fundamental element.
It is the parent class for all drawable elements in libGumball, holding variables that are common to all drawable elements, such as position, size, and color.
| #define GUM_WIDGET_TYPE |
Returns the GUM_Widget Type UUID.
| #define GUM_WIDGET | ( | self | ) |
Casts an instance of a compatible element to a GUM_Widget.
| #define GUM_WIDGET_CLASS | ( | klass | ) |
Casts an class of a compatible element to a GUM_WidgetClass.
| #define GUM_WIDGET_CLASSOF | ( | self | ) |
Casts an instance of a compatible element to a GUM_Widget.
| #define GUM_Widget_create | ( | ... | ) |
Returns a new GUM_Widget. Optionally takes in a list of Name/Value pairs for properties.
| float x |
Horizontal position of the widget.
Default value is 0
| float y |
Vertical position of the widget.
Default value is 0
| float w |
Width of the widget.
Default value is 200
| float h |
Height of the widget.
Default value is 200
| uint8_t r |
Red component of the widget color.
Default value is 0
| uint8_t g |
Green component of the widget color.
Default value is 255
| uint8_t b |
Blue component of the widget color.
Default value is 0
| uint8_t a |
Alpha component of the widget color.
Default value is 255
| uint8_t border_r |
Red component of the border color.
Default value is 0
| uint8_t border_g |
Green component of the border color.
Default value is 0
| uint8_t border_b |
Blue component of the border color.
Default value is 0
| uint8_t border_a |
Alpha component of the border color.
Default value is 0
| uint8_t border_width |
Width of the border, in pixels.
Default value is 4
| float border_radius |
Radius of the border.
Default value is 0
| bool border_highlight |
If the border should be highlighted.
Default value is false
| bool isRelative |
If the widget's position and size should be relative to its parent.
Default value is false
| GblStringRef* label |
Optional text label of the widget.
Default value is nullptr
| GUM_Font* font |
Optional font for the widget's label.
If not set, the default font is used. Default value is nullptr
| GUM_TextAlignment textAlignment |
Alignment of the widget's label.
Default value is GUM_TEXT_ALIGN_CENTER
| GUM_Texture* texture |
Optional texture for rendering inside the widget.
Default value is nullptr
| uint8_t font_size |
Font size of the widget's label.
Default value is 22
| uint8_t font_r |
Red component of the font color.
Default value is 255
| uint8_t font_g |
Green component of the font color.
Default value is 255
| uint8_t font_b |
Blue component of the font color.
Default value is 255
| uint8_t font_a |
Alpha component of the font color.
Default value is 255
| uint8_t font_border_r |
Red component of the font border color.
Default value is 0
| uint8_t font_border_g |
Green component of the font border color.
Default value is 0
| uint8_t font_border_b |
Blue component of the font border color.
Default value is 0
| uint8_t font_border_a |
Alpha component of the font border color.
Default value is 0
| uint8_t font_border_thickness |
Width of the font border, in pixels.
Default value is 1
| uint8_t z_index |
Z-index of the widget.
The higher the value, the higher the priority. Default value is 50