An X application is basically a collection of widgets that are linked together in various ways.
Widgets depend on each other.
Suppose, for example, that we have an application which at some point displays a window with a number of check boxes in a panel and a few command buttons. In this example, the panel and the command buttons would depend on the window, and the check boxes would in turn depend on the panel. You can see a part of the widget tree for the Unix xcalc program here . This tree was created by the editres program, a utility that you get with every reasonable X distribution. There are two mechanisms in X for this, callbacks and events .