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

CLIM pane name from stream



   Date: Mon, 8 Jun 92 16:29:29 PDT
   From: lombardo@taurus.cs.nps.navy.mil (charles lombardo)

   Hi,
     Is it possible having the stream to an :application pane to
   determine the pane name? [...]

   So, if I have the stream how do I get the window (or pane) name?

   Chuck

I suggest either coding these drawing functions as methods for the
application frame, such as:

(defmethod show-movie-frame ((frame ucpop) plan)
  (let ((movie (clim:get-frame-pane clim:*application-frame* 'movie)))
    (clim:window-clear movie)
    (format movie "~s" plan)
    (clim:with-output-as-presentation
     (:object plan :type 'plan-icon
	      :stream movie :single-box t)
     (show-big-icon movie plan))
    (clim:redisplay-frame-pane frame 'movie)
    (values)))

or, refer directly to clim:*application-frame* in your command definitions:

(define-ucpop-command (com-refresh :name t
				   :menu "refresh")
  ()
   (let ((graph (clim::get-frame-pane clim:*application-frame* 'graph))
	 (text (clim::get-frame-pane clim:*application-frame* 'text))
	 (movie (clim::get-frame-pane clim:*application-frame* 'movie))
	 (in (clim::get-frame-pane clim:*application-frame* 'interact)))
     (clim:window-refresh graph)
     (clim:window-refresh text)
     (clim:window-refresh movie)
     (clim:window-clear in)
     (values)))

Scott