<* PRAGMA LL *>A
ZMoveVBTis a switch that has the side-effect of repositioning its nearest ancestor subwindow.
If the initial mouse click is unshifted, the subwindow is lifted to the top of its sibling; otherwise, the subwindow keeps its current top-to-bottom ordering among its siblings. As the mouse is moved, the cursor is changed to give appropriate feedback, and an outline of the subwindow is moved to show where it will be repositioned on an uncancelled upclick. On an uncancelled upclick or chord-cancel, the outline is removed.
INTERFACEThe following procedure is useful for subclasses, such as
ZMoveVBT; IMPORT Rect, SourceVBT; TYPE T <: SourceVBT.T;
ZGrowVBT, to control the shape of the outline of
v's subwindow as the mouse is being dragged.
PROCEDURE MoveAndHighlight (v: T; READONLY rect: Rect.T); <* LL = VBT.mu *>
Show the outline of
rect. Should only be called by the
duringmethod of a subclass.
rectequal to the domain of the subwindow being moved, translated by an appropriate amount to reflect the mouse movement since the initial mouse click.
On an uncancelled upclick, the default
post method moves the
subwindow to the rectangle last specified to
MoveAndHighlight and calls
The highlighter used for displaying an outline of the
v is the
HighlightVBT returned by
SourceVBT.GetHighlighter(v). An appropriate paint op is
constructed by examing the colors of the background child of
the subwindow's parent. Those colors are found using the
VBTColors interface; be sure to use that interface to
record the background child's primary foreground and background