[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Read-only text scrollable dialog item: HOW?
- To: enrico.ballarin-dolfin@svusenet.ubs.ch
- Subject: Re: Read-only text scrollable dialog item: HOW?
- From: bill@cambridge.apple.com (Bill St. Clair)
- Date: Thu, 25 May 1995 10:34:18 -0400
- Cc: info-mcl@digitool.com
- Sender: owner-info-mcl@digitool.com
At 3:00 AM 5/22/95, enrico.ballarin-dolfin@svusenet.ubs.ch wrote:
>Hi!
>
>How can I define a read-only scrollable dialog item with following behaviour:
>
>- you can every time assign (or modify) text to the dialog item by program.
>- it should be possible to assign a text longer than 32K.
>- the user cannot write, edit or select anything in the dialog item.
>- the user can scroll the text in the dialog item.
>
>Basically this means a dialog item similar e.g. as that in "Disinfectant
>3.6" Help.
>
>Thanks in advance!
This should get you started:
---------------------------------------------------------------------
; text-display-dialog-item.lisp
;
; Like scrolling-fred-dialog-item, but doesn't allow typing or selection.
(eval-when (:compile-toplevel :execute :load-toplevel)
(require :scrolling-fred-dialog-item)) ; in the library folder
(defclass text-display-dialog-item (scrolling-fred-dialog-item)
())
(defmethod key-handler-p ((w text-display-dialog-item))
nil)
(defmethod view-click-event-handler ((w text-display-dialog-item) where)
(declare (ignore where))
nil)
; (method install-view-in-window :after (key-handler t)) calls this
(defmethod add-key-handler ((w text-display-dialog-item) &optional dialog)
(declare (ignore dialog))
nil)
(defmethod view-cursor ((w text-display-dialog-item) where)
(declare (ignore where))
*arrow-cursor*)
#|
(defparameter *w* (make-instance 'window :view-size #@(500 200)))
(defparameter *f* (make-instance 'text-display-dialog-item
:view-container *w*
:view-size #@(450 150)))
; Can't use a :filename arg to make-instance above due to an
; MCL bug
(buffer-insert-file (fred-buffer *f*)
"ccl:library;scrolling-fred-dialog-item.lisp")
|#