Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## center-window

Arguments: window &key on-parent return-only width height

Moves a window so that it is centered over the interior of its owner or parent. Returns a box that indicates the new exterior of the window.

window should be an instance of the `basic-pane` class or one of its subclasses.

If on-parent is true, then the window is centered over its parent, and otherwise it is centered over its owner. The default is `nil`. (The parent and owner of a window are different only when the window is a top-level owned window, in which case the parent is the screen and the owner is the owner window.)

If return-only is true, then the window is actually not moved at all, but the box to where it would have been moved is still returned. If `nil` (the default), then the window is moved and its new exterior box is returned.

width and height may each be `nil` (the default) to use the current width or height of the window, or else a positive integer to indicate a new width or height to which to resize the window while centering it.

See also the `:centered` argument to make-window and the centered property.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version