Next Prev Up Top Contents Index

8.5.3 Defining Presentation Translators for the Blank Area

You can also write presentation translators that apply to blank areas of the window, that is, areas where there are no presentations. Use blank-area as the from-presentation-type . There is no highlighting when such a translator is applicable, since there is no presentation to highlight. You can write presentation translators that apply in any context by supplying nil as the to-presentation-type .

When you are writing an interactive graphics routine, you will probably encounter the need to have commands available when the mouse is not over any object. To do this, you write a translator from the blank area.

The presentation type of the blank area is blank-area . You probably want the :x and :y arguments to the translator.

For example:

(clim:define-presentation-to-command-translator 
 add-circle-here 
 (clim:blank-area com-add-circle my-command-table 
                  :documentation "Add a circle here.") 
 (x y)
 `(,x ,y)) 

CommonLisp Interface Manager 2.0 User's Guide - 8 Aug 2003

Next Prev Up Top Contents Index