field_char_get()

Purpose

Returns input characters from a field

Syntax

void pascal field_start(int mapnr,int fieldner,
int flags)

Parameters

int mapnr

Number of map

 

int fieldnr

Number of field

 

int flags

Determines how function is used; see below

 

The parameter flags may take any of the following values:

 

Value

Meaning

 

insert_mode

This is used to toggle the cursor between overtype and insert mode shapes. Pass TRUE for the insert_mode caret and FALSE for the overtype caret

 

row, column

On return these may be filled in with the position of the caret in the field or with information indicating that another control has gained input focus. See Description below.

Description

The return value of the function field_char_get() is the character the user inputs, subject to the following exceptions:

  • Key presses of GR_REDIR (normally<Ctrl+B>) are not returned, but are used for the redirect program
  • If the user uses the mouse to move around within the field, this information is not returned to the program immediately. After each key press, however, row and column contain the character coordinates of the caret.
  • If the user clicks outside the control, the value GR_MDOWN, GR_DRAG or GR_MOUSE is returned to the program, depending on how the left mouse button was used. row and column now contain information about the control where the cursor is now located, as follows:
    • if row = -1, the mouse is outside all controls
    • if row >0, the mouse is being clicked on a control within the map whose number is contained in row

    • if row < 0 and > GR_FUNC, the mouse is being clicked on a map whose activating function key is contained in row. So clicking on a map having an activating function key or for which map_alter() has been used with MA_ACTIVATOR returns information of this sort.

    In the last two cases column contains the field number associated with the control

See also

field_start(), field_end()

Example

See the example given under field_start()