[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: creating windows with scrollbars in MCL
- To: pu@liasg9.epfl.ch (Pearl Pu)
- Subject: Re: creating windows with scrollbars in MCL
- From: poeck@informatik.uni-wuerzburg.de (Karsten Poeck)
- Date: Wed, 26 Apr 1995 10:14:45 +0200
- Cc: info-mcl@digitool.com
- Sender: owner-info-mcl@digitool.com
>>Could someone tell me if it's possible to create windows (other than
>>dialogue boxes) from MCL with scrollbars?
(require :scrollers)
(defclass window-with-scroller (window)
((my-scroller :accessor my-scroller))
)
(defmethod initialize-instance :after ((me window-with-scroller) &rest
init-list)
(declare (ignore init-list))
(setf (my-scroller me)
(make-instance 'ccl::scroller
:view-container me
:view-position (make-point 0 0)
:view-size (subtract-points (view-size me)(make-point 15 15))))
)
(defmethod adjust-scroller-size ((me window-with-scroller))
(set-view-size (my-scroller me) (subtract-points (view-size
me)(make-point 15 15))))
(defmethod set-view-size :after ((me window-with-scroller) h &optional v)
(declare (ignore h v))
(adjust-scroller-size me))
#|
(let ((window (make-instance 'window-with-scroller)))
(dotimes (x 30)
(make-instance 'static-text-dialog-item
:dialog-item-text (princ-to-string x)
:view-position (make-point (* 5 x)(* 20 x))
:view-container (my-scroller window))))
|#
Karsten