Drawing Area widget

The Drawing Area widget provides a surface onto which text and graphics can be written. Applications can use Xlib and Xt Intrinsics functions to write into the Drawing Area in order to build a sophisticated graphics application.

The WorkShop Visual Design Area and the Layout Editor are both examples of Drawing Area widgets.

A Drawing Area can contain an arbitrary number of child widgets, which can be positioned using the WorkShop Visual Layout Editor.

In Microsoft Windows mode, the Drawing Area resource panel is very different because of the different way in which events are handled on Microsoft Windows. You are presented with a list of Microsoft Windows message handlers. WorkShop Visual generates a callback for each one of these selected. The callback buttons are pink indicating that they are only relevant on Motif.

For more information on the Drawing Area widget, consult XmDrawingArea(3X) in the OSF/Motif Programmer's Reference.

HINTS

One or more pop-up menus can be defined for a Drawing Area by adding Menu widgets to the Drawing Area. If you press mouse button 3 within your drawing area widget, the pop-up menu will be displayed at the cursor position.

If you have more than one pop-up menu, WorkShop Visual will assume that you want to display the menu which is currently selected (or which contains the currently selected widget). If no menu contains, or is, the selected widget, WorkShop Visual will use the first (leftmost) pop-up menu child of the widget.

The code to display and arbitrate between your various pop-up menus is internal to WorkShop Visual. You must provide some code within your application for the same effect to take place at run-time: add an event handler to catch button press events, then XmMenuPosition(3X) can be used to position the menu at the cursor location.

See also: