CLIM mail archive

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

Re: clim:run-frame-top-level




Randy,

Here's a code snip that shows what I do to perform some additional
things before showing the frame.  Yes, run-frame-top-level DOES result
in displaying the window.  After making the frame with
make-application-frame, assuming you run it with some variant of
process-run-function, frame-top-level allows you to do some things
(like drawing) in an existing window -- I don't believe you could do
these things after the initialize-instance for the frame.

;;; an 'around' on run-frame-top-level gets run whenever we run and
;;; display a created-frame
(defmethod clim:run-frame-top-level :around ((frame kat-frame))
;;; put titles on panes
  (let ((pane-titles (set-kat-pane-titles))
	(pane-desc)
	)
    (unwind-protect
    ;;; init the icons in the panes
      (initialize-frame-icons frame (set-kat-icons))
      ;;; set the default CLIM view of each display 
      (setf (clim:stream-default-view
	    (clim:get-frame-pane frame 'display)) +kat-dialog-view+)
      (setf (clim:stream-default-view
	    (clim:get-frame-pane frame 'tools)) +kat-dialog-view+)
      (setf (clim:stream-default-view
	    (clim:get-frame-pane frame 'app1)) +kat-dialog-view+)
      (setf (clim:stream-default-view
	    (clim:get-frame-pane frame 'desktop)) +kat-textual-view+)
      (clim:set-frame-layout frame 'large-display)
    (call-next-method)
  )))	

hope this is useful...

jeffrey





0,,

References:

Main Index | Thread Index