Shells are widgets whose main purpose is to communicate with the window manager. Most shells have only one child, and they maintain the same size and position as the child. Specialized Motif shells exist to envelop applications , dialogs , and menus . Defining a widget hierarchy is one of the two main tasks of a Motif application. The other is to define a set of callback procedures .
Callbacks are the primary means by which the application responds to user input.
When the user takes an action like pressing a key or a mouse button, the X server sends the application an event . Xt dispatches these events to the appropriate widget, usually the one to which the user directed the input. Xt maps the event to one or more widget action routines . Many Motif widgets have resources that are lists of callback procedures. Motif invokes a list of callbacks when the user takes an action that has a particular meaning.