libera/#clim - IRC Chatlog
Search
22:42:24
mcoll-
oooh, okay, so I shouldn't use these methods that draw something somewhere on the screen, but methods that advance the cursor accordingly? how would I draw a rectangle using the cursor system? I imagine I cannot use the (draw-rectangle*) function for example, as that draws in a particular place without changing the cursor?
22:44:10
mcoll-
or should I just take them from the (clim:stream-cursor-position STREAM) and use them there?
22:49:05
scymtym
your PRESENT presentation method could do (multiple-value-bind (x y) (stream-cursor-position x y) (draw-rectangle* stream x y (+ x 20) (+ y 20))) if you want to present something as a rectangle of size 20x20. the presentation will appear where the cursor happens to be when (present object 'my-rectangle :stream stream) or whatever is called
22:49:28
scymtym
so you could mix things like (write-string "foo" stream) (present object 'my-rectangle :stream stream) (write-string "bar" stream) and it should just work