display_accelerator() display_accelerator()
Name
display_accelerator - Core method to display current accelerators.
Synopsis
typedef void (*XtStringProc)(Widget, String);
Widget w;
String string;
Inputs
w Specifies the source widget that supplied the accelerators.
string Provides the string representation of the accelerators that were installed.
Description
The Core display_accelerator() method is registered on the display_accelerator field of the Core class part structure, and is called when
the application installs a widget's accelerators with XtInstallAccelerators() or XtInstallAllAccelerators().
The argument w is the widget instance that has had its accelerators installed, and string is a string representation of the widget's accel-
erator table. Some widget classes will want to display themselves differently when accelerators are installed so that the user is aware
that they are available. (Menu buttons that display their keyboard equivalents are a good example.)
The method is passed a string version of the current accelerator table, in canonical form. This form may differ from the original source
of the accelerator table itself.
The display_accelerator() method is not chained. A widget class can inherit its superclass's display_accelerator() method by specifying
XtInheritDisplayAccelerator in its Core display_accelerator field. A widget that does not wish to display any accelerators may set this
field to NULL.
Usage
The translation table syntax is not particularly easy for a user to read or particularly easy for a widget to convert into a simpler form,
so a widget class may prefer to define a resource which is the string that should be displayed when the accelerator is installed. That way
the application programmer can specify both the accelerator and the representation of the accelerator that the user will see.
None of the Intrinsics or Xaw widget classes define a display_accelerator() method.
See Also
XtInstallAccelerators(1).
Xt - Intrinsics Methods display_accelerator()