comparison man/widget.texi @ 37448:a788be76cf22

widget-define => define-widget.
author Richard M. Stallman <rms@gnu.org>
date Tue, 24 Apr 2001 15:19:16 +0000
parents 00a52c680a19
children 8da84c32ff29
comparison
equal deleted inserted replaced
37447:0bc52782144f 37448:a788be76cf22
147 147
148 @cindex widget library, files 148 @cindex widget library, files
149 @table @file 149 @table @file
150 @item widget.el 150 @item widget.el
151 This will declare the user variables, define the function 151 This will declare the user variables, define the function
152 @code{widget-define}, and autoload the function @code{widget-create}. 152 @code{define-widget}, and autoload the function @code{widget-create}.
153 @item wid-edit.el 153 @item wid-edit.el
154 Everything else is here, there is no reason to load it explicitly, as 154 Everything else is here, there is no reason to load it explicitly, as
155 it will be autoloaded when needed. 155 it will be autoloaded when needed.
156 @end table 156 @end table
157 157
1478 @comment node-name, next, previous, up 1478 @comment node-name, next, previous, up
1479 @section Defining New Widgets 1479 @section Defining New Widgets
1480 @cindex new widgets 1480 @cindex new widgets
1481 @cindex defining new widgets 1481 @cindex defining new widgets
1482 1482
1483 You can define specialized widgets with @code{widget-define}. It allows 1483 You can define specialized widgets with @code{define-widget}. It allows
1484 you to create a shorthand for more complex widgets, including specifying 1484 you to create a shorthand for more complex widgets, including specifying
1485 component widgets and new default values for the keyword 1485 component widgets and new default values for the keyword
1486 arguments. 1486 arguments.
1487 1487
1488 @defun widget-define name class doc &rest args 1488 @defun define-widget name class doc &rest args
1489 Define a new widget type named @var{name} from @code{class}. 1489 Define a new widget type named @var{name} from @code{class}.
1490 1490
1491 @var{name} and class should both be symbols, @code{class} should be one 1491 @var{name} and class should both be symbols, @code{class} should be one
1492 of the existing widget types. 1492 of the existing widget types.
1493 1493
1508 @end lisp 1508 @end lisp
1509 @end itemize 1509 @end itemize
1510 1510
1511 @end defun 1511 @end defun
1512 1512
1513 Using @code{widget-define} just stores the definition of the widget type 1513 Using @code{define-widget} just stores the definition of the widget type
1514 in the @code{widget-type} property of @var{name}, which is what 1514 in the @code{widget-type} property of @var{name}, which is what
1515 @code{widget-create} uses. 1515 @code{widget-create} uses.
1516 1516
1517 If you only want to specify defaults for keywords with no complex 1517 If you only want to specify defaults for keywords with no complex
1518 conversions, you can use @code{identity} as your conversion function. 1518 conversions, you can use @code{identity} as your conversion function.