CLIM mail archive
[Prev][Next][Index][Thread]
Command tables/menus (CLIM 1.0)
This is a quickie how to question. My situation is as follows:
I want each of my command-tables to appear as a single item on my
:command-menu pane. When I click on one of them then a sub-menu of a
subset of the commands within that command-table to appear for selection.
I also want every command within all of my commands invokable from an
interactor pane. I know I can use add-menu-item-to-command-table or include the sub-command spec in the define-command-table :menu form, but that
means I have my menu specification separate from my command which seems
messy. Is there a way to get something like the example below to do what
I want? Is there something trivial I am missing?
(define-command-table one) ;it would be nice if there was a :menu t option
(define-command-table two)
(define-application-frame whatever () ()
(:panes (app :application) (active :interactor)
(top-most-menu :command-menu))
(layout ((normal
(column 1 (:row 1/50 (one 1/2) (two 1/2))
(:row 1/10)
(:row :rest app)))))
(:command-table (t :inherit-from (one two))))
(define-command (test1 :command-table one :menu t :name t) () ...)
(define-command (test2 :command-table one :menu t :name t) () ...)
(define-command (test3 :command-table one :menu t :name t) () ...)
;;Here we have 3 different commands in command-table two but their menu
;;items appear similar to those in command-table one's!
(define-command (test4 :command-table two :menu "test1" :name t) () ...)
(define-command (test5 :command-table two :menu "test2" :name t) () ...)
(define-command (test6 :command-table two :menu "test3" :name t) () ...)
... etc.
Follow-Ups:
Main Index |
Thread Index