\input texinfo.tex
-
@c %**start of header
@setfilename ../../info/widget
@settitle The Emacs Widget Library
@syncodeindex fn cp
@syncodeindex vr cp
@syncodeindex ky cp
-@afourpaper
@c %**end of header
@copying
-Copyright @copyright{} 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright @copyright{} 2000-2011 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with the
-Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
-``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
-Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License'' in the Emacs manual.
-
-This document is part of a collection distributed under the GNU Free
-Documentation License. If you want to distribute this document
-separately from the collection, you can do so by adding a copy of the
-license to the document, as described in section 6 of the license.
-
-(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
-this GNU Manual, like GNU software. Copies published by the Free
-Software Foundation raise funds for GNU development.''
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
+and with the Back-Cover Texts as in (a) below. A copy of the license
+is included in the section entitled ``GNU Free Documentation License''.
+
+(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
+modify this GNU manual. Buying copies from the FSF supports it in
+developing GNU and promoting software freedom.''
@end quotation
@end copying
-@dircategory Emacs
+@dircategory Emacs lisp libraries
@direntry
-* Widget: (widget). The "widget" package used by the Emacs Customization
- facility.
+* Widget: (widget). The "widget" package used by the Emacs
+ Customization facility.
@end direntry
+@contents
+
@node Top, Introduction, (dir), (dir)
@comment node-name, next, previous, up
@top The Emacs Widget Library
+@insertcopying
+
@menu
* Introduction::
* User Interface::
(remove-overlays)
(widget-insert "Here is some documentation.\n\n")
(widget-create 'editable-field
- :size 13
- :format "Name: %v " ; Text after the field!
- "My Name")
+ :size 13
+ :format "Name: %v " ; Text after the field!
+ "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-create 'editable-field
- :format "Address: %v"
- "Some Place\nIn some City\nSome country.")
+ :format "Address: %v"
+ "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))
@findex widget-button-press
@findex widget-button-click
@defvr Const widget-keymap
-A keymap with the global keymap as its parent.@*
@key{TAB} and @kbd{C-@key{TAB}} are bound to @code{widget-forward} and
@code{widget-backward}, respectively. @key{RET} and @kbd{Mouse-2}
are bound to @code{widget-button-press} and
@vindex follow-link@r{ keyword}
@item :follow-link
Specifies how to interpret a @key{mouse-1} click on the widget.
-@xref{Links and Mouse-1,,, elisp, the Emacs Lisp Reference Manual}.
+@xref{Clickable Text,, Defining Clickable Text, elisp, the Emacs Lisp Reference Manual}.
@vindex indent@r{ keyword}
@item :indent
variables, and widgets described in this manual.
@printindex cp
-@setchapternewpage odd
-@contents
@bye
-
-@ignore
- arch-tag: 2b427731-4c61-4e72-85de-5ccec9c623f0
-@end ignore