Next | Prev | Up | Top | Contents | Index

Primitive Callbacks

Table 4-11 shows the only two callbacks defined for every drawable widget. These callbacks only support the substitution %w to expand the widget path.

Primitive Callbacks
Method NameWhy
helpCallbackThe help key is pressed.
destroyCallbackThe widget is destroyed.

When the Help() action occurs, either through the Help (usually <F1>) key or by a virtual binding, Motif looks for a callback to execute in the current widget. If it finds none, it looks in the parent, the parent's parent, and so on up to the main window. Hence, helpCallback may be used to implement a general or context-sensitive help facility.

The destroyCallback method can be used to call some automatic cleanup procedure when a widget is deleted.


Next | Prev | Up | Top | Contents | Index