MacroPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.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-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version