


7.1 Mouse Properties
This chapter describes how to activate and use a mouse with your COBOL
applications.
ACUCOBOL-GT offers mouse support for both character-based and graphical
environments. (Currently, the MS-DOS, Windows, and Windows NT environments are
supported. Limited mouse support is provided for X terminals if you are using a
curses-compatible mouse. Support for character-based UNIX terminals with ANSI
mouse support is also available, but limited. Support for other host systems may
be added in the future, when their support software becomes available.)
For many applications, ACUCOBOL-GT can provide automatic mouse handling that
simplifies the amount of programming you must do to use the mouse effectively.
This chapter describes which mouse features are automatic when you run your
program with the ACUCOBOL-GT runtime. It also explains how to add other mouse controls--in your COBOL
program and your COBOL configuration file--if you want them.
Note: In character-based environments, such as DOS, the mouse pointer is invisible
by default. In order to make use of the mouse, you'll need to enable it, as
described on page 7-14 (ENABLE-MOUSE). Under graphical environments, such as
Windows, the mouse is always enabled.
A mouse is a device that allows the user to position a pointer on the screen.
A mouse has the following properties:
- The mouse pointer can be positioned anywhere on the physical screen. (Note that this can include regions outside of your application window in a
graphical environment.)
- Under graphical environments, the mouse pointer can have a variety of shapes.
The default shape is typically an arrow. On character-based systems, the
mouse pointer is a square in reverse-video.
- The mouse itself has from one to three buttons on it. These buttons may be
either "up" or "down." We say that a mouse button has been "clicked" if it has
been pushed down and then quickly released. Also, a button may be
"double-clicked" (clicked twice in quick succession). (Note that "up" and "down" are states; "clicking" and "double-clicking" are
transient actions.)
- The buttons are referred to as the "left," "right," and "middle" buttons. A
mouse with two buttons has only "left" and "right" buttons; a one-button mouse
has only a "left" button. Left-handed users typically exchange the meanings of
the left and right buttons, but this is handled outside of the
application--your program refers to the primary mouse button as the "left" button regardless of
the actual button used.
- The mouse pointer is independent from the program's text cursor. Typically,
an application lets the user position the text cursor on the screen by
positioning the mouse pointer at the desired location and clicking the left button.