[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ccl:scrolling window bug?
- To: email@example.com (Jeffrey B Kane)
- Subject: Re: ccl:scrolling window bug?
- From: firstname.lastname@example.org (Bill St. Clair)
- Date: Thu, 19 Nov 1992 09:17:13 -0600
- Cc: info-mcl
>I'm not sure if there is a reason for not doing this, but I've noticed
>that the class ccl::scrolling-windows does not seem to set the update
>region to exclude it's own scroll bars before it continues with the call
>chain. This means that any views inside of it will automatically draw
>into the scroll bar area. I'm assuming that the "view-draw-contents"
>methods are all called with the appropriate "with-focused-view" or
>"with-focused-dialog-item" by the call chain (read that as I'm not
>using this macro within my "view-draw-contents" methods since I assumed
>all that is automatically handled). Also note that resizing a scrolling
>window is what brings out this view. If I simply cover up the subview with
>another window (such as the listener), then uncover it, the scroll bars
>seem to be drawn properly.
>Is there a fix available for this or am I doing this wrong?
A SCROLLING-WINDOW instance does not expect any subviews besides the
three it creates (a SCROLLER and two scroll bars). Hence, you need
to change your example by making your TEST-VIEW class inherit from
SCROLLER, and by passing a :SCROLLER-CLASS initarg to the MAKE-INSTANCE
for the SCROLLING-WINDOW:
;; define a test class
(defclass test-view (scroller)
;; make this a separate routine, so we can move it around the call chain easily
(defmethod draw-code ((me test-view))
(paint-rect me 0 0 (point-h (view-size me)) (point-v (view-size me))))
(move-to me 0 0)
(line-to me (point-h (view-size me)) (point-v (view-size me)))
(move-to me (point-h (view-size me)) 0)
(line-to me 0 (point-v (view-size me)))))
(defmethod view-draw-contents ((me test-view))
;; Create the window with a large subview in it
:view-size #@(285 85)
:track-thumb-p t) ; real-time scrolling