[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Splitters...
- To: info-mcl@cambridge.apple.com
- Subject: Re: Splitters...
- From: poeck@informatik.uni-wuerzburg.de (Karsten Poeck)
- Date: 22 Oct 1994 14:40:57 GMT
- Full-name: Majordomo Mailing List Server
- Organization: University of Wuerzburg
- References: <387gfh$8eg@newsbf01.news.aol.com>
- Sender: owner-info-mcl@cambridge.apple.com
In article <387gfh$8eg@newsbf01.news.aol.com>, staypufed@aol.com
(Staypufed) wrote:
> Anyone,
>
> Please send me some sample code on how to setup and use the splitters on
> the scrollbar dialog items.
>
> A few months back someone suggested using the interface builder to dump
> the code for the backtrace, but I tried to do that and it wouldn't let me.
> So please help me!!!!
>
> Thanks,
>
> Sam Griffith Jr.
> staypufed@aol.com
I don't know if I am allowed to send you the backtrace sources, but this
should give you a start.
(defclass test-dialog (dialog)
(
(s1 :accessor td-s1)
(s2 :Accessor td-s2)
)
)
(defclass test-scroller (scroll-bar-dialog-item)
())
(defmethod split-pane ((ich test-scroller) scroll-bar pos direction
inside-limits)
;(print `(,ich ,scroll-bar ,pos ,direction ,direction ,inside-limits))
(when inside-limits
(set-scroll-bar-length ich (- (scroll-bar-length ich) pos))
(set-view-position ich
(add-points (view-position ich)
(make-point 0 pos)))
(set-scroll-bar-length scroll-bar (+ (scroll-bar-length scroll-bar) pos)))
)
(defmethod initialize-instance ((ich test-dialog)
&rest init-list)
(apply #'call-next-method ich
:view-size (make-point 100 250)
init-list)
(setf (td-s2 ich)
(make-instance 'test-scroller
:view-position (make-point 0 100)
:length 100
:direction :vertical
)
)
(setf (td-s1 ich)
(make-instance 'test-scroller
:view-position (make-point 0 0)
:length 100
:direction :vertical
:scrollee (td-s2 ich)
:pane-splitter :bottom))
(add-subviews ich (td-s1 ich) (td-s2 ich))
)
(make-instance 'test-dialog)
Karsten A. Poeck
Lehrstuhl fuer Informatik VI
Universitaet Wuerzburg
Allesgrundweg 12
97218 Gerbrunn
Germany
E-mail: poeck@informatik.uni-wuerzburg.de
Tel. ++ 49 931 70561 18
Fax ++ 49 931 70561 20