CLIM mail archive


Re: Motif menu-bar behavior.

    Date: Tue, 21 Dec 1993 22:28 EST
    From: Colin Meldrum <>

    Thanks to everyone for there suggestions on the Motif menu-bar behaviour.

    I don't want a mechanism which allows arbitary laying out of the menu
    buttons because this simply cannot be supported using Motif and OpenLook
    menu bars. All that is required is a simple way of hooking into Motif's
    ability to arrange one push button (or cascade button) to be placed at the
    rightmost end of the menu-bar.

    What I now propose is too add a new boolean option :HELP to
    add-menu-item-to-command-table which defaults to NIL. (This value could be
    examined by looking at command-menu-item-options for the menu item) 

    So Jeff's example would become 

    (define-application-frame fred ()
      (:command-table (fred :inherit-from (fred-commands)
				  :menu (("File" :menu file :mnemonic #\F)
					 ("Window" :menu window :mnemonic #\W) 
					 ("Help" :menu help :mnemonic #\H :HELP T))))

I propose that :BUTTON-TYPE :HELP would be a better way to do this.
Although Motif does not do this right now, I can well imagine that some
toolkits might support other specializations for other sorts of menu
buttons.  "Exit" and "Cancel" buttons come immediately to mind.

:HELP T is not nearly so extensible.

    The code that creates a Motif menu-bar would examine this menu-item-option
    for the top level menu-items in the command-table and position the help
    menu-item at the end of the menu-bar

    I don't know if other implementations will just ignore the unrecognized
    keyword argument or give an error - if the latter the :HELP T should be
    made conditional on #+allegro

    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

Follow-Ups: References:

Main Index | Thread Index