NextPrevUpTopContentsIndex

14.2.1 The Basic Output Record Protocol

All subclasses of output-record and displayed-output-record must inherit or implement methods for the following generic functions. For details of setf* , see C.4, Multiple-Value Setf

output-record-position [Generic Function]

Arguments: record

Summary: Returns the x and y position of the output record record as two rational numbers. The position of an output record is the position of the upper-left corner of its bounding rectangle. The position is relative to the stream, where (0, 0) is (initially) the upper-left corner of the stream.

(setf* output-record-position) [Generic Function]

Arguments: x y record

Summary: Changes the x and y position of the output record record to be x and y (which are rational numbers), and updates the bounding rectangle to reflect the new position (and saved cursor positions, if the output record stores it). If record has any children, all of the children (and their descendants as well) will be moved by the same amount as record was moved. The bounding rectangles of all of record 's ancestors will also be updated to be large enough to contain record . This does not replay the output record, but the next time the output record is replayed it will appear at the new position.

output-record-start-cursor-position [Generic Function]

Arguments: record

Summary: Returns the x and y starting cursor position of the output record record as two integer values. The positions are relative to the stream, where (0, 0) is (initially) the upper-left corner of the stream.

Text output records and updating output records maintain the cursor position. Graphical output records and other output records that do not require or affect the cursor position will return nil as both of the values.

(setf* output-record-start-cursor-position) [Generic Function]

Arguments: x y record

Summary: Changes the x and y starting cursor position of the output record record to be x and y (which are integers). This does not affect the bounding rectangle of record , nor does it replay the output record. For those output records that do not require or affect the cursor position, the method for this function does nothing.

output-record-end-cursor-position [Generic Function]

Arguments: record

Summary: Returns the x and y ending cursor position of the output record record as two integer values. The positions are relative to the stream, where (0, 0) is initially the upper-left corner. Graphical output records do not track the cursor position, so only text output record and some others will return meaningful values for this.

Text output records and updating output records maintain the cursor position. Graphical output records and other output records that do not require or affect the cursor position will return nil as both of the values.

(setf* output-record-end-cursor-position) [Generic Function]

Arguments: x y record

Summary: Changes the x and y ending cursor position of the output record record to be x and y (which are integers). This does not affect the bounding rectangle of record , nor does it replay the output record. For those output records that do not require or affect the cursor position, the method for this function does nothing.

output-record-parent [Generic Function]

Arguments: record

Summary: Returns the output record that is the parent of the output record record , or nil if the record has no parent.

replay[Function]	

Arguments: record stream &optional region

Summary: This function binds stream-recording-p of stream to nil , and then calls replay-output-record on the arguments record , stream , and region . If stream-drawing-p of stream is nil , replay does nothing. replay is typically called during scrolling, by repaint handlers, and so on.

region defaults to nil .

replay-output-record [Generic Function]

Arguments: record stream &optional region x-offset y-offset

Summary: Displays the output captured by the output record record on the output recording stream stream , exactly as it was originally captured (subject to subsequent modifications). The current user transformation, line style, text style, ink, and clipping region of stream are all ignored during the replay operation. Instead, these are gotten from the output record.

If record is not a displayed output record, then replaying it involves replaying all of its children. If record is a displayed output record, then replaying it involves redoing the graphics operation captured in the record.

region is a region that limits what records are displayed. Only those records that overlap region are replayed. The default for region is +everywhere+ .

stream must be the same stream on which the output records were originally recorded.

erase-output-record [Generic Function]

Arguments: record stream

Summary: Erases the output record record from the output recording stream stream , removes record from stream 's output history, and ensures that all other output records that were covered by record are visible. In effect, this draws background ink over the record, and then redraws all the records that overlap record .

output-record-refined-sensitivity-test [Generic Function]

Arguments: record x y

Summary: This is used to definitively answer hit detection queries, that is, determining that the point ( x , y ) is contained within the output record record . Once the position ( x , y ) has been determined to lie within output-record-hit-detection-rectangle* , output-record-refined-sensitivity-test is invoked. Output record subclasses can provide a method that defines a hit more precisely; for example, output records for elliptical rings will implement a method that detects whether the pointing device is on the elliptical ring.

highlight-output-record [Generic Function]

Arguments: record stream state

Summary: This method is called in order to draw a highlighting box around the output record record on the output recording stream stream . state will be either :highlight (meaning to draw the highlighting) or :unhighlight (meaning to erase the highlighting). The default method (on CLIM's standard output record class) simply draws a rectangle that corresponds to the bounding rectangle of record .


CommonLisp Interface Manager 2.0 User's Guide - 18 Mar 2005

NextPrevUpTopContentsIndex