Mercurial > hg > xemacs-beta
comparison man/widget.texi @ 444:576fb035e263 r21-2-37
Import from CVS: tag r21-2-37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:36:19 +0200 |
parents | 8de8e3f6228a |
children | 2cf5d151eeb9 |
comparison
equal
deleted
inserted
replaced
443:a8296e22da4e | 444:576fb035e263 |
---|---|
92 The advantages for a programmer of using the @code{widget} package to | 92 The advantages for a programmer of using the @code{widget} package to |
93 implement forms are: | 93 implement forms are: |
94 | 94 |
95 @enumerate | 95 @enumerate |
96 @item | 96 @item |
97 More complex field than just editable text are supported. | 97 More complex fields than just editable text are supported. |
98 @item | 98 @item |
99 You can give the user immediate feedback if he enters invalid data in a | 99 You can give the user immediate feedback if he enters invalid data in a |
100 text field, and sometimes prevent entering invalid data. | 100 text field, and sometimes prevent entering invalid data. |
101 @item | 101 @item |
102 You can have fixed sized fields, thus allowing multiple field to be | 102 You can have fixed sized fields, thus allowing multiple field to be |
428 @example | 428 @example |
429 NAME ::= (NAME [KEYWORD ARGUMENT]... ARGS) | 429 NAME ::= (NAME [KEYWORD ARGUMENT]... ARGS) |
430 | NAME | 430 | NAME |
431 @end example | 431 @end example |
432 | 432 |
433 Where, @var{name} is a widget name, @var{keyword} is the name of a | 433 where @var{name} is a widget name, @var{keyword} is the name of a |
434 property, @var{argument} is the value of the property, and @var{args} | 434 property, @var{argument} is the value of the property, and @var{args} |
435 are interpreted in a widget specific way. | 435 are interpreted in a widget specific way. |
436 | 436 |
437 There following keyword arguments that apply to all widgets: | 437 There following keyword arguments that apply to all widgets: |
438 | 438 |
508 @item a symbol | 508 @item a symbol |
509 The value of the symbol is expanded according to this table. | 509 The value of the symbol is expanded according to this table. |
510 @end table | 510 @end table |
511 | 511 |
512 @item :doc | 512 @item :doc |
513 The string inserted by the @samp{%d} escape in the format | 513 The string inserted by the @samp{%d} or @samp{%h} escape in the format |
514 string. | 514 string. |
515 | 515 |
516 @item :tag | 516 @item :tag |
517 The string inserted by the @samp{%t} escape in the format | 517 The string inserted by the @samp{%t} escape in the format |
518 string. | 518 string. |
557 @item :match | 557 @item :match |
558 Should be a function called with two arguments, the widget and a value, | 558 Should be a function called with two arguments, the widget and a value, |
559 and returning non-nil if the widget can represent the specified value. | 559 and returning non-nil if the widget can represent the specified value. |
560 | 560 |
561 @item :validate | 561 @item :validate |
562 A function which takes a widget as an argument, and return nil if the | 562 A function which takes a widget as an argument, and returns nil if the |
563 widget's current value is valid for the widget. Otherwise it should | 563 widget's current value is valid for the widget. Otherwise it should |
564 return the widget containing the invalid data, and set that widget's | 564 return the widget containing the invalid data, and set that widget's |
565 @code{:error} property to a string explaining the error. | 565 @code{:error} property to a string explaining the error. |
566 | 566 |
567 The following predefined function can be used: | 567 The following predefined function can be used: |
720 | 720 |
721 The following extra properties are recognized. | 721 The following extra properties are recognized. |
722 | 722 |
723 @table @code | 723 @table @code |
724 @item :size | 724 @item :size |
725 The width of the editable field.@* | 725 The minimum width of the editable field.@* |
726 By default the field will reach to the end of the line. | 726 By default the field will reach to the end of the line. If the |
727 content is too large, the displayed representation will expand to | |
728 contain it. The content is not truncated to size. | |
727 | 729 |
728 @item :value-face | 730 @item :value-face |
729 Face used for highlighting the editable field. Default is | 731 Face used for highlighting the editable field. Default is |
730 @code{widget-field-face}. | 732 @code{widget-field-face}. |
731 | 733 |
740 which matches everything. | 742 which matches everything. |
741 | 743 |
742 @item :keymap | 744 @item :keymap |
743 Keymap used in the editable field. The default value is | 745 Keymap used in the editable field. The default value is |
744 @code{widget-field-keymap}, which allows you to use all the normal | 746 @code{widget-field-keymap}, which allows you to use all the normal |
745 editing commands, even if the buffers major mode suppress some of them. | 747 editing commands, even if the buffer's major mode suppress some of them. |
746 Pressing return invokes the function specified by @code{:action}. | 748 Pressing return invokes the function specified by @code{:action}. |
747 @end table | 749 @end table |
748 | 750 |
749 @node text, menu-choice, editable-field, Basic Types | 751 @node text, menu-choice, editable-field, Basic Types |
750 @comment node-name, next, previous, up | 752 @comment node-name, next, previous, up |