|
PatchworkOS
|
Widget element wrappers. More...
Functions | |
| element_t * | button_new (element_t *parent, element_id_t id, const rect_t *rect, const char *text, element_flags_t flags) |
| Create a new button element. | |
| element_t * | label_new (element_t *parent, element_id_t id, const rect_t *rect, const char *text, element_flags_t flags) |
| Create a new label element. | |
Widget element wrappers.
These functions create common widget elements such as buttons and labels by creating elements with predefined procedures and private data.
| element_t * button_new | ( | element_t * | parent, |
| element_id_t | id, | ||
| const rect_t * | rect, | ||
| const char * | text, | ||
| element_flags_t | flags | ||
| ) |
Create a new button element.
| parent | The parent element. |
| id | The element ID. |
| rect | The rectangle defining the button's position and size. |
| text | The button's text. |
| flags | Element flags. |
NULL and errno is set. Definition at line 308 of file button.c.
References button_procedure(), element_new(), and NULL.
Referenced by numpad_button_create(), popup_procedure(), start_menu_load_entries(), taskbar_entry_add(), taskbar_procedure(), and window_deco_init_controls().
| element_t * label_new | ( | element_t * | parent, |
| element_id_t | id, | ||
| const rect_t * | rect, | ||
| const char * | text, | ||
| element_flags_t | flags | ||
| ) |
Create a new label element.
| parent | The parent element. |
| id | The element ID. |
| rect | The rectangle defining the label's position and size. |
| text | The label's text. |
| flags | Element flags. |
NULL and errno is set. Definition at line 45 of file label.c.
References element_new(), label_procedure(), and NULL.
Referenced by procedure(), and taskbar_procedure().