Platform |
Win32, x64 |
Purpose |
To select a 'rubber-band' mode for a %gr (Graphics Region) region. |
Syntax |
SUBROUTINE SET_GRAPHICS_SELECTION@( MODE ) |
Description |
MODE can be any of the following: |
0 |
No selection |
|
1 |
A rectangular box is drawn whilst the left mouse button is mouse is held down. |
|
2 |
A straight line is drawn whilst the left mouse button is mouse is held down. |
|
3 |
Extended cross hairs are drawn whenever the cursor is in the graphics region. |
|
4 |
Like MODE = 1 but the box is invisible. |
|
This routine is used when mouse input is processed within a %gr (Graphics Region) drawing surface. It remains local to the current drawing surface selected with SELECT_GRAPHICS_OBJECT@. Mode 1 makes a box appear whenever the left mouse button is pressed. The corner of the box will stay anchored to that point until the mouse button is released. The other corner will follow the mouse cursor around the drawing surface until the mouse button is released. By processing the mouse state and the released information it is possible to determine the co-ordinates of the selected region. Mode 2 is similar to mode 1 but a straight line joins the first point to the second whilst the left mouse button is held down. Mode 0 deactivates the box and line high-lighting mechanism. All the lines are drawn on to and removed from the display with an XOR write which prevents the destruction of any underlying graphics. It is important to note that you should only call this routine once for each line mode change required. |
See also |
|
Example |
See Graphics selections. |