DrawingArea is a manager with little specific behavior of its own. It provides basic geometry management for widget and gadget children. It also has callback lists that provide the application with low-level event handling. An application can use these features to implement a canvas or a more specialized widget. Of course, you may also want to write your own widget rather than trying to add specific features to DrawingArea. (See the Motif Widget Writer's Guide for details.)
By default, a DrawingArea attempts to adjust its size to contain all its children just inside its margins. The DrawingArea resource XmNresizePolicy determines how the DrawingArea responds to geometry requests from its children. This resource has three possible values:
The DrawingArea resources XmNmarginHeight and XmNmarginWidth also affect geometry management. When the value of XmNmarginHeight is greater than 0, the DrawingArea ensures that the top edges of all children are inside the top margin. When the value of XmNmarginWidth is greater than 0, the DrawingArea ensures that the left edges of all children are inside the left margin.
See Chapter 14 for more information on DrawingArea's geometry management.