[mcclim-devel] Context menu
Timothy Moore
moore at bricoworks.com
Sun May 15 14:43:11 UTC 2005
On May 15, 2005, at 12:19 PM, Duncan Rose wrote:
>
> I think I'm missing something to do with defining commands, and
> right-click context menus.
>
> I have process objects that are presented and a number of commands
> defined for this type. I assumed (presumably wrongly :-) that these
> commands would be displayed automatically when the presentation is
> right-clicked over.
>
You need to define a presentation translator for something to appear in
the context menu. You do that by:
* Specifying a gesture in the define-glimpse-command form. You've
specifically said nil there;
* Using define-presentation-to-command-translator with a non-nil menu
argument.
Tim
> An example command definition follows:
>
> (define-glimpse-command (com-kill-process :name t :menu nil)
> ((obj 'ccl::process ; need to generalize this...
> :prompt "process"
> :gesture nil))
> (clim-sys:destroy-process obj)
> (com-show-processes))
>
> [aside; I suspect it could be useful to define a PROCESS type in
> CLIM-SYS]
>
> Do commands need to have a specific ':menu' entry to appear?
>
> -Duncan
>
> _______________________________________________
> mcclim-devel mailing list
> mcclim-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel
More information about the mcclim-devel
mailing list