GTK is a FOSS toolkit for creating graphical user interfaces on multiple systems, including Linux, UNIX-based systems, macOS, and Windows. A popular Linux tool for visually creating GTK interfaces is Glade.

There’s much criticism over GTK’s lack of documentation, and Glade’s lack of user-friendliness. Many cross-platform apps have since moved to development with Qt, a competing GUI toolkit.

Documentation for GTK3 is here.

Widgets

Top level elements

Container elements

  • GtkStack — A list of pages that are switchable. See GtkStackSwitcher.
  • GtkEntry — A search bar. Completion options possible. Not sure what the difference is between GtkSearchEntry is.

Control elements

  • GtkStackSwitcher — A toggle element to switch between a list of pages on a GtkStack. Must be on the same level as the stack.

Display elements

  • GtkTreeView — A visual display container for GtkListStore and GtkTreeStore objects. Ideal for displaying either lists or hierarchical trees.

Programming

Occasionally functions will require an input of type const gchar* when you have a std::string. This is fine: you just need to convert it to a C-style string with str_name.c_str().