home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!darwin.sura.net!wupost!usc!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!taligent!apple!cambridge.apple.com!jbk@world.std.com
- From: jbk@world.std.com (Jeffrey B Kane)
- Newsgroups: comp.lang.lisp.mcl
- Subject: Re: ccl:scrolling window bug?
- Message-ID: <199211171805.AA08636@world.std.com>
- Date: 17 Nov 92 18:05:04 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 81
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
-
-
- 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?
-
- Jeffrey
-
-
- ;; define a test class
- (defclass test-view (view)
- nil)
-
- ;; make this a separate routine, so we can move it around the call chain easily
- (defmethod draw-code ((me test-view))
- (with-fore-color *yellow-color*
- (paint-rect me 0 0 (point-h (view-size me)) (point-v (view-size me))))
- (with-fore-color *red-color*
- (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)))))
-
- ;;
- ;; specialize various methods to see where the problem is
- ;;
-
- ;; try the around method
- (defmethod view-draw-contents :around ((me test-view))
- ;; I tried inserting the draw-code here, both before and after
- ;; the call-next-method with no change
- (call-next-method)
- (draw-code me))
-
- ;; try the primary method
- (defmethod view-draw-contents ((me test-view))
- ;; I tried inserting the draw-code here, both before and after
- ;; the call-next-method with no change
- (call-next-method))
-
-
- (defmethod view-draw-contents :after ((me test-view))
- ;; the drawing does not good here either
- )
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; Create the window with a large subview in it
- ;;
-
- (make-instance 'ccl::scrolling-window
- :window-title "test"
- :color-p t
- :view-size #@(300 100)
- :view-subviews
- (list (make-instance 'test-view
- :view-position #@(20 20)
- :view-size #@(300 100))))
-
-
-
-
-
- ======================================
- Jeffrey Kane, MD
- Kane Biomedical Systems
- Boston, MA
-
- Internet jbk@world.std.com
- Compuserve 74206,640
- AppleLink D0738
-