ui/gtk/list.h

changeset 965
5d4419042d9b
parent 937
06e03c7e39db
child 969
7385c26d998d
--- a/ui/gtk/list.h	Sun Dec 07 12:24:12 2025 +0100
+++ b/ui/gtk/list.h	Sun Dec 07 14:39:03 2025 +0100
@@ -38,6 +38,7 @@
 extern "C" {
 #endif
     
+typedef struct UiListView UiListView;
 typedef struct UiColData UiColData;
 
 #if GTK_CHECK_VERSION(4, 10, 0)
@@ -47,11 +48,17 @@
 } UiRowItems;
 #endif
 
-typedef struct UiListView {
+struct UiColData {
+    UiListView *listview;
+    int column;
+};
+
+struct UiListView {
     UiObject          *obj;
     GtkWidget         *widget;
     UiVar             *var;
     UiModel           *model;
+    UiBool            multiselection;
     ui_getvaluefunc2  getvalue;
     void              *getvaluedata;
     ui_getstylefunc   getstyle;
@@ -65,8 +72,9 @@
     CxMap             *bound_rows;
     GListStore        *liststore;
     GtkSelectionModel *selectionmodel;
-    UiColData         *columns;
+    int               *columns;
     int               numcolumns;
+    UiColData         coldata;
     PangoAttrList     *current_row_attributes;
 #else
     int               style_offset;
@@ -85,12 +93,6 @@
     void              *onsavedata;
     UiListSelection   selection;
     
-} UiListView;
-
-struct UiColData {
-    UiListView *listview;
-    int model_column;
-    int data_column;
 };
 
 typedef struct UiTreeEventData {
@@ -136,6 +138,7 @@
 void ui_update_liststore(GListStore *liststore, UiList *list);
 void ui_update_liststore_static(GListStore *liststore, char **elm, size_t nelm);
 
+void ui_listview_update_model(UiModel *model, void *userdata, int insert_index, int delete_index);
 void ui_listview_update2(UiList *list, int i);
 UiListSelection ui_listview_getselection2(UiList *list);
 void ui_listview_setselection2(UiList *list, UiListSelection selection);
@@ -155,6 +158,7 @@
 
 GtkWidget* ui_get_tree_widget(UIWIDGET widget);
 
+void ui_listview_update_model(UiModel *model, void *userdata, int insert_index, int delete_index);
 void ui_listview_update(UiList *list, int i);
 UiListSelection ui_listview_getselection(UiList *list);
 void ui_listview_setselection(UiList *list, UiListSelection selection);

mercurial