Name
XtOverrideTranslations — merge new translations, overwriting widget’s existing ones.
Synopsis
void XtOverrideTranslations(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
XtOverrideTranslations merges new translations into the existing widget translations, overriding the translations for any event or event sequence that already exists in the widget’s translations, and possibly adding new ones. XtOverrideTranslations ignores any #replace, #augment or #override directive that may have been specified in the translation string.
The translation table must be in compiled form, as produced by XtParseTranslationTable. XtParseTranslationTable produces the binary form of the translation table from text. XtConvertAndStore can also do this, 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.)
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 replace a widget’s translations completely and not just selectively overwrite some of them, use XtSetValues on the XtNtranslations resource and specify a compiled translation table as the value.
To completely remove existing translations, use XtUninstallTranslations.
See Also
XtAugmentTranslations(1), XtConvertAndStore(1), XtParseTranslationTable(1),
Core(3), Text(5).