Updated Tedit files for a few Lispusers packages--formatting and typos (#1246)
* Updated Tedit files for a few Lispusers packages--formatting and typos * Format OBJECTWINDOW.TEDIT, delete WHEELSCROLL.TXT * Create CLIPBOARD.TEDIT Small (formatted) documentation file
This commit is contained in:
parent
4826035054
commit
02a6d7ad1b
BIN
library/CLIPBOARD.TEDIT
Normal file
BIN
library/CLIPBOARD.TEDIT
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,10 +1,9 @@
|
||||
Medley REGIONMANAGER2
|
||||
Medley REGIONMANAGER
2
|
||||
4
|
||||
1
|
||||
REGIONMANAGER
1
|
||||
4
|
||||
By:
|
||||
Ron Kaplan
This document created in December 2021.
|
||||
By Ron Kaplan
This document created in December 2021.
|
||||
Medley comes equipped with a core set of functions for specifying regions and creating the windows that occupy those regions on the screen. But it can be disruptive if not irritating to have to draw out a new ghost region for every invocation of a particular application. Thus the common applications (e.g. TEDIT, SEDIT, DINFO...) implement particular strategies to reduce the number of times that a user has to sweep out a new region. They instead default to regions that were allocated for earlier invocations that are no longer active. TEDIT for example recycles the region of a session that was recently shut down, SEDIT allocates from a list of previous regions, DINFO always uses the same region, but FILEBROWSER always prompts for a new one. Applications that do recycle their regions tend to do so indiscrimately, without regard to the current arrangement of other windows on the screen or the role that those windows may play in higher-level applications.
|
||||
The REGIONMANAGER package provides simple extensions to the core region and window functions. These are aimed at giving users and application implementors more flexible and systematic control over the specification and reuse of screen regions. It introduces three new notions:
|
||||
A "typed region" allows the regions of particular applications to be specified, classified, and recycled according to their types.
|
||||
@ -17,7 +16,7 @@ The REGION/INITREGION arguments may now be region-type atoms in addition to eith
|
||||
A typed-region is marked as "inuse" and therefore unavailable when CREATEW assigns it to a window, and the extended CLOSEW marks it as again available when the window is closed.
|
||||
An example of how an application can take advantage of this facility is the TEDIT-PF-SEE package. This provides lightweight alternatives to the PF and SEE commands that print their output to scrollable read-only Tedit windows, specifying PF-TEDIT and SEE-TEDIT as their region types. The user can predefine a preference-ordered sequence of recyclable regions that bring up multiple output windows in a predictable tiled arrangement, without region-prompting for each invocation.
|
||||
The global variable TYPED-REGIONS is an alist that maintains the relationship between atomic type-names and the list of regions that belong to each type. The list is ordered according to preferences set by the user, and a type-atom is always resolved to the first unused region in its list. If the user is asked to sweep out a new region, that region is added at the end, as the least preferable. The function SET-TYPED-REGIONS is provided to add or replace TYPED-REGION entries.
|
||||
(SET-TYPED-REGIONS TYPELISTS REPLACE) [Function]
|
||||
(SET-TYPED-REGIONS TYPELISTS REPLACE) [Function]
|
||||
TYPELISTS is an alist of the form
|
||||
((type1 . regions1)(type2 . regions2)...)
|
||||
where each regioni is a possibly empty list of regions. For convenience, if TYPELISTS is just a literal type-atom, it is interpreted as ((type)), and if it is a list (type . regions) begining with an atom, it is interpreted as ((type . regions). The new regions replace preexisting regions if REPLACE, otherwise they are added at the front.
|
||||
@ -25,13 +24,13 @@ Typically, a call to SET-TYPED-REGIONS would be placed in a user's INIT file to
|
||||
|
||||
Relative regions
|
||||
Two functions are provided to make it easy to create regions relative and oriented with respect to a specified reference point. These may be useful for constructing an application that includes a constellation of windows arranged in a particular relative way.
|
||||
(RELCREATEREGION WIDTH HEIGHT CORNERX CORNERY REFX REFY ONSCREEN) [Function]
|
||||
(RELCREATEREGION WIDTH HEIGHT CORNERX CORNERY REFX REFY ONSCREEN) [Function]
|
||||
RELCREATEREGION creates a region of dimensions WIDTH and HEIGHT. One of its corners is identified by CORNERX and CORNERY and that corner will be aligned with a reference screen-point determined by REFX and REFY. If ONSCREEN, the WIDTH or HEIGHT will be adjusted with respect to that alignment so that the resulting region is entirely within the screen.
|
||||
WIDTH and HEIGHT can be given as absolute (natural) numbers) or specified relative to the WIDTH and HEIGHT of another region or of the screen. The possibilities are interpreted as follows:
|
||||
natural number: the number of screen points
|
||||
list of the form (anchor fraction adjustment), where anchor is a region, window, or an atom SCREEN or TTY. The corres-ponding dimension of the anchor is mutiplied by fraction and adjustment is added to the result. For example, specifying (<window> .5 -1) results in a WIDTH that is one point smaller than half the width of window's region. Fraction and adjustment default to 1 and 0 respectively.
|
||||
region/window/SCREEN/TTY: equivalent to (region/window/SCREEN/TTY 1 0).
|
||||
CORNERX can be LEFT, RIGHT, or NIL=LEFT, CORNERY can be BOTTOM, TOP, or NIL=BOTTOM. If LEFT/TOP are specified, for example, the region will be splayed down and to the right of the reference point. If RIGHT/BOTTOM, then up and to the left.
|
||||
CORNERX can be LEFT, RIGHT, or NIL=LEFT, CORNERY can be BOTTOM, TOP, or NIL=BOTTOM. If LEFT/TOP are specified, for example, the region will be displayed down and to the right of the reference point. If RIGHT/BOTTOM, then up and to the left.
|
||||
The reference-point arguments REFX and REFY are interpreted as follows:
|
||||
NIL: LASTMOUSEX/LASTMOUSEY
|
||||
natural number: an absolute screen coordinate
|
||||
@ -39,9 +38,9 @@ natural number: an absolute screen coordinate
|
||||
For convenience, if REFX is a position and REFY is NIL, then the XCOORD and YCOORD of REFX are taken as absolute values for REFX and REFY.
|
||||
Also for convenience, if WIDTH is a potentially a list of RELCREATEREGION arguments, then the elements of that list are spread out in a recursive call.
|
||||
|
||||
(RELGETREGION WIDTH HEIGHT CORNERX CORNERY REFX REFY MINSIZE) [Function]
|
||||
(RELGETREGION WIDTH HEIGHT CORNERX CORNERY REFX REFY MINSIZE) [Function]
|
||||
Calls GETREGION with an initial ghost region as created by RELCREATEREGION. CORNERX and CORNERY determine the ghost region's fixed corner, and the cursor starts at the region's diagonally opposite corner. If MINSIZE is true, then WIDTH and HEIGHT are taken as the minimum sizes of the region, except for adjustments that may be needed to ensure that all corners of the ghost region are initially visible on the screen.
|
||||
(RELCREATEPOSITION REFX REFY) [Function]
|
||||
(RELCREATEPOSITION REFX REFY) [Function]
|
||||
Creates a position with X and Y coordinates specified by REFX and REFY references as above.
|
||||
|
||||
Constellation regions
|
||||
@ -53,62 +52,29 @@ REGIONMANAGER provides an overlay veneer for ATTACHWINDOW that implements this s
|
||||
This behavior is also triggered if the UNDERCONSTRUCTION property of the central window is true. Thus, a constellation can be set up by creating all of the satellites and the central window, marking the central window as under construction, and then doing the sequence of attachments. The property can be reset to NIL when the construction is complete, so the central window does not shrink if other other attachments (e.g. expanded menus) by later user actions.
|
||||
|
||||
A somewhat weaker form of a constellation is a collection of windows that are not attached around a central window but stand in a parent-child relationship at least with respect to closing and moving. A parent windows spawns children that respond independently to ordinary window commands (move, shape, close). But the children close when the parent closes, and the children move when the parent moves so that they continue to appear in the same relative positions. These primitives allow the construction of a tree of windows that are dependent in this way.
|
||||
(CLOSEWITH CHILDREN PARENT) [Function]
|
||||
(CLOSEWITH CHILDREN PARENT [Function]
|
||||
Establishes a link between the PARENT window and any number of CHILDREN windows such that all CHILDREN will close when PARENT closes. The closing is accomplished by CLOSEWITH.DOIT:
|
||||
(CLOSEWITH.DOIT PARENT) [Function]
|
||||
(CLOSEWITH.DOIT PARENT) [Function]
|
||||
Closes the close-with children of PARENT.
|
||||
(MOVEWITH CHILDREN PARENT) [Function]
|
||||
(MOVEWITH CHILDREN PARENT) [Function]
|
||||
Establishes a link between the PARENT window and any number of CHILDREN windows such that all CHILDREN will move when PARENT closes. The closing is accomplished by MOVEWITH.DOIT:
|
||||
(MOVEWITH.DOIT PARENT NEWPOS) [Function]
|
||||
(MOVEWITH.DOIT PARENT NEWPOS) [Function]
|
||||
If NEWPOS is the new position of PARENT, moves each of the move-children so that they stand in the same relation to PARENT after it moves as before.
|
||||
|
||||
|
||||
| ||||