From 9753e4c6e1614294ea7a4e1659a6277b302d0529 Mon Sep 17 00:00:00 2001 From: neox Date: Mon, 12 Feb 2024 11:40:46 +0100 Subject: [PATCH] Whole list but not tree --- gtk_treeview_example | Bin 27416 -> 27816 bytes main.c | 58 +++++++++++++++++++++++++++++++------------ 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/gtk_treeview_example b/gtk_treeview_example index 7cf9d97d477d5a38a12cff81bca9b54c13494dd8..4f010f515db0e5c8f2dab755b3492f33b3f147aa 100755 GIT binary patch delta 10605 zcmZ{K2|SeF_y5eunq79u9?~$%5@GBkyX;HIF4?kX8HEZ7Jrt5qC?wHFvZS&k5ecP` z7$tjIvi$Dz7=5bm|9`#iJ#U^{60y>1o(u!}}WEG)P=tV(s+$JZE!y^}4 zG;&jnimb}QNTY2;0V_ck?E+K)RAx{)K!pnnsA8ZBfr0Gc`kHGxQr;TC#C$%VcRbx}&ARS>B(f;fR(pNCjzxDZ|wY3&gy zJ8T`@4@;m_DlT*nBK-gfQcI)xkdZrq&1Vn`7|$O;(dckNnbb0nq9zymDT3xj>`@?= zZi7)OS=_?>oqb*10v$cvf*gaw{oSBC8bj!TJ`2A`&@soLKsPr>AFmTZj)8umjwb+w zjCX|&(sJ|st%fc9R-4e8aQv^@E6D9QbcI%m_4lx_O&{l@Za&bYo&YpLdy!^K1s$V1 z0QJyGviS!Goj`%c#nU+uwJw<~E z+YUAljz75EOS=TNo&v>AmId>8fiS?J1mFz@WyTnfP&hu|z27QJf5_qZL_q;e-#`R7 zFmpoo%=8TYCU^u2#|(W{GBX9{xPa+@A~;C5iufOLku4#hGJnY7fZi&Kf5_q6W~<=; zkc(HPvA*11DS*cqZio(GQ7BLN)|lvA+t}C;eFO9G%{I}1@NF;;do)pj@K0eL_GBUt z;cH+X_Fy6vQW4^zrkB8@HrREcBSON8)?iSA3fu;otBq4T^nUD~*MA`vd{2NpNr3!PhWCJK60rX7LCc#|~ zL63y*q1mD1B72GBzkrS`e-Ey|p;Lcb6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(%o)>utdFzCiU%`_a_qe{Dbv{;F z>Yzj9IjG~TtaW&O*wM8^;Gmb3M2N?dbI5k3^01*mmJ;v2FKc(Rly6D2o#A_tV1J*7 zWg({E)?p-KxAo(Q`z3#!PxizTe^y)@%dYLrN<=mY`X`o(%km#p7TJsWrd7@%@zq|( z-AU@xCBbNJ4n^#fySNJ0VV5u#9eRNTv$%#k$B8?IE^doK@1eWpd$;(aCrcnJQzauo zic7IpGt$w1X`kSojI&X}j*+2?gmZU@?=wnNhCG|g)9bXYs-m9WSYmK7;7Hd$AODWk zLpBW8T07OB9ULV%g({qg?$|uO{IVeHyx#HF??*<(I1KcN3vn2Zg5lxCi%ilT`|OY{ z%+b6=moFQeGh!3EN7rMQ3HmW}>z7_9eF_zrFG(r&eXDWcs^cWqI%=Ph+UbPsdJi=T zefEK<@voVK>zX~w5n{D%=NBGi@-T^do)0&*ML-8Ba(wg|Iba^%rqpQceuvvlS z{APCb4>EHStgzZ75;?#Pw(&=9&A-2WAs3d3_WZZq9gLbmke+X5SIsqY29gq{~w;m>2CJ=Z>FKn%{RZuIIIy7oSv?Uu~T9 zj-b3}Szb?S`qlOt`)jLwtWLTWMV?daRJA@eDP+j}Hp7n*leXz-Q~yo7qA{t-kb%oa zq98bCBJ#xjh>PPFPTe$oGUIJ``MvZy|7IOmE_v%aW#{lif(D-B6N$vCN)3Vc#;#hy zEpJqNwLKCu<~3h(H0QLU(O*Yw$&-`1hFYHy7E>~9hJEKww#{vSlya*))@~kSt*@Dx z>n?B*b8$J@|GXt3)iaAbAa6X&05ub*SG=&U`>TlMe% z|435(6*EHS-rzqzwBrJB_LAsrjI@SQJ;WfAHz(Jx^NU~q^GSv3t{C7b(KQx;g iBb5VRAq&J8poqC;Lgf%3vw&U99d1<09tkmfi2fgMo23Z= diff --git a/main.c b/main.c index b2f108b..34a7cd7 100644 --- a/main.c +++ b/main.c @@ -78,12 +78,17 @@ GListModel* get_children_model (struct TreeNode_t *parent) GtkStringList *list = gtk_string_list_new(NULL); if (parent) { + printf("[get_children_model] here is %s content : ", parent->text); + child = parent->child; while(child) { gtk_string_list_append(list, child->text); + printf("%s ", child->text); child = child->next; } } + printf("\n"); + return G_LIST_MODEL(list); } @@ -93,30 +98,47 @@ GListModel* create_model_func(GObject *item, gpointer user_data) struct TreeNode_t *cur = root; gchar *string = gtk_string_object_get_string(GTK_STRING_OBJECT(item)); - if (strcmp(string, "Child 1")) { + if (strcmp(string, "Root") == NULL) { + cur = root; + } + else if (strcmp(string, "Child 1") == NULL) { cur = root->child; } - else if (strcmp(string, "Child 2")) { + else if (strcmp(string, "Child 2") == NULL) { cur = root->child->next; } else { cur = NULL; } + printf("[create_model_func] here is %s item\n", string); + return get_children_model(cur); } void setup_factory (GtkListItemFactory *factory, GtkListItem *list_item, gpointer user_data) { - GtkWidget *label = gtk_label_new(NULL); - gtk_list_item_set_child(list_item, label); + GtkWidget* expander = gtk_expander_new (NULL); + gtk_list_item_set_child (list_item, expander); + printf("[setup_factory] here is an expander\n"); } void bind_factory (GtkListItemFactory *factory, GtkListItem *list_item, gpointer user_data) { - GObject *item = gtk_list_item_get_item(list_item); - const gchar *text = gtk_string_object_get_string(GTK_STRING_OBJECT(item)); - GtkWidget *label = gtk_list_item_get_child(list_item); - gtk_label_set_text(GTK_LABEL(label), text); + GObject *item; + const gchar *text; + GtkTreeListRow *row = gtk_list_item_get_item(list_item); + + if (row != NULL) { + gboolean is_expanded = gtk_tree_list_row_get_expanded(row); + text = gtk_string_object_get_string(GTK_STRING_OBJECT(gtk_tree_list_row_get_item(row))); + GtkWidget *expander = gtk_list_item_get_child(list_item); + gtk_expander_set_label(GTK_EXPANDER(expander), text); + printf("[bind_factory] here is %s content\n", text); + gtk_tree_list_row_set_expanded(row, !is_expanded); + //g_object_unref(row); // Decrease the reference count when done + } else { + printf("[bind_factory] here is NON %s content\n", text); + } } // Application activation callback @@ -129,24 +151,28 @@ void app_activate (GApplication *app, gpointer user_data) GtkStringList *model = gtk_string_list_new(NULL); gtk_string_list_append(model, root->text); + // Create and setup the list view and item factory + GtkListItemFactory *factory = gtk_signal_list_item_factory_new (); + g_signal_connect (factory, "setup", G_CALLBACK(setup_factory), NULL); + g_signal_connect (factory, "bind", G_CALLBACK(bind_factory), NULL); + // Create a GtkTreeListModel GtkTreeListModel *tree_model = gtk_tree_list_model_new( G_LIST_MODEL(model), - TRUE, // Passthrough - False in actual usage with dynamic children retrieval - TRUE, // autoexpand + FALSE, // Passthrough - False in actual usage with dynamic children retrieval + FALSE, // autoexpand (GtkTreeListModelCreateModelFunc)create_model_func, NULL, - NULL //(GDestroyNotify)free_tree_node + NULL //(GDestroyNotify)free_tree_node ); - // Create and setup the list view and item factory - GtkListItemFactory *factory = gtk_signal_list_item_factory_new(); - g_signal_connect(factory, "setup", G_CALLBACK(setup_factory), NULL); - g_signal_connect(factory, "bind", G_CALLBACK(bind_factory), NULL); + GtkNoSelection *selection_model = gtk_no_selection_new ( + G_LIST_MODEL (tree_model)); - GtkWidget *list_view = gtk_list_view_new(GTK_SELECTION_MODEL(gtk_no_selection_new(tree_model)), factory); + GtkWidget *list_view = gtk_list_view_new (selection_model, factory); gtk_window_set_child(GTK_WINDOW(window), list_view); + gtk_widget_set_visible(window, TRUE); }