CLIM mail archive
[Prev][Next][Index][Thread]
Re: Suggest approach to accepting-values dialog
-
To: Curt Eggemeyer <curt@eraserhead.jpl.nasa.gov>
-
Subject: Re: Suggest approach to accepting-values dialog
-
From: Colin Meldrum <colin@franz.com>
-
Date: Tue, 17 May 94 12:25:37 -0700
-
Cc: clim@BBN.COM
-
In-Reply-To: Your message of Tue, 17 May 94 08:03:07 PDT. <199405171503.IAA06895@eraserhead.Jpl.Nasa.Gov>
Date: Tue, 17 May 1994 08:03:07 -0700
From: Curt Eggemeyer <curt@eraserhead.jpl.nasa.gov>
In Clim2.0 land, when you use the :own-window t option in accepting-values,
does clim automatically generate a new window each time it is called, or
is it smart enough to reuse one previously generated?
No, a new application frame is created each time.
In my particular application, I have a very extensive accepting-values
dialog (could have a hundred or more accepts) that is used fairly often
and in the old clim1.1 scheme used a separate pane layout to bring it to
the forefront when the user wanted to "tweak" an object. Now, I would like
to have it pop up as a tied-in window to the application frame.
Any suggestions on what is the best way to implementate this (ala my own
make-pane or make-clim-application-pane, of which I'm not sure how to tie
in with my application frame)?
The following example specializes the puzzle demo to use a modal dialog..
(in-package :clim-user)
(defclass popup-puzzle (clim-demo::puzzle) ())
#+allegro
(defmethod tk-silica::popup-frame-p ((frame popup-puzzle))
t)
(defun popup-puzzle (stream)
(let ((frame (make-application-frame 'popup-puzzle
:calling-frame (pane-frame stream)
;; this makes sure that repaint event on the parent
;; frame are dealt with correctly
:input-buffer (stream-input-buffer stream))))
(unwind-protect
(run-frame-top-level frame)
(destroy-frame frame))))
Note that this uses undocumented internal Allegro specific functionality
and all the usual caveats apply. The method on POPUP-FRAME-P causes the new
window to be created as a transient window for the parent using a modal
dialog shell - rather than using a regular top-level-shell. This
distinction may not apply for other window systems. On other implementations
and window systems it may only be necessary to specify :CALLING-FRAME in the
call to MAKE-APPLICATION-FRAME
-----
Colin Meldrum, Franz Inc. 1995 University Avenue, Suite 275
colin@Franz.COM (internet) Berkeley, CA 94704
uunet!franz!colin (uucp) Phone: (510) 548-3600; FAX: (510) 548-8253
Main Index |
Thread Index