CLIM mail archive

[Prev][Next][Index][Thread]

REPLAY-OUTPUT-RECORD question



   Date: Fri, 1 Jul 1994 11:19-0700
   From: Gregory M Anderson <gma@BITTERROOT.apl.washington.edu>
   Character-Type-Mappings: (1 0 (NIL 0) (:FIX :ITALIC :NORMAL) "CPTFONTI")
			    (2 0 (NIL 0) (NIL :ITALIC NIL) "CPTFONTI")
   Fonts: CPTFONT, CPTFONTI, CPTFONTI

   Can you tell me if convert-from-relative-to-absolute-coordinates and 
   output-record-position are working correctly?  If they are, what is the
   right way to compute an output record's position in order to redisplay 
   it?

If you have the Symbolics CLIM 2.0/2.1 manual, check out the examples
on page 370.

   (defun foo (stream record)
     (when record
       (describe record)
       (multiple-value-bind (x y)
	   (output-record-position record)
	 (multiple-value-bind (x1 y1)
	     (convert-from-relative-to-absolute-coordinates stream record)
	   (multiple-value-bind (x2 y2)
	       (convert-from-relative-to-absolute-coordinates nil record)
	     (with-slots (clim-utils:left clim-utils:top) record
	       (format t "~&---------------~&POSITION ~D ~D REL-TO-ABS(STREAM) ~D ~D REL-TO-ABS(NIL) ~D ~D LEFT-TOP ~D ~D~&---------------"
		       x y x1 y1 x2 y2 clim-utils:left clim-utils:top)))))
       (foo stream (output-record-parent record))))

   1 Eval (program): 0(foo 2#<CLIM:APPLICATION-PANE 401134466>0 (output-record 2#<FAST-TABLE::SPOT 401142427>0))
   #<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070070> is an object of class #<CLOS:STANDARD-CLASS CLIM:ST
   ANDARD-UPDATING-OUTPUT-RECORD 21012716646>
   Instance Slots:
     CLIM-UTILS:LEFT:                      30.0
     CLIM-UTILS:TOP:                       70.0
     CLIM-UTILS:RIGHT:                     80.0
     CLIM-UTILS:BOTTOM:                    120.0
     CLIM-INTERNALS::START-X:              0
     CLIM-INTERNALS::START-Y:              0
     CLIM-INTERNALS::END-X:                0
     CLIM-INTERNALS::END-Y:                0
     CLIM-INTERNALS::OLD-START-X:          0
     CLIM-INTERNALS::OLD-START-Y:          0
     CLIM-INTERNALS::OLD-BOUNDING-RECTANGLE:   NIL
     CLIM-INTERNALS::CONTENTS-OK:          NIL
     CLIM-INTERNALS::PARENT:               #<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070124>
     STREAM:                               #<CLIM:APPLICATION-PANE 140065164>
     CLIM-INTERNALS::OLD-CHILDREN:         NIL
     CLIM-INTERNALS::GENERATION-TICK:      0
     CLIM-INTERNALS::ELEMENTS:             #<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070160>
     FILL-POINTER:                         0
     CLIM-INTERNALS::UNIQUE-ID:            0
     CLIM-INTERNALS::CACHE-VALUE:          NIL
     CLIM-INTERNALS::FIXED-POSITION:       NIL
     CLIM-INTERNALS::DISPLAYER:            #<LEXICAL-CLOSURE (:INTERNAL # 0 CLIM-INTERNALS::UPDATING-OUTPUT-DISPLAYER) 150031220>
     CLIM-INTERNALS::ALL-NEW:              NIL
     CLIM-INTERNALS::CACHE:                (#<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070160>)
     CLIM-INTERNALS::OLD-CACHE:            NIL
     CLIM-INTERNALS::OLD-POSITION:         #<CLIM:STANDARD-POINT (0,0) 140070214>
     CLIM-INTERNALS::OLD-PARENT:           NIL
   ---------------
   POSITION 0 0 REL-TO-ABS(STREAM) 0 0 REL-TO-ABS(NIL) 0 0 LEFT-TOP 30.0 70.0
   ---------------
   #<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070124> is an object of class #<CLOS:STANDARD-CLASS CLIM:ST
   ANDARD-UPDATING-OUTPUT-RECORD 21012716646>
   Instance Slots:
     CLIM-UTILS:LEFT:                      30.0
     CLIM-UTILS:TOP:                       70.0
     CLIM-UTILS:RIGHT:                     80.0
     CLIM-UTILS:BOTTOM:                    120.0
     CLIM-INTERNALS::START-X:              0
     CLIM-INTERNALS::START-Y:              0
     CLIM-INTERNALS::END-X:                0
     CLIM-INTERNALS::END-Y:                0
     CLIM-INTERNALS::OLD-START-X:          0
     CLIM-INTERNALS::OLD-START-Y:          0
     CLIM-INTERNALS::OLD-BOUNDING-RECTANGLE:   NIL
     CLIM-INTERNALS::CONTENTS-OK:          NIL
     CLIM-INTERNALS::PARENT:               #<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070217>
     STREAM:                               #<CLIM:APPLICATION-PANE 140065164>
     CLIM-INTERNALS::OLD-CHILDREN:         NIL
     CLIM-INTERNALS::GENERATION-TICK:      0
     CLIM-INTERNALS::ELEMENTS:             #<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070070>
     FILL-POINTER:                         0
     CLIM-INTERNALS::UNIQUE-ID:            #<FAST-TABLE::TRACK 140070253>
     CLIM-INTERNALS::CACHE-VALUE:          NIL
     CLIM-INTERNALS::FIXED-POSITION:       NIL
     CLIM-INTERNALS::DISPLAYER:            #<LEXICAL-CLOSURE (:INTERNAL # 0 CLIM-INTERNALS::UPDATING-OUTPUT-DISPLAYER) 150031224>
     CLIM-INTERNALS::ALL-NEW:              NIL
     CLIM-INTERNALS::CACHE:                (#<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070070>)
     CLIM-INTERNALS::OLD-CACHE:            NIL
     CLIM-INTERNALS::OLD-POSITION:         #<CLIM:STANDARD-POINT (0,0) 140070256>
     CLIM-INTERNALS::OLD-PARENT:           NIL
   ---------------
   POSITION 0 0 REL-TO-ABS(STREAM) 0 0 REL-TO-ABS(NIL) 0 0 LEFT-TOP 30.0 70.0
   ---------------
   #<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070217> is an object of class #<CLOS:STANDARD-CLASS CLIM:ST
   ANDARD-UPDATING-OUTPUT-RECORD 21012716646>
   Instance Slots:
     CLIM-UTILS:LEFT:                      30.0
     CLIM-UTILS:TOP:                       70.0
     CLIM-UTILS:RIGHT:                     80.0
     CLIM-UTILS:BOTTOM:                    120.0
     CLIM-INTERNALS::START-X:              0
     CLIM-INTERNALS::START-Y:              0
     CLIM-INTERNALS::END-X:                0
     CLIM-INTERNALS::END-Y:                0
     CLIM-INTERNALS::OLD-START-X:          0
     CLIM-INTERNALS::OLD-START-Y:          0
     CLIM-INTERNALS::OLD-BOUNDING-RECTANGLE:   NIL
     CLIM-INTERNALS::CONTENTS-OK:          NIL
     CLIM-INTERNALS::PARENT:               #<CLIM:STANDARD-TREE-OUTPUT-HISTORY /x 0:80.0 y 0:120.0/ 140067530>
     STREAM:                               #<CLIM:APPLICATION-PANE 140065164>
     CLIM-INTERNALS::OLD-CHILDREN:         NIL
     CLIM-INTERNALS::GENERATION-TICK:      0
     CLIM-INTERNALS::ELEMENTS:             #<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070124>
     FILL-POINTER:                         0
     CLIM-INTERNALS::UNIQUE-ID:            NIL
     CLIM-INTERNALS::CACHE-VALUE:          NIL
     CLIM-INTERNALS::FIXED-POSITION:       NIL
     CLIM-INTERNALS::DISPLAYER:            #<LEXICAL-CLOSURE (:INTERNAL # 0 CLIM-INTERNALS::UPDATING-OUTPUT-DISPLAYER) 150031232>
     CLIM-INTERNALS::ALL-NEW:              NIL
     CLIM-INTERNALS::CACHE:                (#<CLIM:STANDARD-UPDATING-OUTPUT-RECORD /x 30.0:80.0 y 70.0:120.0/ 140070124>)
     CLIM-INTERNALS::OLD-CACHE:            NIL
     CLIM-INTERNALS::OLD-POSITION:         #<CLIM:STANDARD-POINT (0,0) 140070312>
     CLIM-INTERNALS::OLD-PARENT:           NIL
   ---------------
   POSITION 0 0 REL-TO-ABS(STREAM) 0 0 REL-TO-ABS(NIL) 0 0 LEFT-TOP 30.0 70.0
   ---------------
   #<CLIM:STANDARD-TREE-OUTPUT-HISTORY /x 0:80.0 y 0:120.0/ 140067530> is an object of class #<CLOS:STANDARD-CLASS CLIM:STANDARD-TR
   EE-OUTPUT-HISTORY 21012717525>
   Instance Slots:
     CLIM-UTILS:LEFT:                      0
     CLIM-UTILS:TOP:                       0
     CLIM-UTILS:RIGHT:                     80.0
     CLIM-UTILS:BOTTOM:                    120.0
     CLIM-INTERNALS::START-X:              0
     CLIM-INTERNALS::START-Y:              0
     CLIM-INTERNALS::END-X:                0
     CLIM-INTERNALS::END-Y:                0
     CLIM-INTERNALS::OLD-START-X:          0
     CLIM-INTERNALS::OLD-START-Y:          0
     CLIM-INTERNALS::OLD-BOUNDING-RECTANGLE:   NIL
     CLIM-INTERNALS::CONTENTS-OK:          NIL
     CLIM-INTERNALS::PARENT:               NIL
     STREAM:                               #<CLIM:APPLICATION-PANE 140065164>
     CLIM-INTERNALS::OLD-CHILDREN:         NIL
     CLIM-INTERNALS::GENERATION-TICK:      0
     CLIM-INTERNALS::COORDINATE-SORTED-SET:   #<ARRAY 200 simple 140067554>
     FILL-POINTER:                         1
     CLIM-INTERNALS::TALLEST-BOX-HEIGHT:   50.0
   ---------------
   POSITION 0 0 REL-TO-ABS(STREAM) 0 0 REL-TO-ABS(NIL) 0 0 LEFT-TOP 0 0
   ---------------
   NIL
   


Follow-Ups: References:

Main Index | Thread Index