[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: activating windows...
- To: firstname.lastname@example.org
- Subject: Re: activating windows...
- From: Stefan Bernemann <email@example.com>
- Date: Tue, 8 Sep 1992 10:27+0200
- Cc: firstname.lastname@example.org
- In-reply-to: <9209042026.AA23405@cambridge.apple.com>
Date: Fri, 4 Sep 1992 23:33 MEST
From: email@example.com (Bill St. Clair)
>Is it possible to have a window that is active (i.e. responsive to mouse
>actions - say selecting and dragging of icons), but not brought to the
It's possible, but it takes a little doing (a little more than I
had thought when I started doing it). Here's an example file that
illustrates what you need to know to make it work. The important
thing is that all events get passed through the WINDOW-EVENT
generic function which dispatches to an xxx-EVENT-HANDLER.
If you specialize WINDOW-EVENT, you can override the default
; Drag an outline of the view as returned by VIEW-DRAG-REGION
; until the mouse is released. Return the new global position
; for the view. Where is the difference between the current mouse
; position and the view's position.
(defmethod drag-view ((view simple-view) where)
(rlet ((rect :rect
:top -32767 :left -32767
:bottom 32767 :right 32767))
(setq rgn (view-drag-region view))
(#_DragGrayRgn rgn where rect rect #$noConstraint (%null-ptr))
; pointer to feedback-fn
(subtract-points (view-mouse-position nil) where)))
(when (and rgn (not (%null-ptr-p rgn)))
This is a very nice start for some drag-and-drop interaction style, and
that's what we need. However, how can we implement a feedback-function
that provides some feedback to the user (like the finder which
highlights the folder-icons when you drag something onto them)?
_DragGrayRgn wants a pointer to a C-Function, but we dont want to do too
much C-Programming, nor boot the Mac in case the feedback function
By the way, is there already a proposed protocol for a generalized
Mail: Stefan Bernemann ! Phone: +49-231-9743-139
c/o FhG IML Dortmund ! Fax: +49-231-9743-234
Emil-Figge-Str. 75 ! Email: firstname.lastname@example.org
D-4600 Dortmund 50, FRG !