Data Input Requirements
Input Method (IM)
Some languages, such as Far Eastern languages, use a lot of characters. The concept of Input Method (IM) has been developed to allow entering these characters using the keyboard. An Input Method is a procedure, a macro, or sometimes a separate process that converts keystrokes to characters that are encoded in the code set of the current locale.
On UNIX systems, European Input Methods are directly supported in the X library. However, Far Eastern languages require a separate process to be run.
For these languages, you must have an Input Method (also called a Front-End processor) running on your system, and set your environment accordingly. On UNIX systems, for example, this could mean setting the XMODIFIERS environment variable. Please check your local system documentation to see what needs to be done.
Input through an Input Method server is supported in the following classes:
Any class that uses an
IlvTextField to enter text is also able to use an Input Method server. This is true, for example, for an
IlvMatrix or the
IlvManagerMakeStringInteractor.
Far Eastern Input Method Servers Tested with Rogue Wave Views
On a UNIX system, you can control the way you use your input contexts. The default is to share one input context from the top level window. This means that all the input text areas of this top level window share the input context.
If you want to use different input contexts for each of your input text areas, you can set the ILVICSHARED environment variable to “no”.
On HP-UX, the following IM servers have been tested successfully with Rogue Wave Views:
For Japanese:
xjim,
atok8For Chinese:
xtim,
xsimFor Korean:
xkimOn Solaris, the following IM servers have been tested successfully with Rogue Wave Views:
For Japanese:
httFor Chinese:
httFor Korean:
httOn Windows Rogue Wave Views directly connects to the default IME server.
How to Control the Language Used for Data Input
Any input field object, a subclass of
IlvText or
IlvTextField, will automatically connect to an Input Method (as long as
SetLocale has been called) so that input can be done in the current locale.
If an application wants to disallow this behavior (that is, it does not want localized input, but only ASCII input), it must call the setNeedsInputContext method on the SimpleGraphic object with the parameter value IlFalse.
virtual void setNeedsInputContext(IlBoolean val)
Example
The code sample in samples/foundation/i18n/controlinput creates two text field gadgets. The first text field connects to an Input Method so that input can be done in the current locale. The second text field does not connect to an Input Method, meaning that you may only be able to type English characters in it.
Version 5.7
Copyright © 2013, Rogue Wave Software, Inc. All Rights Reserved.