The general steps to creating a widget in GTK are:
Creation - one of various functions to create a new widget. The returned widget is an object and you can use it to get/set values or do something. These are all detailed in this section.
Set the attributes of the widget. This can be done on widget creation.
Pack the widget into a container using the appropriate call such as add or pack method. This can be done on widget creation.
Connect all signals and events we wish to use to the appropriate handlers.
If it is toplevel window, show() the widget. Except toplevel window, show is default.
show method lets GTK know that we are done setting the attributes of the widget, and it is ready to be displayed. You may also use hide metehod to make it disappear again. The order in which you show the widgets is not important, but I suggest showing the window last so the whole window pops up at once rather than seeing the individual widgets come up on the screen as they’re formed. The children of a widget (a window is a widget too) will not be displayed until the window itself is shown using the show() method.
Type conversion
The class hierarchy tree used to implement widgets.
The following widgets do not have an associated window.
Structure of widgets