MacroPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version


Arguments: class-name superclass-names slot-specifiers &rest class-options

7.0 release note: the option called :editor-mode in earlier releases is now called :editor-type.

Defines a class that has properties, so as to effectively combine a defclass expression with an associated defproperties expression. defcomponent is similar to defclass, except that a :properties option may be specified as follows:

(defcomponent thing
  ((color ...)
   (size ...))
   :color red
   :size 4)
  (:documentation "A silly class")
    :help-string "Color of the thing."
    :type rgb-or-nil
    :editor-type :color)
    :help-string "How big the thing is."
    :type positive-integer)

More examples are on the defproperties page.

The format of the properties option is similar to defproperties except that the symbol define-property is not needed at the beginning of the list for each property.

A property may define any of the following property facets, listed here with the initarg that is used to specify each:

Properties of CLOS classes inherit similarly to slots. Only those facets that differ from the inherited property need be specified for a given class, and properties that have no differing facets need not be specified at all.

Properties are shown on a separate tab of the inspector, and thus can serve as a relatively high-level interface to the object by providing a selected subset of the object's internal attributes, where each property knows to either disallow modification or to cause appropriate side effects upon modification in order to maintain a consistent environment.

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.

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