All Manuals > CAPI User Guide > 8 Modifying CAPI Windows

NextPrevUpTopContentsIndex

8.2 Resizing and positioning

Programmatic resizing can be done using the function set-top-level-interface-geometry . For example, to double the width of an interface about its center:

(setf interface (contain (make-instance 'interface)))

Use the mouse or window manager-specific gesture to resize the interface, then evaluate:

(multiple-value-bind (x y w h) 
    (top-level-interface-geometry interface)
  (execute-with-interface interface 
                          'set-top-level-interface-geometry 
                          interface 
                          :x (round (- x (* 0.5 w))) 
                          :y y 
                          :width (* 2 w) 
                          :height h))

All resize operations are subject to the constraints. The constraints can be altered programmatically as described in Changing the constraints.

Resize operations are also subject to automatic modification by the system in cases where the new window geometry coincides with a system area such as the Mac OS X menu bar or the Microsoft Windows taskbar, as described in Positioning CAPI windows.

8.2.1 Positioning CAPI windows


CAPI User Guide (Unix version) - 30 Aug 2011

NextPrevUpTopContentsIndex