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

Command Menu handlers and Program Frameworks ...



    Date: Mon, 26 Oct 87 19:43 EDT
    From: Richard Billington <Buff@cis.upenn.edu>

    First, a user wanted to be able to specify the documentation on the mouse
    line for commands he was specifying. I can find no straight-forward way
    of doing that, so ...

    So first, we use frameup to create the following framework:

    (DW:DEFINE-PROGRAM-FRAMEWORK KASS
      :SELECT-KEY
      #\|
      :COMMAND-DEFINER
       T
      :COMMAND-TABLE
      (:INHERIT-FROM '("colon full command" "standard arguments" "standard scrolling")
       :KBD-ACCELERATOR-P 'NIL)
      :STATE-VARIABLES
      NIL
      :PANES
      ((PANE-1 :TITLE :SIZE-FROM-OUTPUT T :HEIGHT-IN-LINES 1 :REDISPLAY-AFTER-COMMANDS NIL)
       (PANE-3 :DISPLAY) (PANE-2 :COMMAND-MENU :MENU-LEVEL :TOP-LEVEL))
      :CONFIGURATIONS
      '((DW::MAIN (:LAYOUT (DW::MAIN :COLUMN PANE-1 PANE-3 PANE-2))
	 (:SIZES
	  (DW::MAIN (PANE-1 1 :LINES) (PANE-2 :ASK-WINDOW SELF :SIZE-FOR-PANE PANE-2) :THEN
	   (PANE-3 :EVEN))))))

    Now, what we'd like to be able to do is define a program command with
    menu accelerator AND be able to specify the documentation shown on the
    mouse line when the item is being pointed at. This, it turns out, means
    you need to write your own handler (ugh!) or otherwise I'm missing some-
    thing. So here's a little macro to generate the command and the handler:

This is a bug in Genera 7.1 that has been fixed for the next release.
You will be able to specify (for example):

(define-kass-command (com-foo :menu-accelerator t
		              :menu-documentation "Bar Command")
			((mumble 'mumble))  ;for some presentation type mumble
  (print 'foo))

Sorry for the inconvienience.

    [rest deleted]