CLIM mail archive
Hiding Menu Commands
Date: Wed, 20 Nov 1991 04:02 EST
From: Peter Paine <firstname.lastname@example.org>
Date: Tue, 19 Nov 1991 22:43-0000
From: Joe Sherman <email@example.com>
I've tried two ways of hiding menu commands when I switch between layouts
in a CLIM application:
(1) enable-command/disable-command changes the font on the menu command
name, and sensitizes/de-sensitizes the string; however, I have one command
that gets enabled, but whose font remains italicized (disabled).
I would prefer to remove disabled commands from the command menu. The
difference in font style between enabled and disabled commands is not
meaningful for users.
(2) and so I tried using a hierarchy of command tables. However, I have
not found a way to switch between command tables in my application.
The display-command-menu function will display the command table that
is defined in the :command-table parameter of the define-application-frame
macro. But I cannot seem to define my own display function that uses
a different command table depending on application state.
Are separate command tables intended to be used in this way?
How does one switch between command tables in CLIM?
I have found one solution to the above problem was to have, inlieu of a
command menu, a display window whose redisplay function presented the
current command table commands (or random collection of commands) as
buttons (menu items).
CLIM:DISPLAY-COMMAND-TABLE-MENU displays the menu for a command table
on a given stream. CLIM:DISPLAY-COMMAND-MENU, which is the default
displayer for :COMMAND-MENU panes, uses it.
To change the command table, I throw control back to the frame top level
loop with the new command table as an argument.
This all seems rather agricultural, but it does seem to work.
If anyone has a better way to do this, I'd like to hear please.
I sent another piece of mail earlier today already, we probably just
crossed in the mail.
DISPLAY-COMMAND-TABLE-MENU, DISPLAY-COMMAND-MENU, REDISPLAY-FRAME-PANES,
and FRAME-COMMAND-TABLE are all documented functions. Since neither P2
nor JoeBob found these, I have to assume that the documentation is not
well enough organized.
Main Index |