GTK+ Overview

GTK+ is built on the concept of inheritance (or, more correctly, sub-classing), although the toolkit itself is C-based. Widgets are the basis of other widgets, and some widgets are container widgets. Even the “form” or main window of a program is a widget. Widgets emit signals (events) that are caught and handled by the signal handler and passed to the correct “callback,” or function.

The Phases of a GTK+ Program

GTK+ programs operate in several distinct phases. First, you must create the widgets and set them to display as needed. You must then tell the program what signal to look for from which widget, and what function to run when that signal is emitted. Then you must explicitly show the widget (or show its parent, which will ...

Get MySQL Building User Interfaces now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.