Name
XtAugmentTranslations — nondestructively merge new translations with widget’s existing ones.
Synopsis
void XtAugmentTranslations(w, translations)
Widget w;
XtTranslations translations;
Arguments
wSpecifies the widget into which the new translations are to be merged.
translations
Specifies the compiled translation table to merge in (must not be NULL).
Description
XtAugmentTranslations nondestructively merges translations into a widget’s existing translations, ignoring any #replace, #augment, or #override directive that may have been specified in the translation string. If translations contains an event or event sequence that already exists in the widget’s translations, then the new translation is ignored.
The translation table must be in compiled form, as produced by XtParseTranslationTable.
Translation tables can also be constructed by converting resources. To make it easy to modify translation tables in resource files, the string-to-translation-table resource type converter allows you to specify whether the table should replace, augment, or override any existing translation table in the widget. As an option, a pound sign (#) as the first character of the table followed by replace (default), augment, or override indicates how to treat existing translations.
The replace or merge operation is performed during the Core instance initialization and during the Core set_values invocation. At instance initialization the widget class translation table (if any) is copied into the widget prior to a merge operation. The merge operation produces a new translation resource value; if the original table was shared by other widgets, they are unaffected.
To merge new translations but keep existing translations in case of conflict, use XtAugmentTranslations. To completely remove existing translations, use XtUninstallTranslations.
XtParseTranslationTable produces the binary form of the translation table from text. XtConvert can also do the conversion, specifying XtRTranslationTable as the destination resource type. A text translation table is automatically parsed in the Core widget structure when a widget class is initialized.
See Also
XtConvertAndStore(1), XtOverrideTranslations(1), XtParseTranslationTable(1), XtUninstallTranslations(1).