[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: shen@dolphin.Jpl.Nasa.Gov (Sheldon Shen)
- Subject: Re: ccl::draw-outline
- From: firstname.lastname@example.org (Bill St. Clair)
- Date: Wed, 9 Sep 1992 17:58:29 -0500
- Cc: info-mcl, email@example.com
>>In my application, I turned the outline of an editable-text-dialog-item on and off according
>>to some event.
>Since the outline is not within the bounds of (view-corners ) [ugh!] you
>will probably need to erase a suitable rectangle after setting the slot
>value and before calling view-focus-and-draw-contents.
>If this causes too much flash, you can use a region which is the difference
>of a suitable rectangle and view-corners...
The problem is not that VIEW-CORNERS returns the wrong values.
The problem is that you're calling it after setting the ccl::draw-outline
slot to NIL. The following method does the right thing. If you find it too
flashy, I can make a version that flashes less (but you try it first, please):
(defmethod set-draw-outline ((e ccl::basic-editable-text-dialog-item)
(let ((new-outline (not (null new-outline)))
(old-outline (not (null (slot-value e 'ccl::draw-outline)))))
(unless (eq old-outline new-outline)
(invalidate-view e t)) ; erase the outline
(setf (slot-value e 'ccl::draw-outline) new-outline)
(validate-view e)) ; don't erase the text
(invalidate-view e))) ; redraw. This flashes a little.