define-event-class |
| event-class-name
( {superclass-name}*) ( {slot-specifier}*) | [Macro] |
Purpose
Define or redefine an event class.
Package :gbbopen
Module :gbbopen-core
Arguments and values
event-class-name | A non-nil , non-keyword symbol that names the
event class
| |
superclass-name | A non-nil , non-keyword symbol that specifies a
direct superclass of the event class event-class-name
| |
slot-specifiers | See below | |
class-options | See below | |
new-event-class | A new or modified event class object. |
Returns
The newly defined or modified event class object.
Detailed syntax
| slot-name |
( slot-name [[slot-option]]) |
| {:accessor reader-function-name}* | |
{:allocation allocation-type} | | |
{:documentation string} | | |
{:initarg initarg-name}* | | |
{:initform form} | | |
{:reader reader-function-name}* | | |
{:type type-specifier} | | |
{:writer writer-function-name}* | |
| (:abstract boolean) | |
(:default-initargs . initarg-list) | | |
(:documentation string) | | |
(:event-metaclass event-metaclass-specifier) | | |
(:event-printing event-printing-specifier/code) | | |
(:export-accessors boolean) | | |
(:export-class-name boolean) | | |
(:export-slot-names direct-slots-specifier) | | |
(:generate-accessors direct-slots-specifier) | | |
(:generate-accessors-format
{:prefix | :suffix } | | |
(:generate-accessors-prefix {string |
symbol}) | | |
(:generate-accessors-suffix {string |
symbol}) | | |
(:generate-initargs direct-slots-specifier) | | |
(:metaclass class-name) | |
| non-instance-event-class | instance-event-class | |
space-instance-event-class | | |
nonlink-slot-event-class | link-slot-event-class | |
| nil | t |
included-slot-name* | |
{t :exclude excluded-slot-name*} | |
Terms
class-name | A non-nil , non-keyword symbol that names a
class
| |
documentation | A documentation string | |
initarg-list | An initialization argument list | |
slot-name | A non-nil , non-keyword symbol
|
Description
Each superclass-name argument specifies a direct superclass of the new
class. If the superclass list is empty, then the direct superclass defaults to
the single class
The :metaclass
class-name class option, if specified, must be a
subclass of
Compatible Event-Superclass Metaclasses | |||||||||||
Event | non- | space- |
nonlink- | link- | |||||||
Metaclass | instance | instance |
instance | slot | slot | ||||||
non-instance-event-class
| X | ||||||||||
instance-event-class
| X | X | |||||||||
space-instance-event-class
| X | X | X | ||||||||
nonlink-slot-event-class
| X | X | X | ||||||||
link-slot-event-class
| X | X | X | ||||||||
The table in the documentation for
See also
signal-event
standard-event-class
standard-event-instance
with-generate-accessors-format
Example
> (define-event-class my-event (non-instance-event) ((my-event-arg1 :initform nil) (my-event-arg2 :initform nil))) #<non-instance-event-class my-event> >
The GBBopen Project
define-event-class |