31
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 28 Jan 2024
31 points (94.3% liked)
Rust Programming
8161 readers
19 users here now
founded 5 years ago
MODERATORS
Thank you, I'll go over them. I think I got a little bit of the basics now. But I need a little advanced knowledge. And most tutorials seems to be for gtk3 and many widgets are now deprecated.
Originally my plan was to make each slide edited separately when you right click and do edit. And be able to drag them up and down and everything, but my skills were not enough. After trying to make that for a week I gave up and made this simpler version. So listview and treeview models from that tutorial could give me more info.
My experience is very limited, especially on GTK3; but I think GTK4 really streamlined listview/model operations, especially with the newly introduced GtkExpression, & the ability to bind GObject properties to expressions that the toolkit will figure out when to evaluate & plug in.
The following blog entries help establish the fundamental concepts pretty well, I think: https://blog.gtk.org/2020/06/07/scalable-lists-in-gtk-4/ https://blog.gtk.org/2020/06/08/more-on-lists-in-gtk-4/ https://blog.gtk.org/2020/09/08/on-list-models/ — but the crux of the matter really is GObject, & signalling; & ToshioCP's tutorial fills an important gap in the existing body of documentation.
Also, the Lists section on the Gtk4 Demo app is really helpful (e.g., the comments on the 'Clocks' example explain how to use GtkExpression really well: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/demos/gtk-demo/listview_clocks.c?ref_type=heads#L2 ).
-- EDIT: Also, I think the new GJS 'GTK4 Book' does a good job explaining the new widgets & data structures -- so even if you aren't using the JS bindings, the code examples can be helpful: https://rmnvgr.gitlab.io/gtk4-gjs-book/application/list-widgets/ ; I never used GJS (just C, and pygobject); but the GJS book helped me quite a bit wrt the ListStore, and setting up DBus connectivity:
Thank you. I've been using grk4-rs so I went over their examples and the book. Looking at the c examples might be good as well. And I'll learn about the GObjects. So far I've been winging it based on examples I see and the properties of different classes.