Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find good documentation for Gtkmm? [closed]

It seems to be very difficult to find quality documentation on the topic of Gtkmm.

Is there good documentation for Gtkmm? If so, where can I find it?

like image 230
BobMorane Avatar asked Nov 06 '25 18:11

BobMorane


1 Answers

Documentation is certainly not a strength of Gtkmm. Moreover, the Gtkmm API has suffered a lot of changes from one version to another, some of which are not backward compatible. However, there are some sources of information worth knowing about.

The Programming with Gtkmm book

Available here.

As the web page explains:

This book explains key concepts of the gtkmm C++ API for creating user interfaces. It also introduces the main user interface elements ("widgets").

So this is an interesting introduction. Note that provided link only works for the latest Gtkmm version. For older Gtkmm versions, look at the installed documentation using yelp or something similar. You will find the copy of the book for you specific version. You may need to install an extra package to get this (e.g. libgtkmm-3.0-doc on Ubuntu).

The Gtkmm Reference Manual

Available here.

As the web page explains:

gtkmm is the official C++ interface for the popular GUI library GTK+. Highlights include typesafe callbacks, and a comprehensive set of widgets that are easily extensible via inheritance.

This is the Gtkmm API documentation. It basically looks like a Doxygen documentation for Gtkmm. It can be very useful, but is often incomplete. As with the Programming with Gtkmm page, it only provides API documentation for the latest version. Do not neglect the "Related Pages" page, which can be interesting to have a quick overview of the new stuff for a particular version.

This documentation is also available offline, using DevHelp. See this SO answer on how to install it.

The Gtkmm demos

Available here.

As explained in the repository:

These are C++ versions of the C demos that are distributed with gtk+. You will probably find that they are easier to understand, because C++ allows much clearer organization and reuse of code. The gtk-demo contains multiple demos of functionality and APIs that are new in gtk+4.0, and it shows the source code of the demos it is running.

These are Gtkmm examples available in the official Gtkmm repository. They can be downloaded, compiled, and played with, which is very cool. Furthermore, these demos are maintained, which means that they evolve with the Gtkmm versions. This is very useful, since you can go back in time with the repository and play with different API versions. This has saved me a couple times since I needed to use an older API version and found the current API was completely different.

If you do not want to compile them and you have Gtkmm installed, you can also run

gtk4-demo

to launch the demos for your installed Gtkmm version: Gtk demos

In fact, there are several such tools which you can check out here.

The Gtkmm mailing list

Available here.

This mailing-list is about both the use and development of gtkmm the C++ bindings to GTK

I have found some answers in there as well for some specific problems. However, using it directly is rather hard because there is nothing in there to help search specific topics. Most answer I found were the results of Google searches, pointing to some elements of the mailing list.

The GTK documentation

Gtkmm is essentially a C++ wrapper around GTK+ (GTK). This means that the GTK+ documentation can also be useful. I often, for example, use the Widget Gallery for Gtk4 to look at what widgets are available and how they look (For something similar offline, try gtk4-widget-factory from the terminal.

Not that some other wrappers like PyGObject can also be of help. In my experience, however, they are less interesting than the GTK documentation.

Unofficial documentation

Some other web resources are also useful. Here a quick list:

  • The Gnome wiki Gtkmm project page : some random resources not available elsewhere. For example, there is an article on how to use Gtkmm with CMake.
  • The Gedit and Inkscape repositories : These are two successful software using GTK and Gtkmm respectively. I have put the Gedit repository first even if it is written in GTK because it is with this repo that I have found the most answers.
  • The Michal B. GTK playlist : A suite of YouTube videos presenting a lot of good stuff. No in Gtkmm per se, but pretty close (GTK).
  • A bit outdated, but Prof. Stuart Weiss from Hunter College has really nice lecture notes on the topic of GTK+. These notes go in a lot of detais, the kind of details which we really would need in the official documentation, but unfortunately almost never find there.
  • GTK 3 Programming with C and Glade (GTK) - Provided by Lecrapouille.
  • Linux Gtk Glade Programming (GTK) - Provided by Lecrapouille.
  • Follow the gtkmm and gtkmm tags on SO, but also the gtk and gtk3 tags.
like image 80
BobMorane Avatar answered Nov 12 '25 15:11

BobMorane



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!