comparison man/widget.texi @ 20:859a2309aef8 r19-15b93

Import from CVS: tag r19-15b93
author cvs
date Mon, 13 Aug 2007 08:50:05 +0200
parents 0293115a14e9
children 8fc7fe29b841
comparison
equal deleted inserted replaced
19:ac1f612d5250 20:859a2309aef8
1 \input texinfo.tex 1 \input texinfo.tex
2 2
3 @c $Id: widget.texi,v 1.1 1997/02/02 04:58:52 steve Exp $ 3 @c $Id: widget.texi,v 1.2 1997/02/09 23:52:13 steve Exp $
4 4
5 @c %**start of header 5 @c %**start of header
6 @setfilename widget 6 @setfilename widget
7 @settitle The Emacs Widget Library 7 @settitle The Emacs Widget Library
8 @iftex 8 @iftex
13 13
14 @node Top, Introduction, (dir), (dir) 14 @node Top, Introduction, (dir), (dir)
15 @comment node-name, next, previous, up 15 @comment node-name, next, previous, up
16 @top The Emacs Widget Library 16 @top The Emacs Widget Library
17 17
18 Version: 1.20 18 Version: 1.30
19 19
20 @menu 20 @menu
21 * Introduction:: 21 * Introduction::
22 * User Interface:: 22 * User Interface::
23 * Programming Example:: 23 * Programming Example::
625 625
626 @item :value-face 626 @item :value-face
627 Face used for highlighting the editable field. Default is 627 Face used for highlighting the editable field. Default is
628 @code{widget-field-face}. 628 @code{widget-field-face}.
629 629
630 @item :secret
631 Character used to display the value. You can set this to e.g. @code{?*}
632 if the field contains a password or other secret information. By
633 default, the value is not secret.
634
635 @item :valid-regexp
636 By default the @code{:validate} function will match the content of the
637 field with the value of this attribute. The default value is @code{""}
638 which matches everything.
639
630 @item :keymap 640 @item :keymap
631 Keymap used in the editable field. @code{widget-keymap} will allow you 641 Keymap used in the editable field. The default value is
632 to use normal editing commands, even if these has been suppressed in the 642 @code{widget-field-keymap}, which allows you to use all the normal
633 current buffer. 643 editing commands, even if the buffers major mode supress some of them.
644 Pressing return activates the function specified by @code{:activate}.
634 645
635 @item :hide-front-space 646 @item :hide-front-space
636 @itemx :hide-rear-space 647 @itemx :hide-rear-space
637 In order to keep track of the editable field, emacs places an invisible 648 In order to keep track of the editable field, emacs places an invisible
638 space character in front of the field, and for fixed sized fields also 649 space character in front of the field, and for fixed sized fields also
658 @node text, menu-choice, editable-field, Basic Types 669 @node text, menu-choice, editable-field, Basic Types
659 @comment node-name, next, previous, up 670 @comment node-name, next, previous, up
660 @subsection The @code{text} Widget 671 @subsection The @code{text} Widget
661 672
662 This is just like @code{editable-field}, but intended for multiline text 673 This is just like @code{editable-field}, but intended for multiline text
663 fields. 674 fields. The default @code{:keymap} is @code{widget-text-keymap}, which
675 does not rebind the return key.
664 676
665 @node menu-choice, radio-button-choice, text, Basic Types 677 @node menu-choice, radio-button-choice, text, Basic Types
666 @comment node-name, next, previous, up 678 @comment node-name, next, previous, up
667 @subsection The @code{menu-choice} Widget 679 @subsection The @code{menu-choice} Widget
668 680
1087 1099
1088 @node Widget Properties, Defining New Widgets, Sexp Types, Top 1100 @node Widget Properties, Defining New Widgets, Sexp Types, Top
1089 @comment node-name, next, previous, up 1101 @comment node-name, next, previous, up
1090 @section Properties 1102 @section Properties
1091 1103
1092 You can examine or set this value by using the widget object that was 1104 You can examine or set the value of a widget by using the widget object
1093 returned by @code{widget-create}. 1105 that was returned by @code{widget-create}.
1094 1106
1095 @defun widget-value widget 1107 @defun widget-value widget
1096 Return the current value contained in @var{widget}. 1108 Return the current value contained in @var{widget}.
1097 It is an error to call this function on an uninitialized widget. 1109 It is an error to call this function on an uninitialized widget.
1098 @end defun 1110 @end defun
1125 @code{widget-put} for @var{property}. 1137 @code{widget-put} for @var{property}.
1126 @end defun 1138 @end defun
1127 1139
1128 @defun widget-member widget property 1140 @defun widget-member widget property
1129 Non-nil if @var{widget} has a value (even nil) for property @var{property}. 1141 Non-nil if @var{widget} has a value (even nil) for property @var{property}.
1142 @end defun
1143
1144 Occasionally it can be useful to know which kind of widget you have,
1145 i.e. the name of the widget type you gave when the widget was created.
1146
1147 @defun widget-name widget
1148 Return the name of @var{widget}, a symbol.
1130 @end defun 1149 @end defun
1131 1150
1132 @node Defining New Widgets, Widget Wishlist., Widget Properties, Top 1151 @node Defining New Widgets, Widget Wishlist., Widget Properties, Top
1133 @comment node-name, next, previous, up 1152 @comment node-name, next, previous, up
1134 @section Defining New Widgets 1153 @section Defining New Widgets
1236 @node Widget Wishlist., , Defining New Widgets, Top 1255 @node Widget Wishlist., , Defining New Widgets, Top
1237 @comment node-name, next, previous, up 1256 @comment node-name, next, previous, up
1238 @section Wishlist. 1257 @section Wishlist.
1239 1258
1240 @itemize @bullet 1259 @itemize @bullet
1241 @item 1260 @item
1242 In general, we need @strong{much} better support for keyboard 1261 A Smalltalk style widget browser.
1243 operations. 1262
1244
1245 @itemize -
1246 @item 1263 @item
1247 It should be possible to add or remove items from a list with @kbd{C-k} 1264 It should be possible to add or remove items from a list with @kbd{C-k}
1248 and @kbd{C-o} (suggested by @sc{rms}). 1265 and @kbd{C-o} (suggested by @sc{rms}).
1249
1250 @item
1251 @kbd{C-k} should kill to end of field or end of line, whatever come
1252 first.
1253
1254 @item
1255 Commands to move to the beginning/end of a field.
1256
1257 @end itemize
1258 1266
1259 @item 1267 @item
1260 The @samp{[INS]} and @samp{[DEL]} buttons should be replaced by a single 1268 The @samp{[INS]} and @samp{[DEL]} buttons should be replaced by a single
1261 dash (@samp{-}). The dash should be a button that, when activated, ask 1269 dash (@samp{-}). The dash should be a button that, when activated, ask
1262 whether you want to add or delete an item (@sc{rms} wanted to git rid of 1270 whether you want to add or delete an item (@sc{rms} wanted to git rid of
1269 1277
1270 @item 1278 @item
1271 There should be support for browsing the widget documentation. 1279 There should be support for browsing the widget documentation.
1272 1280
1273 @item 1281 @item
1274 There should be a way to specify that @key{RET} in a field will call the 1282 Widgets such as @code{file} and @code{symbol} should prompt with completion.
1275 @code{:activate} function. This should be used by widgets such as
1276 @code{file} and @code{symbol} prompt with completion.
1277 1283
1278 @item 1284 @item
1279 The @code{menu-choice} tag should be prettier, something like the abbreviated 1285 The @code{menu-choice} tag should be prettier, something like the abbreviated
1280 menus in Open Look. 1286 menus in Open Look.
1281 1287
1282 @item 1288 @item
1283 The functions used in many widgets, like 1289 The functions used in many widgets, like
1284 @code{widget-item-convert-widget}, should not have names that are 1290 @code{widget-item-convert-widget}, should not have names that are
1285 specific to the first widget where I used them. 1291 specific to the first widget where I happended to use them.
1286 1292
1287 @item 1293 @item
1288 Unchecked items in a @code{radio-button-choice} or @code{checklist} 1294 Unchecked items in a @code{radio-button-choice} or @code{checklist}
1289 should be grayed out, and the subwidgets should somehow become inactive. 1295 should be grayed out, and the subwidgets should somehow become inactive.
1290 This could perhaps be implemented by binding @code{widget-inactive} to t 1296 This could perhaps be implemented by binding @code{widget-inactive} to t