application/main.c

branch
newapi
changeset 414
ef60d527c066
parent 411
3e91b7aff6a1
child 416
89ad8467c39f
--- a/application/main.c	Thu Dec 12 16:34:39 2024 +0100
+++ b/application/main.c	Thu Dec 12 23:23:09 2024 +0100
@@ -490,9 +490,18 @@
     printf("action_button\n");
 }
 
+typedef struct WData {
+    UiString *path;
+} WData;
+
 void application_startup(UiEvent *event, void *data) {
     UiObject *obj = ui_window("Test", NULL);
     
+    WData *wdata = ui_malloc(obj->ctx, sizeof(WData));
+    wdata->path = ui_string_new(obj->ctx, NULL);
+    obj->window = wdata;
+    
+    /*
     ui_grid(obj, .margin = 10) {
         ui_button(obj, .label = "Test Button", .onclick = action_button);
         ui_newline(obj);
@@ -528,8 +537,15 @@
         
         
     }
+    */
+    
     
     
+    //ui_textfield(obj, .varname = "textfield");
+    //ui_textfield(obj, .varname = "textfield2");
+    ui_path_textfield(obj, .value = wdata->path, .hfill = TRUE, .hexpand = TRUE);
+    
+    ui_set(wdata->path, "/test/path/string");
     
     
     ui_show(obj);

mercurial