gtkgtk#gtk2

What is the advantage/purpose of the GtkToolbar, compared to e.g. a GtkHBox?


I'm working with GTK 2.12, and I'm confused as to what purpose the GtkToolbar widget serves. Is it solely decorative?

Furthermore, I'm told that many useful functions such as append_space (which is something that GtkBoxes sorely lack) are obsolete, while there don't seem to be any substitutes available. Is there some sort of hidden functionality to the widget that's eluding me, or is the Toolbar just a nicer alternative to an HBox?


Solution

  • If you have a look at the documentation, you will find among others a few things that distinguish the GtkToolbar from an HBox:

    GtkToolbar has been clearly intentionally designed to be a distinctive widget; it goes beyond the functionality of a, to say it in GTK documentation language, "convenience widget". Even though most of the functions for GtkToolbar were eliminated in GTK3, the above distinctions still apply.