Sync up with r21-4-14-chise-0_21-22.
[chise/xemacs-chise.git-] / info / widget.info
index 1ee1532..425627c 100644 (file)
@@ -3,7 +3,7 @@ widget.texi.
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
-* Widgets: (widget).           The Emacs Widget Library.
+* Widgets: (widget).            The Emacs Widget Library.
 END-INFO-DIR-ENTRY
 
 \1f
@@ -94,7 +94,7 @@ and the HTML form support in the `w3' browser.
    The advantages for a programmer of using the `widget' package to
 implement forms are:
 
-  1. More complex field than just editable text are supported.
+  1. More complex fields than just editable text are supported.
 
   2. You can give the user immediate feedback if he enters invalid data
      in a text field, and sometimes prevent entering invalid data.
@@ -291,69 +291,69 @@ User 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))
@@ -416,7 +416,7 @@ Basic Types
      NAME ::= (NAME [KEYWORD ARGUMENT]... ARGS)
           |   NAME
 
-   Where, NAME is a widget name, KEYWORD is the name of a property,
+   where NAME is a widget name, KEYWORD is the name of a property,
 ARGUMENT is the value of the property, and ARGS are interpreted in a
 widget specific way.
 
@@ -490,7 +490,8 @@ widget specific way.
           The value of the symbol is expanded according to this table.
 
 `:doc'
-     The string inserted by the `%d' escape in the format string.
+     The string inserted by the `%d' or `%h' escape in the format
+     string.
 
 `:tag'
      The string inserted by the `%t' escape in the format string.
@@ -538,7 +539,7 @@ widget specific way.
      specified value.
 
 `:validate'
-     A function which takes a widget as an argument, and return nil if
+     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 `:error' property to a string explaining the error.
@@ -685,8 +686,10 @@ widget will match all string values.
    The following extra properties are recognized.
 
 `: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.
 
 `:value-face'
      Face used for highlighting the editable field.  Default is
@@ -705,7 +708,7 @@ widget will match all string values.
 `:keymap'
      Keymap used in the editable field.  The default value is
      `widget-field-keymap', which allows you to use all the normal
-     editing commands, even if the buffers major mode suppress some of
+     editing commands, even if the buffer's major mode suppress some of
      them.  Pressing return invokes the function specified by `:action'.
 
 \1f
@@ -1515,37 +1518,37 @@ Wishlist
 
 \1f
 Tag Table:
-Node: Top\7f201
-Node: Introduction\7f581
-Node: User Interface\7f4064
-Node: Programming Example\7f8959
-Node: Setting Up the Buffer\7f12276
-Node: Basic Types\7f13993
-Node: link\7f20038
-Node: url-link\7f20552
-Node: info-link\7f20864
-Node: push-button\7f21155
-Node: editable-field\7f21728
-Node: text\7f23067
-Node: menu-choice\7f23365
-Node: radio-button-choice\7f24218
-Node: item\7f25785
-Node: choice-item\7f26173
-Node: toggle\7f26671
-Node: checkbox\7f27408
-Node: checklist\7f27714
-Node: editable-list\7f29158
-Node: group\7f30340
-Node: Sexp Types\7f30627
-Node: constants\7f30940
-Node: generic\7f32019
-Node: atoms\7f32552
-Node: composite\7f34499
-Node: Widget Properties\7f36969
-Node: Defining New Widgets\7f40034
-Node: Widget Browser\7f45334
-Node: Widget Minor Mode\7f46192
-Node: Utilities\7f46749
-Node: Widget Wishlist\7f47230
+Node: Top\7f211
+Node: Introduction\7f591
+Node: User Interface\7f4075
+Node: Programming Example\7f8970
+Node: Setting Up the Buffer\7f13120
+Node: Basic Types\7f14837
+Node: link\7f20895
+Node: url-link\7f21409
+Node: info-link\7f21721
+Node: push-button\7f22012
+Node: editable-field\7f22585
+Node: text\7f24068
+Node: menu-choice\7f24366
+Node: radio-button-choice\7f25219
+Node: item\7f26786
+Node: choice-item\7f27174
+Node: toggle\7f27672
+Node: checkbox\7f28409
+Node: checklist\7f28715
+Node: editable-list\7f30159
+Node: group\7f31341
+Node: Sexp Types\7f31628
+Node: constants\7f31941
+Node: generic\7f33020
+Node: atoms\7f33553
+Node: composite\7f35500
+Node: Widget Properties\7f37970
+Node: Defining New Widgets\7f41035
+Node: Widget Browser\7f46335
+Node: Widget Minor Mode\7f47193
+Node: Utilities\7f47750
+Node: Widget Wishlist\7f48231
 \1f
 End Tag Table