12 Labels and Buttons
This chapter contains an in−depth look at the label and button widgets provided by the Motif toolkit. These widgets
are the most commonly used primitive widgets.
Labels and buttons are among the most widely used interface objects in GUI−based applications. They are also the
simplest in concept and design. Labels provide the basic resources necessary to render and manage text or images
(pixmaps) by controlling color, alignment, and other visual attributes. PushButtons are subclassed from Label; they
extend its capabilities by adding callback routines that respond to user interaction from the mouse or keyboard. These
visual and interactive features provide the cornerstone for many widgets in the Motif toolkit, such as CascadeButtons,
DrawnButtons, and ToggleButtons.
This chapter also discusses ArrowButtons. While the ArrowButton is not subclassed from Label like the other buttons,
it does provide a subset of the interactive capabilities of the other buttons. ArrowButtons do not contain text or
graphical labels; they simply display directional arrows that point up, down, left, or right. These widgets are meant to
act as companions to other interface objects whose values or displays can be controlled or changed incrementally by
the user. An example might be four ArrowButtons that are used to represent directional movement for the display of a
bitmap editor.
Although CascadeButtons are subclassed from the Label widget, they are specifically used in Motif menus and are not ...