Asian Application Developer's Guide

Setting Status and Preedit Styles

The X Window System resource entries in the .Xdefaults resource file specify the status style and preedit style as described in the following sections.

The default CDE settings are overTheSpot and status area.

Status Styles

The Status Area displays which input mode is in effect in the IM server window. You can set the style by entering one of the following lines in the .Xdefaults resource file:

Table 5-1 Status Styles

Status Styles 

X Resource  

callback 

N/A 

status area 

preeditType: overTheSpot

root window 

preeditType: root

Preedit Styles

Many scripts require multiple key strokes to form a single display character, syllable, symbol, ideogram, or other item. Adequate space is needed to display input keystrokes for these languages. For the Asian CDE environment, this intermediate display area is called the preedit area. The preedit area displays intermediate formations of input keystrokes while they are held in a buffer before being committed and sent to the application.

The available styles of preedit area positioning are discussed in the following sections. You can set the style by placing one of the following lines in the .Xdefaults resource file:

Table 5-2 Preedit Styles

Preedit Style 

X Resource 

on-the-spot 

N/A 

over-the-spot 

*preeditType: overTheSpot

off-the-spot 

*preeditType: offTheSpot

root window 

*preeditType: root

On-the-Spot Style

The on-the-spot style in the preedit area is displayed directly in the application window, and grows to the right of the insertion point as text is typed. If existing text is located to the right of the insertion point, that text is moved further to the right, accommodating the expanding preedit text as it is typed. The following shows an example of this style:

Figure 5-6 On-the-Spot Style: Korean

Graphic

Figure 5-7 On-the-Spot Style: Simplified Chinese

Graphic

Figure 5-8 On-the-Spot Style: Traditional Chinese

Graphic

Over-the-Spot Style

As you type text, an over-the-spot style preedit area expands to the right of the insertion point and overwrites any existing display. After you finish typing and processing the preedit area input (in other words, once the text is converted, committed, or otherwise disposed), the processed preedit text is inserted at the insertion point and the preedit area disappears.

Existing text located to the right of the insertion point appears to be overwritten during typing, but when the processed text is inserted at the insertion point, previously existing text is moved and displayed further to the right. This text movement accommodates the input text being inserted.

Using Over-the-Spot Style with Korean Solaris Software

Before you type in an over-the-spot preedit area, the screen should resemble the following:

Figure 5-9 Over-the-Spot Style Before Korean Text is Typed

Graphic

  1. The following figure shows Korean text added on a line of existing text:

    Figure 5-10 Over-the-Spot Style After Korean Input

    Graphic

  2. The following figure shows Korean text after it is committed:

    Figure 5-11 Over-the-Spot Style After Korean Text is Committed

    Graphic

Using Over-the-Spot Style with Simplified Chinese Solaris Software

Before you type text in an over-the-spot preedit area, the screen should resemble the following:

Figure 5-12 Over-the-Spot Style Before Typing Simplified Chinese Text

Graphic

  1. The following figure shows text added at the insertion point on a line of existing text:

    Figure 5-13 Over-the-Spot Style After Typing Simplified Chinese Text

    Graphic

  2. The following figure shows Simplified Chinese text after it is committed:

    Figure 5-14 Over-the-Spot Style After Simplified Chinese Text is Committed

    Graphic

Using Over-the-Spot Style with Traditional Chinese Solaris Software

Before you type in an over-the-spot preedit area, the screen should resemble the following:

Figure 5-15 Over-the-Spot Style Before Typing Traditional Chinese Text

Graphic

  1. The following figure shows text added at the insertion point on a line of existing text:

    Figure 5-16 Over-the-Spot Style After Traditional Chinese Text is Typed

    Graphic

  2. The following figure shows Traditional Chinese text after it is committed:

    Figure 5-17 Over-the-Spot Style After Traditional Chinese Text is Committed

    Graphic

Off-the-Spot Style

An off-the-spot style preedit area is located inside an application window, but it is not at the insertion point. This style preedit area is a permanent part of the application's visual interface. For ease of viewing and consistency, the proposed standard location for off-the-spot preedit areas is in the bottom margin of the application window to the right of the status area.

After you finish typing and processing preedit area input (text converted, committed, or otherwise disposed), the text is sent to the insertion point. Text to the right of the insertion point is moved farther to the right, accommodating the preedit text as it is inserted.

Root-Window Style

A root-window style preedit area is provided by the system's workspace. The proposed standard location of the preedit area is at the bottom of the workspace. Input handling works the same as with off-the-spot style preedit areas.

Figure 5-18 Root-Window Style (Korean)

Graphic

Figure 5-19 Root-Window Style (Simplified Chinese)

Graphic

Figure 5-20 Root-Window Style (Traditional Chinese)

Graphic