XmImGetXIM()
XmImMbLookupString()
XmImVaSetFocusValues()
XmImVaSetValues()
These routines simplify the interaction with the lower−level XIM and XIC constructs provided by Xlib. If you need to
provide text input in another widget, such as a DrawingArea, you have to handle opening an input method, creating an
input context, and obtaining input from the input method yourself. If you have access to the source code, you may
want to investigate these routines. The only danger is that because the routines are undocumented, they may change in
the next release of Motif.
15.7 Summary
The Motif Text and TextField widgets can be used to provide an application with sophisticated text entry capabilities.
The widgets come with a full set of convenience routines that make it easy to perform a number of standard text
editing tasks. However, these widgets work best when they are left alone to do their jobs. While they are highly
configurable, the little bits of fine tuning you add may cause your code to grow twice as much to accommodate the
new features and the necessary error checking.
15.8 Exercises
The following exercises are designed to expand on the ideas described in this chapter and introduce some new
directions for using Text widgets.
Using the XmNmodifyVerifyCallback, you can add more data to a Text widget than what is typed by
the user. This technique is useful for supporting advanced editing features such as file or word completion.
The user should be able to enter the leading part of a word and then ...