Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

default-width

Arguments: window-or-configuration

Returns the width to be used for a newly created window if an explicit width was not specified in the call to make-window. This function is called automatically by the system and should not be called by applications, but an application may supply default-width methods to specify the default sizes for its window subclasses.

The default-width is used as described below when a window is created with make-window but neither the :exterior nor :interior arguments are specified.

The default-width is called after the Lisp object for the window has been created but before the actual window has been created by the operating system. It returns an integer denoting the width to use for the new window. The default version of this method (for simple-streams) works as follows. The width is determined by:

1. If a method is supplied for the class of the window argument, and that method returns an integer (rather than nil), that value is used for the width. Otherwise:

2. If the value of (default-width (configuration *system*)) is true, use that value for the width. (It is nil initially though.)

3. If (default-width (configuration *system*)) is nil, multiply the width of the screen, (width (screen *system*)), by (default-width-factor (configuration *system*)) and use the result as the width.

default-width methods may be added for window subclasses of an application in lieu of passing the equivalent initargs for each window instance.

You can pass the :exterior-top-left argument to make-window in order to specify a particular position for the top-left corner of a window without overriding these default size methods. The top-left position will otherwise default to being offset somewhat from the position at which the previous window was created.

default-width is a property of the configuration class. See also default-height and default-top-left.


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.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version