3 writing code compatible with decwindows eve, 1 select ranges in decwindows eve – Compaq DEC Text Processing Utility AA-PWCBD-TE User Manual
Page 113
DEC Text Processing Utility Program Development
5.3 Writing Code Compatible with DECwindows EVE
5.3 Writing Code Compatible with DECwindows EVE
This section provides information useful for programmers who extend
DECwindows EVE or layer applications on DECwindows EVE.
5.3.1 Select Ranges in DECwindows EVE
This section is intended for programmers who are extending EVE or layering an
application on EVE.
There are four possible types of selection:
•
Dynamic selection
•
Static selection
•
Found range selection
•
DECwindows primary or secondary global selection
EVE can use only one type of selection at a time. The ways in which these
selections differ are explained in the following sections.
EVE has a routine called EVE$SELECTION that returns the current selection,
regardless of whether the selection is dynamic, static, formed from a found
range, or the primary global selection. You can use the SELECT_RANGE
built-in procedure to get the current selection if the selection is a dynamic
selection. However, Compaq recommends that you use EVE$SELECTION to
get the current selection because this routine returns the current selection
regardless of how it was created. To see how the EVE$SELECTION routine
works and what parameters it takes, see the code for this routine in
SYS$EXAMPLES:EVE$CORE.TPU.
5.3.1.1 Dynamic Selection
When you press the Select key or invoke the SELECT command, EVE creates a
dynamic selection. A dynamic selection expands and contracts as you move the
text cursor. Moving the text cursor away from the text already selected does not
cancel the selection. If you use the mouse to start a selection while a dynamic
selection is active, the dynamic selection is canceled.
If EVE’s current selection is a dynamic selection, the routine EVE$SELECTION
returns the selected range and terminates the selection. If, for some reason, you
want to use a statement that returns the current dynamic selection but does not
terminate it, you can use a statement whose format is similar to the following:
r1 := EVE$SELECTION (TRUE, TRUE, TRUE, TRUE, FALSE)
The last parameter directs EVE$SELECTION not to terminate the selection. For
more information on how to use these parameters, see the EVE$SELECTION
routine in SYS$EXAMPLES:EVE$CORE.TPU.
5.3.1.2 Static Selection
EVE creates a static selection if you do any of the following:
•
Click the MB1 mouse button two or more times to select a word, line,
paragraph, or buffer
•
Use the EVE command SELECT ALL
•
Press the MB1 mouse button, drag the mouse across text, and then release
the mouse button
DEC Text Processing Utility Program Development 5–13