[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FRED: cursor & Translucent overlay

At 12:54 PM 1/19/95, Tom Bonura wrote:
>I would like to hack FRED in the following 2 ways and need a jump start:
>1.  I would like to have a FRED mode where a pointer cursor replaces the
>I-beam cursor - sort of like having a read-only FRED.  Is there an obvious
>place where FRED handles changing the cursor from the pointer to the I-beam
>(when over the content region)?

(defmethod view-cursor :around ((self fred-mixin))
  (if (markup-mode-p self)

>2.  When in this mode, I would like to overlay a translucent layer on the
>content region of FRED.
>Any ideas out there?

I can't help you with the mechanics of the translucent layer, but I
can tell you how to restore it after Fred has overwritten it.

I'm pretty sure that view-draw-contents & fred-update are the only
two functions that can cause a fred window or dialog item to
do any redrawing. Fred always erases before redrawing, so you need
to redo your translucent layer after each of these does its thing:

(defmethod view-draw-contents :after ((self fred-mixin))
  (maybe-redraw-markups self))

(defmethod fred-update :after ((self fred-mixin))
  (maybe-redraw-markups self))

(defun maybe-redraw-markups (fred-thing)
  (when (markup-mode-p fred-thing)
    (redraw-markups fred-thing)))