[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: text edit in background window
- To: email@example.com
- Subject: Re: text edit in background window
- From: firstname.lastname@example.org (Wong Joo Fung)
- Date: 12 Nov 1993 02:43:16 GMT
- Newsgroups: comp.lang.lisp.mcl
- Organization: Institute Of Systems Science, NUS.
- References: <9311040414.AA06598@mmm>
Martin A. Kenner (email@example.com) wrote:
> I have a window that is not allowed to come to the front, but that
> I would like to be able to allow the user to edit text in.
Certainly! MCL is pretty flexible (although what you plan to do is not
encourage by the Macintosh Human Interface guidelines) :-)
> Is this possible?
> It seems from the documentation that the window
> must come to the front in order for the key handler to be activated;
> I would really like to be able to work around this (I know it sounds
> strange, but if I had the time and energy, the explanation would
> make it very clear!).
Not really -- I used a window-that-always-stay-at-the-back to implement the
Macintosh Desktop in a simulation of the Finder and it works real well ;-)
Just use the attached code snippet to define a custom window class and you'll
get along fine.
P.S. The attached code was sent to me by Nate Titterton. It was a great help
to my project. (THANKS Nate!)
From: firstname.lastname@example.org (Nathaniel Titterton)
Subject: Re: Need window that always stays at the back
To: email@example.com (Wong Joo Fung)
Date: Fri, 23 Jul 1993 08:39:12 -0700 (PDT)
We needed the same functionality (we even call our windows the
desktop and display windows -- scary). After creating a new class of
window called a desktop, use this code...
(defconstant $event-part-code 16)
(defmethod window-event ((desk desktop))
(let* ((event *current-event*)
(what (pref event :eventRecord.what))
(part-code (%get-word event $event-part-code))
(if (eql what #$mouseDown)
(cond ((point<= (subtract-points (view-size desk) #@(15 15))
(global-to-local desk (pref event
(window-grow-event-handler desk (pref event
((eql part-code #$inContent)
desk (global-to-local desk (pref event
((eql part-code #$inDrag)
(window-drag-event-handler desk (pref event
Hope it helps...