ui/common/wrapper.c

changeset 654
e379d2e3c1b3
parent 641
0bce3325d255
child 655
453a782b0e22
--- a/ui/common/wrapper.c	Sat Jul 12 15:07:27 2025 +0200
+++ b/ui/common/wrapper.c	Sat Jul 12 15:44:06 2025 +0200
@@ -27,6 +27,7 @@
  */
 
 #include "wrapper.h"
+#include "ui/tree.h"
 
 /* ---------------------------- UiObject ---------------------------- */
 
@@ -86,3 +87,30 @@
 int ui_event_get_set(UiEvent *event) {
     return event->set;
 }
+
+
+/* ------------------------- SubListItem (public) ------------------------- */
+
+void ui_sublist_item_set_icon(UiSubListItem *item, const char *icon) {
+    item->icon = icon ? strdup(icon) : NULL;
+}
+
+void ui_sublist_item_set_label(UiSubListItem *item, const char *label) {
+    item->label = label ? strdup(label) : NULL;
+}
+
+void ui_sublist_item_set_button_icon(UiSubListItem *item, const char *button_icon) {
+    item->button_icon = button_icon ? strdup(button_icon) : NULL;
+}
+
+void ui_sublist_item_set_button_label(UiSubListItem *item, const char *button_label) {
+    item->button_label = button_label ? strdup(button_label) : NULL;
+}
+
+void ui_sublist_item_set_badge(UiSubListItem *item, const char *badge) {
+    item->badge = badge ? strdup(badge) : NULL;
+}
+
+void ui_sublist_item_set_eventdata(UiSubListItem *item, void *eventdata) {
+    item->eventdata = NULL;
+}

mercurial