CLIM mail archive


Re: clim2 pulldown menu items

> hi! I'm back! doing CLIM stuff again! hooray! I work at BBN now...


> got a tiny prob I need some suggestions on...
> Motif 1.2, SunOS 4.1.3, Allegro 4.2beta2 clim2beta, sparc 10
> I managed to coerce CLIM2 into putting real Motif cascade-buttons into
> the menubar, which doesn't seem to be possible with
> define-frame-command (don't know for sure, didn't try it that way).
> BUT, the choices in the pulldown are all grayed out. 
> how can I force them to be not grayed out? I have defined commands to
> go with them, so they're not just labels.
> there's a function 'note-command-disabled' or some such that tells a
> frame when a command is disabled, so that it can be grayed-out, and
> there's the reverse command...but the pulldown items are NOT in the
> frame's command table (pulldowns don't work that way: their contents
> have to be in a separate cmd-table).
> how to force commands in any random command table to be enabled so
> that they aren't drawn grayed out...

A command is "active", ie. not grayed out, if it has not been explicitly
disabled with (setf command-enabled), and if it is accessible
(command-accessible-in-command-table-p) in the command-table of the frame -
defined in that table or in a table that it inherits from.

In principle you could specialize command-enabled for your frame classes.
Alternatively, you could make the frame's command table inherit from the
tables containing the commands.



Main Index | Thread Index