CLIM mail archive

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

The learning curve is a bit steeper now...



    Date: Wed, 23 Oct 1991 16:06 EDT
    From: seth@gandalf.hrl.hac.com

    Hi folks.  I need some insight.  The simplest way to ask my
    question is:  how does one implement overlapping panes?

    I want to be able to have scrolling lists of items (ala Mac)
    in the middle of a pane of my application frame.

    At the moment I am using open-window-stream and almost
    get what I want but I'm having trouble customizing
    frame-find-innermost-applicable-presentation to pick up
    the items in the newly created window stream.  If I could
    define the window-stream as a pane then I imagine the built-in
    stuff would take over and work properly.

What platform are you using?  Why do you need to customize
FRAME-FIND-INNERMOST-APPLICABLE-PRESENTATION?  What parent are you
specifying to OPEN-WINDOW-STREAM?

    Second question:  I've got a primitive top-level function
    that handles multiple application frames and switches between
    them fairly well (it requires a small amount of machine-dependent
    hackery).  In order to do this I have to define my own top-level
    function for the application frames and invoke it without
    going through run-frame-top-level (I need to be able to
    signal when I activate a new application frame and the signal
    throws out of the handler set up by run-frame-top-level).
    The question is what exactly is run-frame-top-level doing
    (code would be nice) so that I can make it do what I want?

RUN-FRAME-TOP-LEVEL is intended to be specialized by frames that require
new behavior.  You should not modify the :AROUND method.

(defmethod run-frame-top-level :around ((frame application-frame))
  (with-simple-restart (frame-exit "Exit ~A" (frame-pretty-name frame))
    (with-slots (top-level-window) frame
      (unwind-protect
	  (let ((*frame-layout-changing-p* *frame-layout-changing-p*)
		;; Reset the state of the input editor and the presentation
		;; type system, etc., in case there is an entry into another
		;; application from inside the input editor, such as a Debugger
		;; written using CLIM.
		;;--- This should be done in a more modular way
		;;--- If you change this, change MENU-CHOOSE-FROM-DRAWER
		(*original-stream* nil)
		(*input-wait-test* nil)
		(*input-wait-handler* nil)
		(*pointer-button-press-handler* nil)
		(*generate-button-release-events* nil)
		(*numeric-argument* nil)
		(*blip-characters* nil)
		(*activation-characters* nil)
		(*accelerator-characters* nil)
		(*input-context* nil)
		(*accept-help* nil)
		(*assume-all-commands-enabled* nil)
		(*sizing-application-frame* nil)
		(*command-parser* 'command-line-command-parser)
		(*command-unparser* 'command-line-command-unparser)
		(*partial-command-parser*
		  'command-line-read-remaining-arguments-for-partial-command))
	    (loop
	      (with-simple-restart (nil "~A top level" (frame-pretty-name frame))
		(when top-level-window
		  (window-expose top-level-window))
		(loop
		  (catch 'resynchronize
		    (let ((*application-frame* frame)
			  (*pointer-documentation-output*
			    (frame-pointer-documentation-output frame)))
		      ;; We must return the values from CALL-NEXT-METHOD,
		      ;; or else ACCEPTING-VALUES will return NIL
		      (return-from run-frame-top-level (call-next-method))))))))
	(when top-level-window
	  (setf (window-visibility top-level-window) nil))))))

(defmethod run-frame-top-level ((frame application-frame))
  (let* ((descriptor (find-frame-descriptor frame))
	 (top-level (frame-descriptor-top-level descriptor)))
    (apply (first top-level) frame (rest top-level))))

0,,

References:

Main Index | Thread Index