Generic FunctionPackage: ideToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

maker-function

Arguments: module

When an application window is designed in the IDE using a form, several functions associated with the form/window are defined in a .bil file. The .bil file is automatically generated, so it can be examined but should not be edited (as the edits will be lost when the file is next generated). One of the functions in the .bil file is the maker function, which creates the window, and the other is the finder function, which finds the window (returning it, after calling the maker function to create it if it is not already created). See IDE User Guide, chapter 4: Projects for more discussion on this point.

This function returns the name (a symbol) of the maker function associated with the form/window named by module. finder-function returns the name of the finder function. maker-function and finder-function may be called only in the IDE, where the projects facility exists. Application code should instead directly call the functions that are returned by maker-function and/or finder-function, and you can determine the names of these functions based on a form's name, as described below. So there is usually no need to use these functions, though they may be useful in utility code that you might write for use in the IDE. A related function that may be called in a standalone application is main-window-maker.

module should be the module associated with the form. You get the module object by calling find-module with arguments the project containing the form and the form name. Form/window names are typically keywords. When a new form is displayed in the IDE, to be used to design an application window, its name is something like :form6. The programmer typically changes the name to something more meaningful for the application, such as :curve-dialog (to use an example from the tutorial).

The names of the finder function and the maker function are determined by the following rules:

The name of the finder function is a symbol with the same name as the form but in the package of the project (more precisely, the package of the form, but that is typically the same as the project package). Therefore, if the form is named :form6 and the package is my-package, the finder function is named my-package::form6. Assuming the project containing the form is the current project,

(ide:finder-function (find-module (current-project) :form6) )
  -> my-package::form6

If the name of the form is :curve-dialog and the package is common-graphics-user, then if finder-function is called with the :curve-dialog module as an argument, it returns the symbol common-graphics-user::curve-dialog.

The name of the maker function is the finder function's name with make- prepended, my-package::make-form6 and common-graphics-user::make-curve-dialog in the examples above.

The finder function (whose name is returned by finder-function) returns a window that has already been created from the form if one exists, otherwise creating (by calling the maker function) the window and returning it. The maker function (whose name is returned by maker-function) always creates a new window and returns it.

The finder function takes no arguments, and always creates the window (when it does create one) as a non-owned top-level window with the properties that were specified at design time.

The maker function, on the other hand, has a number of keyword arguments that allow creation of the window as an owned or child window of any other window and with a custom position, size, name, title, and/or border. The names of the maker function's keyword arguments are owner, child-p, exterior, interior, name, title, and border. These arguments have the same meanings as they do with the function make-window. The new in 8.0 interior argument is provided with a default value (the size of the interior of the form used to design the window). The exterior has no default value. The interior argument is provided with a default value (the size of the interior of the form used to design the window). The exterior has no default value.

If the arguments that are supplied with a maker-function are not adequate for creating the window in the desired way at run time (because the maker-function does not have all of the arguments of make-window), a solution is to change the state property of the form to :shrunk so that the window is not yet visible when it is created. Then at run time you can modify the window after calling the maker-function to create it, and then call (setf state) to set the window's state to :normal when it is ready to be seen.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version