Skip to Main Content
Volume 6A: Motif Programming Manual
book

Volume 6A: Motif Programming Manual

by David Brennan, Dan Heller, Paula Ferguson
September 1993
Intermediate to advanced content levelIntermediate to advanced
1014 pages
28h 26m
English
O'Reilly Media, Inc.
Content preview from Volume 6A: Motif Programming Manual
using the encoding for the current locale. To support a number of locales, the application needs to store string data in
separate files from the application code. The application must provide a separate file for each of the locales supported,
so that the program can read the appropriate file during localization.
However, since most Motif widgets use compound strings for representing textual data, a Motif application has to use
compound strings to display text. As we describe compound strings in this chapter, we'll discuss how to use them so
as not to interfere with the lower−level X internationalization features.
20.2 Creating Compound Strings
Almost all of the Motif widgets use compound strings to specify textual data. Labels, PushButtons, and Lists, among
others, all require their text to be given in compound string format, whether or not you require the additional
flexibility compound strings provide. The only widgets that don't use compound strings are the Text and TextField
widgets. As a result, you cannot use the compound string techniques for displaying text using multiple fonts.
However, in Motif 1.2, these widgets do support internationalized text output, so they can display text using multiple
character sets. For information on the internationalization capabilities of the Text and TextField widgets, see Section
#stexti18n.
A compound string (XmString) is made of three components: a tag, a direction, and text. The tag is an arbitrary
name that the programmer can use to associate a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 7A: XView Programming Manual

Volume 7A: XView Programming Manual

Dan Heller

Publisher Resources

ISBN: 9780596000431