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
(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))
\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\7f4074
+Node: Programming Example\7f8969
+Node: Setting Up the Buffer\7f13119
+Node: Basic Types\7f14836
+Node: link\7f20881
+Node: url-link\7f21395
+Node: info-link\7f21707
+Node: push-button\7f21998
+Node: editable-field\7f22571
+Node: text\7f23910
+Node: menu-choice\7f24208
+Node: radio-button-choice\7f25061
+Node: item\7f26628
+Node: choice-item\7f27016
+Node: toggle\7f27514
+Node: checkbox\7f28251
+Node: checklist\7f28557
+Node: editable-list\7f30001
+Node: group\7f31183
+Node: Sexp Types\7f31470
+Node: constants\7f31783
+Node: generic\7f32862
+Node: atoms\7f33395
+Node: composite\7f35342
+Node: Widget Properties\7f37812
+Node: Defining New Widgets\7f40877
+Node: Widget Browser\7f46177
+Node: Widget Minor Mode\7f47035
+Node: Utilities\7f47592
+Node: Widget Wishlist\7f48073
\1f
End Tag Table