Xt provides a library of user-interface objects called widgets and gadgets , which provide a convenient interface for creating and manipulating X windows, colormaps, events, and other cosmetic attributes of the display. In short, widgets can be thought of as building blocks that the programmer uses to contruct a complete application. A widget operates independently of the application, except through prearranged interactions. For example, a button widget knows how to draw itself, how to highlight itself when it is clicked on with the mouse, and how to respond to that mouse click.
Resources are public widget variables.
Motif uses a parent-child hierarchy of components created to form interface. Important Terms Resources of a widget are the variables that can be set to control the appearance or behavior of the widget. The callback resource is a particularly important type of resource. It established the communication between the widget and the application program. It is the routine that is called with the widget is activated.