Debian Codegraph @

blog/_posts/2022-08-27-GTK4-Coot-Progress.md

raw
1 ---
2 layout: post
3 title: "GTK4 Coot Progress"
4 date: Sat 27 Aug 04:13:20 BST 2022
5 ---
6
7 So the way forward for _Coot_ on MacOS is to use GTK4 (instead of Gtk3) for the GUI. And
8 that means a whole nother rewrite. Oh boy. Oh well, in we go then (I had known that GTK4
9 was in Coot's future because it's the route to Vulkan and all those new graphical goodies
10 you can do on the graphics card now, but had not planned to start on it for a few years).
11
12 Turns out that GTK4 is new technology and there is not much documentation or help
13 especially in the areas of the Python API, OpenGL and deployment on MacOS. At times it has
14 been frustrating and slow-going.
15
16 Until very recently there was no way to edit the XML for the gui description for GTK4
17 applications other than "by hand" - i.e. there was no RAD Tool (because Glade doesn't work
18 for GTK4). Had you asked me three months ago if it was possible to edit the GUI by
19 editing its XML file I would have said "No way! Are you crazy?".
20
21 But after a couple of months, it turns out that it is nowhere near as hideous as I had
22 thought though.
23
24 Maybe Cambalache can help. I am looking forward to trying out Cambalache - But at the
25 moment, I can't work how to install the new version without reinstalling the OS. So that
26 has stalled until I sort that out.
27
28 So... what has happen in the last couple of months?
29
30 - I have got Python booting, and got PyGObject working (it was extremely tricky to
31 compile) and they are big steps forward. Now the Python-based gui tools are in play.
32
33 - The Basic framebuffer works and we can draw and see molecules.
34
35 - (However the effects framebuffers (_i.e._ "Fancy" style) are proving to be
36 frustratingly difficult to get working.)
37
38 - Martin Noble's MoleculesToTriangles has been incorporated.
39
40 - The gestures and event controllers have been rewritten from scratch (mostly complete
41 now). That means we can recentre, rotate, zoom and click on atoms.
42
43 - The gui buttons are about 80% done. Refinement works and Delete works. Rotation,
44 Translation and Chi angles do not (yet).
45
46 - I am trying to reduce the number of dialogs as I go. New interfaces will be revealers or
47 overlays as much as possible. If there is going to be a dialog, it will be a transient
48 (no more dialog windows hidden under the main window).
49
50 - The interface has changed to "select first" - _i.e._ bring the residue of interest to the
51 centre of the screen and act on it with the tool of choice. No residue picking needed
52 (except for residue range operations). You heard it here first.
53
54 - While the menu system has been rewritten from scratch (there are 170 menus), only a few
55 of the actions have been connected up. There are around 1500 dialog widget event controller
56 to either edit or rewrite.
57
58 ![Select First Functions]({{"../../../images/SelectFirstRefinement.png"}})
59
60
61 You can follow the progress of this project - it's the **gtk4** branch of _Coot_ on github.
62
63 You can build binaries on MacOS using Homebrew quite easily using
64 cootgtk4.rb. See **Issue 33** on _Coot_ github page if you want to try
65 that.