Mercurial > emacs
comparison man/widget.texi @ 90614:8dd8c8286063
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 460-475)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 145-152)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-118
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 15 Oct 2006 02:54:13 +0000 |
parents | e6bf73e43cf4 381523fcc2fd |
children | 7eeafaaa9eab |
comparison
equal
deleted
inserted
replaced
90613:7a2fdfcc7f71 | 90614:8dd8c8286063 |
---|---|
156 | 156 |
157 @node User Interface, Programming Example, Introduction, Top | 157 @node User Interface, Programming Example, Introduction, Top |
158 @comment node-name, next, previous, up | 158 @comment node-name, next, previous, up |
159 @section User Interface | 159 @section User Interface |
160 | 160 |
161 A form consist of read only text for documentation and some fields, | 161 A form consists of read only text for documentation and some fields, |
162 where each field contains two parts, a tag and a value. The tags are | 162 where each field contains two parts, a tag and a value. The tags are |
163 used to identify the fields, so the documentation can refer to the | 163 used to identify the fields, so the documentation can refer to the |
164 @samp{foo field}, meaning the field tagged with @samp{Foo}. Here is an | 164 @samp{foo field}, meaning the field tagged with @samp{Foo}. Here is an |
165 example form: | 165 example form: |
166 | 166 |
193 @b{( )} A Final One. | 193 @b{( )} A Final One. |
194 | 194 |
195 @b{[Apply Form]} @b{[Reset Form]} | 195 @b{[Apply Form]} @b{[Reset Form]} |
196 @end example | 196 @end example |
197 | 197 |
198 The top level widgets in is example are tagged @samp{Name}, | 198 The top level widgets in this example are tagged @samp{Name}, |
199 @samp{Choose}, @samp{Address}, @samp{_other work_}, @samp{Numbers}, | 199 @samp{Choose}, @samp{Address}, @samp{_other work_}, @samp{Numbers}, |
200 @samp{Select multiple}, @samp{Select one}, @samp{[Apply Form]}, and | 200 @samp{Select multiple}, @samp{Select one}, @samp{[Apply Form]}, and |
201 @samp{[Reset Form]}. There are basically two things the user can do | 201 @samp{[Reset Form]}. There are basically two things the user can do |
202 within a form, namely editing the editable text fields and activating | 202 within a form, namely editing the editable text fields and activating |
203 the buttons. | 203 the buttons. |
275 Activating these will insert or delete elements from an editable list. | 275 Activating these will insert or delete elements from an editable list. |
276 The list is created by the @code{editable-list} widget. | 276 The list is created by the @code{editable-list} widget. |
277 @cindex embedded buttons | 277 @cindex embedded buttons |
278 @item Embedded Buttons | 278 @item Embedded Buttons |
279 The @samp{@b{_other work_}} is an example of an embedded | 279 The @samp{@b{_other work_}} is an example of an embedded |
280 button. Embedded buttons are not associated with a fields, but can serve | 280 button. Embedded buttons are not associated with any fields, but can serve |
281 any purpose, such as implementing hypertext references. They are | 281 any purpose, such as implementing hypertext references. They are |
282 usually created by the @code{link} widget. | 282 usually created by the @code{link} widget. |
283 @item The @samp{@b{[ ]}} and @samp{@b{[X]}} buttons | 283 @item The @samp{@b{[ ]}} and @samp{@b{[X]}} buttons |
284 Activating one of these will convert it to the other. This is useful | 284 Activating one of these will convert it to the other. This is useful |
285 for implementing multiple-choice fields. You can create it with the | 285 for implementing multiple-choice fields. You can create them with the |
286 @code{checkbox} widget. | 286 @code{checkbox} widget. |
287 @item The @samp{@b{( )}} and @samp{@b{(*)}} buttons | 287 @item The @samp{@b{( )}} and @samp{@b{(*)}} buttons |
288 Only one radio button in a @code{radio-button-choice} widget can be | 288 Only one radio button in a @code{radio-button-choice} widget can be |
289 selected at any time. When you invoke one of the unselected radio | 289 selected at any time. When you invoke one of the unselected radio |
290 buttons, it will be selected and the previous selected radio button will | 290 buttons, it will be selected and the previous selected radio button will |
291 become unselected. | 291 become unselected. |
292 @item The @samp{@b{[Apply Form]}} @samp{@b{[Reset Form]}} buttons | 292 @item The @samp{@b{[Apply Form]}} and @samp{@b{[Reset Form]}} buttons |
293 These are explicit buttons made with the @code{push-button} widget. The | 293 These are explicit buttons made with the @code{push-button} widget. The |
294 main difference from the @code{link} widget is that the buttons will be | 294 main difference from the @code{link} widget is that the buttons will be |
295 displayed as GUI buttons when possible. | 295 displayed as GUI buttons when possible. |
296 @end table | 296 @end table |
297 | 297 |
490 Where, @var{name} is a widget name, @var{keyword} is the name of a | 490 Where, @var{name} is a widget name, @var{keyword} is the name of a |
491 property, @var{argument} is the value of the property, and @var{args} | 491 property, @var{argument} is the value of the property, and @var{args} |
492 are interpreted in a widget specific way. | 492 are interpreted in a widget specific way. |
493 | 493 |
494 @cindex keyword arguments | 494 @cindex keyword arguments |
495 The following keyword arguments that apply to all widgets: | 495 The following keyword arguments apply to all widgets: |
496 | 496 |
497 @table @code | 497 @table @code |
498 @vindex value@r{ keyword} | 498 @vindex value@r{ keyword} |
499 @item :value | 499 @item :value |
500 The initial value for widgets of this type. | 500 The initial value for widgets of this type. |
805 @example | 805 @example |
806 TYPE ::= (editable-field [KEYWORD ARGUMENT]... [ VALUE ]) | 806 TYPE ::= (editable-field [KEYWORD ARGUMENT]... [ VALUE ]) |
807 @end example | 807 @end example |
808 | 808 |
809 The @var{value}, if present, is used to initialize the @code{:value} | 809 The @var{value}, if present, is used to initialize the @code{:value} |
810 property. The value should be a string, which will be inserted in | 810 property. The value should be a string, which will be inserted in the |
811 field. This widget will match all string values. | 811 field. This widget will match all string values. |
812 | 812 |
813 The following extra properties are recognized: | 813 The following extra properties are recognized: |
814 | 814 |
815 @table @code | 815 @table @code |
1347 second component. There must be exactly two components. | 1347 second component. There must be exactly two components. |
1348 @end deffn | 1348 @end deffn |
1349 | 1349 |
1350 @deffn Widget list | 1350 @deffn Widget list |
1351 The value of a @code{list} widget is a list containing the value of | 1351 The value of a @code{list} widget is a list containing the value of |
1352 each of its component. | 1352 each of its components. |
1353 @end deffn | 1353 @end deffn |
1354 | 1354 |
1355 @deffn Widget vector | 1355 @deffn Widget vector |
1356 The value of a @code{vector} widget is a vector containing the value of | 1356 The value of a @code{vector} widget is a vector containing the value of |
1357 each of its component. | 1357 each of its component. |
1358 @end deffn | 1358 @end deffn |
1359 | 1359 |
1360 The above suffice for specifying fixed size lists and vectors. To get | 1360 The above suffice for specifying fixed size lists and vectors. To get |
1361 variable length lists and vectors, you can use a @code{choice}, | 1361 variable length lists and vectors, you can use a @code{choice}, |
1362 @code{set}, or @code{repeat} widgets together with the @code{:inline} | 1362 @code{set}, or @code{repeat} widget together with the @code{:inline} |
1363 keywords. If any component of a composite widget has the @code{:inline} | 1363 keyword. If any component of a composite widget has the @code{:inline} |
1364 keyword set, its value must be a list which will then be spliced into | 1364 keyword set, its value must be a list which will then be spliced into |
1365 the composite. For example, to specify a list whose first element must | 1365 the composite. For example, to specify a list whose first element must |
1366 be a file name, and whose remaining arguments should either by the | 1366 be a file name, and whose remaining arguments should either be the |
1367 symbol @code{t} or two files, you can use the following widget | 1367 symbol @code{t} or two files, you can use the following widget |
1368 specification: | 1368 specification: |
1369 | 1369 |
1370 @example | 1370 @example |
1371 (list file | 1371 (list file |
1388 and has a similar syntax. | 1388 and has a similar syntax. |
1389 @end deffn | 1389 @end deffn |
1390 | 1390 |
1391 @deffn Widget set | 1391 @deffn Widget set |
1392 Allows you to specify a type which must be a list whose elements all | 1392 Allows you to specify a type which must be a list whose elements all |
1393 belong to given set. The elements of the list are not significant. | 1393 belong to the given set. The elements of the list are not significant. |
1394 This is implemented on top of the @code{checklist} basic widget, and has | 1394 This is implemented on top of the @code{checklist} basic widget, and has |
1395 a similar syntax. | 1395 a similar syntax. |
1396 @end deffn | 1396 @end deffn |
1397 | 1397 |
1398 @deffn Widget repeat | 1398 @deffn Widget repeat |