#linuxprogramming — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #linuxprogramming, aggregated by home.social.
-
The Linux Programming Interface as a university course text
https://man7.org/tlpi/academic/index.html
#HackerNews #LinuxProgramming #Interface #UniversityCourse #Textbook #OpenSource #Education #Programming
-
Question about Gtk programming for Linux experts.Actually, I already asked the question on the Gtk Discourse app, but I am posting it here on the fediverse in the hope that maybe a few more people will see it. I don’t mind if you answer in Discorse or here on the fediverse.
#tech #software #Linux #LinuxProgramming #Gtk #Gtk3
So my goal was to have a read-only
GtkTextViewwidgets in which text can be arranged with layouts like grids, flowbox, vbox, or hbox layouts. Imagine my app to be a textual dashboard where end-users can decide how to place each dashboard widget, following the principles of tiling window managers.I did not have much luck achieving this with
GtkTextViews, so I tried a different approach of addingGtkLabelstoGtkGridandGtkFlowBoxwidgets all with the “selectable” property enabled. So far so good. However the default behavior forGtkGridorGtkFlowBoxseems to always highlight all of the text in the first selectableGtkLabeladded to whatever container I am using. I would instead like for nothing to be selected until it is explicitly selected by the end-user.The attached image shows what the window looks like when it is first made visible and before any user interaction — the upper-left
GtkLabelis highlighted. I would like for this to not happen until the end-user drags over the widget with the mouse, but I am not sure how to go about it.A different but related question: I would also like if the user drags beyond the boundary of a
GtkLabelfor the selection to continue to neighboringGtkLabelwidgets, sort-of like how it works in a web browser. Is there an easy way to achieve this in Gtk without writing lots of custom drag event handlers for all the the widgets I construct in the UI?