All Manuals > Common Lisp Interface Manager 2.0 User's Guide > Chapter 9 Defining Application Frames > 9.2 Defining CLIM Application Frames

NextPrevUpTopContentsIndex

9.2.3 Using the :panes and :layouts Options

If the :pane option is not used, a set of named panes can be specified with the :panes option. Optionally, :layouts can also be used to describe different layouts of the set of panes.

The value of the :panes option is an alist, each entry of which is of the form (name . body) . name is a symbol that names the pane, and body specifies how to create the pane. body is either a list containing a single element that is itself a list, or a list consisting of a symbol followed by zero or more keyword-value pairs. In the first case, the body is a form exactly like the form used in the :pane option. In the second case, body is a pane abbreviation , where the initial symbol names the type of pane, and the keyword-value pairs are pane options. For gadgets, the pane type is the class name of the abstract gadget (for example, slider or push-button ). For CLIM extended stream panes, the following abbreviations are defined:

:interactor --a pane of type interactor-pane

:application --a pane of type application-pane

:command-menu --a pane of type command-menu-pane

:pointer-documentation --a pane suitable for displaying pointer documentation, if the host window system does not provide this

:title --a pane suitable for displaying the title of the application. If the host window system provides this, the title will be displayed with the window decorations supplied by the window manager, and the CLIM title pane will be omitted.

:accept-values --a pane that can hold a "modeless" accepting-values dialog

See Chapter 10, Panes and Gadgets for more information on the individual pane and gadget classes and the options they support.

An example of the use of :panes is:

(:panes 
 (buttons
  (horizontally () 
                (make-pane 'push-button :label "Press me") 
                (make-pane 'push-button :label "Squeeze me"))) 
 (toggle toggle-button 
         :label "Toggle me") 
 (interactor :interactor 
             :width 300 :height 300)
 (application :application 
              :display-function 'another-display-function
              :incremental-redisplay t)) 

The value of the :layouts option is an alist, each entry of which is of the form (name . layout) . name is a symbol that names the layout, and layout specifies the layout. layout is a form like the form used in the :pane option, with the extension to the syntax such that the name of a named pane can be used wherever a pane may appear. For example, assuming a frame that uses the :panes example, the following layouts could be specified:

(:layouts 
 (default 
   (vertically () 
               button toggle 
               (scrolling () application) 
               interactor)) 
 (alternate
  (vertically () 
              (scrolling () application) 
              (scrolling () interactor) 
              (horizontally ()
                            button toggle)))) 

 


Common Lisp Interface Manager 2.0 User's Guide - 20 Sep 2011

NextPrevUpTopContentsIndex