<title>Overview</title>
<heading>Overview</heading>

This program shows a scrolled XmText, a single-line XmText and an XmTextField.
The intention is to show Motif's capability of internationalized text input.

For many of the languages in the world, text in that language can be directly 
typed on the keyboard. For others, this is not the case. A character may 
require several keystrokes. This is accomplished by composing or preediting 
text before it is passed to its destination.

The control panels for fonts and colors show how these values are passed to
the input method to give preediting and status areas a look consistent with the
widget which currently has the focus.

<bold>Composing and preediting</bold>

Composing is usually used when a set of key strokes always results in 
the same character. For example, the character å may require three 
keystrokes: Compose Key, a, o.

Preediting is used when the same set of key strokes can result in different
characters. For example, the keystrokes may be a phonetic representation of
a kanji character. However, several kanji characters may use the same phonetic
representation, so the typist must be able to choose the target character
from a list of possible characters.

Both of these may use an input method. For composing, the input method is 
often very simple, and the user may not even notice that one is in use.
The preedit style is usually set to XIMPreeditNone and the status style to
XIMStatusNone. (See Xlib documentation for information on the meaning of these
values.)

When preediting is required, there are a variety of styles. Which styles are 
supported depends on the vendor of your X library and server. Motif supports
three preediting styles and two status style in addition to the two mentioned 
above. 

To find out the current preediting style, select "Input Method" from the Help 
menu. This window will also show the locale the program is running in.

<subtitle>Preediting</subtitle>
<heading>Preediting</heading>

There are two areas visible while doing preediting, the preedit area and the 
status area. These may be separate or joint. The preedit area displays the 
characters before they are committed to the text widget. The status area 
displays information about how the keyboard input is interpreted. The status
area also displays the menu of characters matching the keyboard input when
there are multiple choices.

Preediting styles supported by Motif are:

XIMPreeditPosition (also called over-the-spot)
XIMPreeditArea (also called off-the-spot)
XIMPreeditNothing (also called root)

Status styles are:

XIMStatusArea
XIMStatusNothing

For XIMPreeditNothing/XIMStatusNothing, the input method will create a window
as a child of the root window. This may or may not be visible when preediting
is not in progress. This is where the composed characters and/or the status
information are displayed. 

For XIMPreeditArea/XIMStatusArea, the input method will use the window of
the VendorShell. The shell is resized to allow for at least one line of
text in the font used in the widget with the focus.

For XIMPreeditPosition, the preedited text is displayed in a window placed
on top of the widget. For text widgets, this is at the insertion position of
the widget.

<bold>Choosing preedit style</bold>

The preferred preediting style can be set with the XmNpreeditType resource.
This is a VendorShell resource, and applies to all children of this shell.
(See VendorShell reference page for appropriate values)

<bold>How do I start preediting?</bold>

The actual keystrokes that switches into or out of preediting mode or inserts 
the preedited text in the widget are different for different input methods.
Refer to your vendor documentation for more information on this subject.


