ui/gtk/text.h

changeset 32
e5f4d8af567e
parent 29
3fc287f06305
--- a/ui/gtk/text.h	Mon Feb 12 21:13:23 2024 +0100
+++ b/ui/gtk/text.h	Sun Jun 09 15:43:08 2024 +0200
@@ -72,6 +72,31 @@
     // TODO: validatefunc
 } UiTextField;
 
+typedef struct UiPathTextField {
+    UiObject *obj;
+    
+    GtkWidget *hbox;
+    GtkWidget *entry;
+    GtkWidget *buttonbox;
+    
+    char *current_path;
+    UiPathElm *current_pathelms;
+    size_t current_nelm;
+    
+    ui_pathelm_func getpathelm;
+    void* getpathelmdata;
+
+    ui_callback onactivate;
+    void* onactivatedata;
+    
+    ui_callback ondragstart;
+    void* ondragstartdata;
+    ui_callback ondragcomplete;
+    void* ondragcompletedata;
+    ui_callback ondrop;
+    void* ondropdata;
+} UiPathTextField;
+
 UIWIDGET ui_textarea_var(UiObject *obj, UiVar *var);
 void ui_textarea_destroy(GtkWidget *object, UiTextArea *textarea);
 
@@ -110,6 +135,10 @@
 char* ui_textfield_get(UiString *str);
 void ui_textfield_set(UiString *str, const char *value);
 
+int ui_pathtextfield_update(UiPathTextField* pathtf, const char *full_path);
+char* ui_path_textfield_get(UiString *str);
+void ui_path_textfield_set(UiString *str, const char *value);
+
 #ifdef	__cplusplus
 }
 #endif

mercurial