Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtInstallAl(3x) — HP-UX 9.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtInstallAccelerators(1)

display_accelerator(4)

 

NAME

XtInstallAllAccelerators − 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 accelerator tables will be detected.  Must be of class Core or any subclass thereof.

sourceSpecifies 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. 

Description

XtInstallAllAccelerators() is a convenience function for installing all accelerators from a widget and all its descendants onto a single destination 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 accelerators for all the buttons of a menu or an entire menu bar onto a single destination widget.  The 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 XtInstallAllAccelerators() 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 keyboard accelerators on the composite widget, and they will be invoked when keyboard events occur anywhere within that widget. 

See Also

XtInstallAccelerators(1),
display_accelerator(4). 

Copyright O’Reilly & Assoc.  —  X Toolkit Intrinsics Reference Manual © O’Reilly & Associates

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026