/[emacs]/emacs/man/widget.texi
ViewVC logotype

Diff of /emacs/man/widget.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18.6.1 by handa, Fri Apr 16 12:50:42 2004 UTC revision 1.18.6.2 by miles, Mon Jun 28 07:29:03 2004 UTC
# Line 341  Interface}). Line 341  Interface}).
341    (make-local-variable 'widget-example-repeat)    (make-local-variable 'widget-example-repeat)
342    (let ((inhibit-read-only t))    (let ((inhibit-read-only t))
343      (erase-buffer))      (erase-buffer))
344      (remove-overlays)
345    (widget-insert "Here is some documentation.\n\nName: ")    (widget-insert "Here is some documentation.\n\nName: ")
346    (widget-create 'editable-field    (widget-create 'editable-field
347                   :size 13                   :size 13
# Line 680  image, with either a @file{.xpm} (if sup Line 681  image, with either a @file{.xpm} (if sup
681  @end deffn  @end deffn
682    
683  @deffn{User Option} widget-glyph-enable  @deffn{User Option} widget-glyph-enable
684  If non-nil, allow glyphs to appear on displays where they are supported.  If non-@code{nil}, allow glyphs to appear on displays where they are supported.
685  @end deffn  @end deffn
686    
687    
# Line 813  Face used for highlighting the editable Line 814  Face used for highlighting the editable
814  @item :secret  @item :secret
815  Character used to display the value.  You can set this to e.g.@: @code{?*}  Character used to display the value.  You can set this to e.g.@: @code{?*}
816  if the field contains a password or other secret information.  By  if the field contains a password or other secret information.  By
817  default, this is nil, and the value is not secret.  default, this is @code{nil}, and the value is not secret.
818    
819  @vindex valid-regexp@r{ keyword}  @vindex valid-regexp@r{ keyword}
820  @item :valid-regexp  @item :valid-regexp
# Line 865  specified @var{type} arguments. Line 866  specified @var{type} arguments.
866    
867  @vindex case-fold@r{ keyword}  @vindex case-fold@r{ keyword}
868  @item :case-fold  @item :case-fold
869  Set this to nil if you don't want to ignore case when prompting for a  Set this to @code{nil} if you don't want to ignore case when prompting for a
870  choice through the minibuffer.  choice through the minibuffer.
871    
872  @vindex children@r{ keyword}  @vindex children@r{ keyword}
873  @item :children  @item :children
874  A list whose @code{car} is the widget representing the currently chosen  A list whose @sc{car} is the widget representing the currently chosen
875  type in the buffer.  type in the buffer.
876    
877  @vindex choice@r{ keyword}  @vindex choice@r{ keyword}
# Line 1064  Insert a literal @samp{%}. Line 1065  Insert a literal @samp{%}.
1065  @item :greedy  @item :greedy
1066  Usually a checklist will only match if the items are in the exact  Usually a checklist will only match if the items are in the exact
1067  sequence given in the specification.  By setting @code{:greedy} to  sequence given in the specification.  By setting @code{:greedy} to
1068  non-nil, it will allow the items to come in any sequence.  However, if  non-@code{nil}, it will allow the items to come in any sequence.
1069  you extract the value they will be in the sequence given in the  However, if you extract the value they will be in the sequence given
1070  checklist, i.e.@: the original sequence is forgotten.  in the checklist, i.e.@: the original sequence is forgotten.
1071    
1072  @vindex button-args@r{ keyword}  @vindex button-args@r{ keyword}
1073  @item :button-args  @item :button-args
# Line 1141  The widgets representing the elements of Line 1142  The widgets representing the elements of
1142    
1143  @vindex args@r{ keyword}  @vindex args@r{ keyword}
1144  @item :args  @item :args
1145  List whose @code{car} is the type of the list elements.  List whose @sc{car} is the type of the list elements.
1146  @end table  @end table
1147    
1148  @node group,  , editable-list, Basic Types  @node group,  , editable-list, Basic Types
# Line 1164  The value is a list, with one member for Line 1165  The value is a list, with one member for
1165  @section Sexp Types  @section Sexp Types
1166  @cindex sexp types  @cindex sexp types
1167    
1168  A number of widgets for editing @dfn{s-expressions} (lisp types), sexp  A number of widgets for editing @dfn{s-expressions} (Lisp types), sexp
1169  for short, are also available.  These basically fall in several  for short, are also available.  These basically fall in several
1170  categories described in this section.  categories described in this section.
1171    
# Line 1180  categories described in this section. Line 1181  categories described in this section.
1181  @subsection The Constant Widgets  @subsection The Constant Widgets
1182  @cindex constant widgets  @cindex constant widgets
1183    
1184  The @code{const} widget can contain any lisp expression, but the user is  The @code{const} widget can contain any Lisp expression, but the user is
1185  prohibited from editing it, which is mainly useful as a component of one  prohibited from editing it, which is mainly useful as a component of one
1186  of the composite widgets.  of the composite widgets.
1187    
# Line 1217  An immutable symbol that is bound as a f Line 1218  An immutable symbol that is bound as a f
1218  @subsection Generic Sexp Widget  @subsection Generic Sexp Widget
1219  @cindex generic sexp widget  @cindex generic sexp widget
1220    
1221  The @code{sexp} widget can contain any lisp expression, and allows the  The @code{sexp} widget can contain any Lisp expression, and allows the
1222  user to edit it inline in the buffer.  user to edit it inline in the buffer.
1223    
1224  The syntax for the @code{sexp} widget is:  The syntax for the @code{sexp} widget is:
# Line 1278  Keywords: Line 1279  Keywords:
1279  @table @code  @table @code
1280  @vindex must-match@r{ keyword}  @vindex must-match@r{ keyword}
1281  @item :must-match  @item :must-match
1282  If this is set to non-nil, only existing file names will be allowed in  If this is set to non-@code{nil}, only existing file names will be
1283  the minibuffer.  allowed in the minibuffer.
1284  @end table  @end table
1285  @end deffn  @end deffn
1286    
# Line 1289  Similar to the @code{file} widget. Line 1290  Similar to the @code{file} widget.
1290  @end deffn  @end deffn
1291    
1292  @deffn Widget symbol  @deffn Widget symbol
1293  Allows you to edit a lisp symbol in an editable field.  Allows you to edit a Lisp symbol in an editable field.
1294  @end deffn  @end deffn
1295    
1296  @deffn Widget function  @deffn Widget function
# Line 1309  Allows you to edit a number in an editab Line 1310  Allows you to edit a number in an editab
1310  @end deffn  @end deffn
1311    
1312  @deffn Widget boolean  @deffn Widget boolean
1313  Allows you to edit a boolean.  In lisp this means a variable which is  Allows you to edit a boolean.  In Lisp this means a variable which is
1314  either nil meaning false, or non-nil meaning true.  either @code{nil} meaning false, or non-@code{nil} meaning true.
1315  @end deffn  @end deffn
1316    
1317    
# Line 1330  where each @var{component} must be a wid Line 1331  where each @var{component} must be a wid
1331  will be displayed in the buffer, and will be editable by the user.  will be displayed in the buffer, and will be editable by the user.
1332    
1333  @deffn Widget cons  @deffn Widget cons
1334  The value of a @code{cons} widget is a cons-cell where the @code{car} is  The value of a @code{cons} widget is a cons-cell where the @sc{car} is
1335  the value of the first component and the @code{cdr} is the value of the  the value of the first component and the @sc{cdr} is the value of the
1336  second component.  There must be exactly two components.  second component.  There must be exactly two components.
1337  @end deffn  @end deffn
1338    
# Line 1432  In @var{widget} return the value for @va Line 1433  In @var{widget} return the value for @va
1433  @end defun  @end defun
1434    
1435  @defun widget-member widget property  @defun widget-member widget property
1436  Non-nil if @var{widget} has a value (even nil) for property @var{property}.  Non-@code{nil} if @var{widget} has a value (even @code{nil}) for
1437    property @var{property}.
1438  @end defun  @end defun
1439    
1440  Occasionally it can be useful to know which kind of widget you have,  Occasionally it can be useful to know which kind of widget you have,
# Line 1475  all its ancestors. Line 1477  all its ancestors.
1477  @end lisp  @end lisp
1478    
1479  You can check if a widget has been made inactive by examining the value  You can check if a widget has been made inactive by examining the value
1480  of the @code{:inactive} keyword.  If this is non-nil, the widget itself  of the @code{:inactive} keyword.  If this is non-@code{nil}, the widget itself
1481  has been deactivated.  This is different from using the @code{:active}  has been deactivated.  This is different from using the @code{:active}
1482  keyword, in that the latter tells you if the widget @strong{or} any of  keyword, in that the latter tells you if the widget @strong{or} any of
1483  its ancestors have been deactivated.  Do not attempt to set the  its ancestors have been deactivated.  Do not attempt to set the
# Line 1500  Define a new widget type named @var{name Line 1502  Define a new widget type named @var{name
1502  @var{name} and class should both be symbols, @code{class} should be one  @var{name} and class should both be symbols, @code{class} should be one
1503  of the existing widget types.  of the existing widget types.
1504    
1505  The third argument @var{DOC} is a documentation string for the widget.  The third argument @var{doc} is a documentation string for the widget.
1506    
1507  After the new widget has been defined, the following two calls will  After the new widget has been defined, the following two calls will
1508  create identical widgets:  create identical widgets:
# Line 1653  Function to prompt for a value in the mi Line 1655  Function to prompt for a value in the mi
1655  take four arguments, @var{widget}, @var{prompt}, @var{value}, and  take four arguments, @var{widget}, @var{prompt}, @var{value}, and
1656  @var{unbound} and should return a value for widget entered by the user.  @var{unbound} and should return a value for widget entered by the user.
1657  @var{prompt} is the prompt to use.  @var{value} is the default value to  @var{prompt} is the prompt to use.  @var{value} is the default value to
1658  use, unless @var{unbound} is non-nil, in which case there is no default  use, unless @var{unbound} is non-@code{nil}, in which case there is no default
1659  value.  The function should read the value using the method most natural  value.  The function should read the value using the method most natural
1660  for this widget, and does not have to check that it matches.  for this widget, and does not have to check that it matches.
1661  @end table  @end table
# Line 1719  Keymap used in @code{widget-minor-mode}. Line 1721  Keymap used in @code{widget-minor-mode}.
1721  @defun widget-prompt-value widget prompt [ value unbound ]  @defun widget-prompt-value widget prompt [ value unbound ]
1722  Prompt for a value matching @var{widget}, using @var{prompt}.  Prompt for a value matching @var{widget}, using @var{prompt}.
1723  The current value is assumed to be @var{value}, unless @var{unbound} is  The current value is assumed to be @var{value}, unless @var{unbound} is
1724  non-nil.@refill  non-@code{nil}.@refill
1725  @end defun  @end defun
1726    
1727  @defun widget-get-sibling widget  @defun widget-get-sibling widget

Legend:
Removed from v.1.18.6.1  
changed lines
  Added in v.1.18.6.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26