Asks the application to move the text cursor.
The IMTextCursor subroutine is called by the Input Method when the Cursor Up or Cursor Down key is input to the IMFilter and IMLookupString subroutines.
This subroutine sets the new display cursor position in the text area to the integer pointed to by the Cursor parameter. The cursor position is relative to the top of the text area. A value of -1 indicates the cursor should not be moved.
Because the input method does not know the actual length of the screen it always treats a text string as one-dimensional (a single line). However, in the terminal emulator, the text string sometimes wraps to the next line. The IMTextCursor subroutine performs this conversion from single-line to multiline text strings. When you move the cursor up or down, the subroutine interprets the cursor position on the text string relative to the input method.
This subroutine is provided by applications that use input methods.
Item | Description |
---|---|
IM | Indicates the Input Method instance. |
Direction | Specifies up or down. |
Cursor | Specifies the new cursor position or -1. |
UData | Specifies an argument passed by the IMCreate subroutine. |
If an error occurs, the IMTextCursor subroutine returns the IMError global variable. Otherwise, the IMNoError value is returned.