All Manuals > Common Lisp Interface Manager 2.0 User's Guide > Chapter 8 Presentation Translators in CLIM > 8.5 Examples of Defining Presentation Translators in CLIM

NextPrevUpTopContentsIndex

8.5.4 Defining a Presentation Action

Presentation actions are only rarely needed. Often a presentation-to-command translator is more appropriate. One example where actions are appropriate is when you wish to pop up a menu during command input. Here is how CLIM's general menu action could be implemented:

(clim:define-presentation-action
 presentation-menu
 (t nil clim:global-command-table 
    :tester-definitive t :documentation "Menu" 
    :menu nil :gesture :menu) 
 (presentation frame window x y) 
 (clim:call-presentation-menu presentation clim:*input-context* 
                              frame window x y :for-menu t)) 

Common Lisp Interface Manager 2.0 User's Guide - 7 Aug 2017

NextPrevUpTopContentsIndex