


7.4 Automatic Mouse Handling
The setting of the MOUSE-FLAGS configuration variable determines whether or
not automatic mouse handlingis used (see the preceding section). By default,
this is turned on.
Automatic mouse handling requires no changes to the COBOL program. It causes
the runtime to interpret any mouse actions that occur within a field that's
being entered by an ACCEPT statement. The runtime processes the mouse actions;
your application doesn't have to do anything. Your application doesn't even have
to be aware that a mouse action has occurred.
The user is able to do the following with the mouse:
- Move the cursor to any position within the current field by moving the mouse
to that location and pressing the left button. The cursor will move to that
location.
- Select a set of characters by moving the mouse to a location in the field,
pressing the left button, and then dragging the mouse to a new location and
releasing the button. The selected characters will be shown in reverse video. The
next character that the user types will replace the selected characters. Also,
if the user types any key associated with the "Delete" action, the selected
characters will be deleted.
- When the application is ACCEPTing a Screen Section item that includes several
fields, jump to another field by moving the mouse to that field and pressing
the left button.
Note: Automatic mouse support takes precedence over other settings. That means
that if a mouse action can be handled by automatic support, it will be. If
automatic support cannot handle the action, and you have unmasked the action, then
your program dictates how it's handled.
In graphical environments, the mouse pointer can assume different shapes.
Whenever the mouse cursor is placed anywhere within the current field, it is shown
as an "I-Bar". This is a vertical bar that's typically used to indicate that
the cursor will be positioned at a particular character if you press the left
button. If you desire, you may change this by using the "MOUSE" configuration
variable described below or by setting the ALWAYS-ARROW-CURSOR option in
MOUSE-FLAGS (see section 7.3.3 in this manual for a description of ALWAYS-ARROW-CURSOR).