This commit was generated by cvs2svn to compensate for changes in r2786,
[chise/xemacs-chise.git.1] / man / widget.texi
index ecf9f33..4a797d5 100644 (file)
@@ -12,7 +12,7 @@
 @ifinfo
 @dircategory XEmacs Editor
 @direntry
-* Widgets: (widget).           The Emacs Widget Library.
+* Widgets: (widget).            The Emacs Widget Library.
 @end direntry
 @end ifinfo
 
@@ -94,7 +94,7 @@ implement forms are:
 
 @enumerate
 @item
-More complex field than just editable text are supported. 
+More complex fields than just editable text are supported. 
 @item
 You can give the user immediate feedback if he enters invalid data in a
 text field, and sometimes prevent entering invalid data.
@@ -298,69 +298,69 @@ Interface}).
   (make-local-variable 'widget-example-repeat)
   (widget-insert "Here is some documentation.\n\nName: ")
   (widget-create 'editable-field
-                :size 13
-                "My Name")
+                 :size 13
+                 "My Name")
   (widget-create 'menu-choice
-                :tag "Choose"
-                :value "This"
-                :help-echo "Choose me, please!"
-                :notify (lambda (widget &rest ignore)
-                          (message "%s is a good choice!"
-                                   (widget-value widget)))
-                '(item :tag "This option" :value "This")
-                '(choice-item "That option")
-                '(editable-field :menu-tag "No option" "Thus option"))
+                 :tag "Choose"
+                 :value "This"
+                 :help-echo "Choose me, please!"
+                 :notify (lambda (widget &rest ignore)
+                           (message "%s is a good choice!"
+                                    (widget-value widget)))
+                 '(item :tag "This option" :value "This")
+                 '(choice-item "That option")
+                 '(editable-field :menu-tag "No option" "Thus option"))
   (widget-insert "Address: ")
   (widget-create 'editable-field
-                "Some Place\nIn some City\nSome country.")
+                 "Some Place\nIn some City\nSome country.")
   (widget-insert "\nSee also ")
   (widget-create 'link
-                :notify (lambda (&rest ignore)
-                          (widget-value-set widget-example-repeat 
-                                            '("En" "To" "Tre"))
-                          (widget-setup))
-                "other work")
+                 :notify (lambda (&rest ignore)
+                           (widget-value-set widget-example-repeat 
+                                             '("En" "To" "Tre"))
+                           (widget-setup))
+                 "other work")
   (widget-insert " for more information.\n\nNumbers: count to three below\n")
   (setq widget-example-repeat
-       (widget-create 'editable-list
-                      :entry-format "%i %d %v"
-                      :notify (lambda (widget &rest ignore)
-                                (let ((old (widget-get widget
-                                                       ':example-length))
-                                      (new (length (widget-value widget))))
-                                  (unless (eq old new)
-                                    (widget-put widget ':example-length new)
-                                    (message "You can count to %d." new))))
-                      :value '("One" "Eh, two?" "Five!")
-                      '(editable-field :value "three")))
+        (widget-create 'editable-list
+                       :entry-format "%i %d %v"
+                       :notify (lambda (widget &rest ignore)
+                                 (let ((old (widget-get widget
+                                                        ':example-length))
+                                       (new (length (widget-value widget))))
+                                   (unless (eq old new)
+                                     (widget-put widget ':example-length new)
+                                     (message "You can count to %d." new))))
+                       :value '("One" "Eh, two?" "Five!")
+                       '(editable-field :value "three")))
   (widget-insert "\n\nSelect multiple:\n\n")
   (widget-create 'checkbox t)
   (widget-insert " This\n")
   (widget-create 'checkbox nil)
   (widget-insert " That\n")
   (widget-create 'checkbox
-                :notify (lambda (&rest ignore) (message "Tickle"))
-                t)
+                 :notify (lambda (&rest ignore) (message "Tickle"))
+                 t)
   (widget-insert " Thus\n\nSelect one:\n\n")
   (widget-create 'radio-button-choice
-                :value "One"
-                :notify (lambda (widget &rest ignore)
-                          (message "You selected %s"
-                                   (widget-value widget)))
-                '(item "One") '(item "Another One.") '(item "A Final One."))
+                 :value "One"
+                 :notify (lambda (widget &rest ignore)
+                           (message "You selected %s"
+                                    (widget-value widget)))
+                 '(item "One") '(item "Another One.") '(item "A Final One."))
   (widget-insert "\n")
   (widget-create 'push-button
-                :notify (lambda (&rest ignore) 
-                          (if (= (length (widget-value widget-example-repeat))
-                                 3)
-                              (message "Congratulation!")
-                            (error "Three was the count!")))
-                "Apply Form")
+                 :notify (lambda (&rest ignore) 
+                           (if (= (length (widget-value widget-example-repeat))
+                                  3)
+                               (message "Congratulation!")
+                             (error "Three was the count!")))
+                 "Apply Form")
   (widget-insert " ")
   (widget-create 'push-button
-                :notify (lambda (&rest ignore)
-                          (widget-example))
-                "Reset Form")
+                 :notify (lambda (&rest ignore)
+                           (widget-example))
+                 "Reset Form")
   (widget-insert "\n")
   (use-local-map widget-keymap)
   (widget-setup))
@@ -430,7 +430,7 @@ NAME ::= (NAME [KEYWORD ARGUMENT]... ARGS)
      |   NAME
 @end example
 
-Where, @var{name} is a widget name, @var{keyword} is the name of a
+where @var{name} is a widget name, @var{keyword} is the name of a
 property, @var{argument} is the value of the property, and @var{args}
 are interpreted in a widget specific way.
 
@@ -510,7 +510,7 @@ The value of the symbol is expanded according to this table.
 @end table
 
 @item :doc
-The string inserted by the @samp{%d} escape in the format
+The string inserted by the @samp{%d} or @samp{%h} escape in the format
 string.  
 
 @item :tag
@@ -559,7 +559,7 @@ Should be a function called with two arguments, the widget and a value,
 and returning non-nil if the widget can represent the specified value.
 
 @item :validate
-A function which takes a widget as an argument, and return nil if the
+A function which takes a widget as an argument, and returns nil if the
 widget's current value is valid for the widget.  Otherwise it should
 return the widget containing the invalid data, and set that widget's
 @code{:error} property to a string explaining the error.
@@ -722,8 +722,10 @@ The following extra properties are recognized.
 
 @table @code
 @item :size
-The width of the editable field.@*
-By default the field will reach to the end of the line.
+The minimum width of the editable field.@*
+By default the field will reach to the end of the line.  If the
+content is too large, the displayed representation will expand to
+contain it.  The content is not truncated to size.
 
 @item :value-face
 Face used for highlighting the editable field.  Default is
@@ -742,7 +744,7 @@ which matches everything.
 @item :keymap
 Keymap used in the editable field.  The default value is
 @code{widget-field-keymap}, which allows you to use all the normal
-editing commands, even if the buffers major mode suppress some of them.
+editing commands, even if the buffer's major mode suppress some of them.
 Pressing return invokes the function specified by @code{:action}. 
 @end table