XtInstallAllAccelerators()XtInstallAllAccelerators()NameXtInstallAllAccelerators - install all accelerators from a widget and
its descendants onto a destination widget.
Synopsis
void XtInstallAllAccelerators(destination, source)
Widget destination;
Widget source;
Inputs
destination
Specifies the widget in which events specified in the accel‐
erator tables will be detected. Must be of class Core or any
subclass thereof.
source Specifies the root widget of the widget tree from which the
actions of any descendant widget can be invoked when events
occur in destination. Must be of class Core or any subclass
thereof.
DescriptionXtInstallAllAccelerators() is a convenience function for installing all
accelerators from a widget and all its descendants onto a single desti‐
nation widget. It recursively traverses the widget tree rooted at
source and installs the accelerator resource values of each widget onto
destination. It also calls the display_accelerator() method of each
widget in the source tree that has one.
Usage
A common use for XtInstallAllAccelerators() is to install the accelera‐
tors for all the buttons of a menu or an entire menu bar onto a single
destination widget. The XtNaccelerator resource of each button would
be specified when the button was created or would come from the
resource database, and the single call to XtInstallAllAccelerators()
would make all those accelerators available in a widget.
Note that if you want to provide keyboard shortcuts for a menu system
from within two different text widgets, you will have to call XtInstal‐
lAllAccelerators() twice.
Also note that if a widget is not interested in events of a certain
type, then those events will propagate up the widget hierarchy to the
first ancestor widget that is interested. If your interface contains a
composite widget that contains only button and other widgets that are
not interested in keyboard input, then you can install a set of key‐
board accelerators on the composite widget, and they will be invoked
when keyboard events occur anywhere within that widget.
See AlsoXtInstallAccelerators(1),
display_accelerator(4).
Xt - Translations and Actions XtInstallAllAccelerators()