X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=info%2Fwidget.info;h=425627cd06d93167f5b4b6281f1616246577c66f;hb=21139873a3d4f0e532097d6a1d6169bc0b7769e5;hp=929a8f867216ef1d2ad4fefb86e685f43f110361;hpb=82da33b61c3e2dd2937db17b75b2838188793053;p=chise%2Fxemacs-chise.git- diff --git a/info/widget.info b/info/widget.info index 929a8f8..425627c 100644 --- a/info/widget.info +++ b/info/widget.info @@ -1,9 +1,9 @@ -This is Info file ../info/widget.info, produced by Makeinfo version -1.68 from the input file widget.texi. +This is ../info/widget.info, produced by makeinfo version 4.0 from +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  @@ -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. @@ -212,34 +212,34 @@ called "buttons". The default commands for activating a button are: There are several different kind of buttons, all of which are present in the example: -*The Option Field Tags.* +_The Option Field Tags._ When you invoke one of these buttons, you will be asked to choose between a number of different options. This is how you edit an option field. Option fields are created by the `menu-choice' widget. In the example, `Choose' is an option field tag. -*The `[INS]' and `[DEL]' buttons.* +_The `[INS]' and `[DEL]' buttons._ Activating these will insert or delete elements from a editable list. The list is created by the `editable-list' widget. -*Embedded Buttons.* +_Embedded Buttons._ The `_other work_' is an example of an embedded button. Embedded buttons are not associated with a fields, but can serve any purpose, such as implementing hypertext references. They are usually created by the `link' widget. -*The `[ ]' and `[X]' buttons.* +_The `[ ]' and `[X]' buttons._ Activating one of these will convert it to the other. This is useful for implementing multiple-choice fields. You can create it wit -*The `( )' and `(*)' buttons.* +_The `( )' and `(*)' buttons._ Only one radio button in a `radio-button-choice' widget can be selected at any time. When you invoke one of the unselected radio buttons, it will be selected and the previous selected radio button will become unselected. -*The `[Apply Form]' `[Reset Form]' buttons.* +_The `[Apply Form]' `[Reset Form]' buttons._ These are explicit buttons made with the `push-button' widget. The main difference from the `link' widget is that the buttons are will be displayed as GUI buttons when possible. enough. @@ -259,11 +259,11 @@ Navigation buffer, plus you will have these additional commands: `' - - Command: widget-forward &optional COUNT + - Command: widget-forward &optional count Move point COUNT buttons or editing fields forward. `' - - Command: widget-backward &optional COUNT + - Command: widget-backward &optional count Move point COUNT buttons or editing fields backward.  @@ -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)) @@ -369,14 +369,14 @@ object. This object can be queried and manipulated by other widget functions, until it is deleted with `widget-delete'. After the widgets have been created, `widget-setup' must be called to enable them. - - Function: widget-create TYPE [ KEYWORD ARGUMENT ]... + - Function: widget-create type [ keyword argument ]... Create and return a widget of type TYPE. The syntax for the TYPE argument is described in *Note Basic Types::. The keyword arguments can be used to overwrite the keyword arguments that are part of TYPE. - - Function: widget-delete WIDGET + - Function: widget-delete widget Delete WIDGET and remove it from the buffer. - Function: 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. @@ -480,17 +480,18 @@ widget specific way. Text around %[ %] in the format. These can be - *nil* + _nil_ No text is inserted. - *a string* + _a string_ The string is inserted literally. - *a symbol* + _a symbol_ 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,14 +539,14 @@ 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. The following predefined function can be used: - - Function: widget-children-validate WIDGET + - Function: widget-children-validate widget All the `:children' of WIDGET must be valid. `:tab-order' @@ -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'.  @@ -798,7 +801,7 @@ any value matching at least one of the specified TYPE arguments. widget after it has been created with the function `widget-radio-add-item'. - - Function: widget-radio-add-item WIDGET TYPE + - Function: widget-radio-add-item widget type Add to `radio-button-choice' widget WIDGET a new radio button item of type TYPE. @@ -1196,15 +1199,15 @@ Properties You can examine or set the value of a widget by using the widget object that was returned by `widget-create'. - - Function: widget-value WIDGET + - Function: widget-value widget Return the current value contained in WIDGET. It is an error to call this function on an uninitialized widget. - - Function: widget-value-set WIDGET VALUE + - Function: widget-value-set widget value Set the value contained in WIDGET to VALUE. It is an error to call this function with an invalid VALUE. - *Important:* You *must* call `widget-setup' after modifying the + *Important:* You _must_ call `widget-setup' after modifying the value of a widget before the user is allowed to edit the widget again. It is enough to call `widget-setup' once if you modify multiple widgets. This is currently only necessary if the widget contains an @@ -1215,22 +1218,22 @@ widget objects, for example a reference to the item being edited, it can be done with `widget-put' and `widget-get'. The property names must begin with a `:'. - - Function: widget-put WIDGET PROPERTY VALUE + - Function: widget-put widget property value In WIDGET set PROPERTY to VALUE. PROPERTY should be a symbol, while VALUE can be anything. - - Function: widget-get WIDGET PROPERTY + - Function: widget-get widget property In WIDGET return the value for PROPERTY. PROPERTY should be a symbol, the value is what was last set by `widget-put' for PROPERTY. - - Function: widget-member WIDGET PROPERTY + - Function: widget-member widget property Non-nil if WIDGET has a value (even nil) for property PROPERTY. Occasionally it can be useful to know which kind of widget you have, i.e. the name of the widget type you gave when the widget was created. - - Function: widget-type WIDGET + - Function: widget-type widget Return the name of WIDGET, a symbol. Widgets can be in two states: active, which means they are @@ -1276,7 +1279,7 @@ you to create a shorthand for more complex widgets. This includes specifying component widgets and new default values for the keyword arguments. - - Function: widget-define NAME CLASS DOC &rest ARGS + - Function: widget-define name class doc &rest args Define a new widget type named NAME from `class'. NAME and class should both be symbols, `class' should be one of @@ -1310,10 +1313,10 @@ new widgets: The following predefined functions can be used here: - - Function: widget-types-convert-widget WIDGET + - Function: widget-types-convert-widget widget Convert `:args' as widget types in WIDGET. - - Function: widget-value-convert-widget WIDGET + - Function: widget-value-convert-widget widget Initialize `:value' from `:args' in WIDGET. `:value-to-internal' @@ -1352,7 +1355,7 @@ new widgets: The following predefined function can be used here: - - Function: widget-children-value-delete WIDGET + - Function: widget-children-value-delete widget Delete all `:children' and `:buttons' in WIDGET. `:value-get' @@ -1361,7 +1364,7 @@ new widgets: The following predefined function can be used here: - - Function: widget-value-value-get WIDGET + - Function: widget-value-value-get widget Return the `:value' property of WIDGET. `:format-handler' @@ -1380,7 +1383,7 @@ new widgets: The following predefined function can be used here: - - Function: widget-parent-action WIDGET &optional EVENT + - Function: widget-parent-action widget &optional event Tell `:parent' of WIDGET to handle the `:action'. Optional EVENT is the event that triggered the action. @@ -1448,12 +1451,12 @@ File: widget.info, Node: Utilities, Next: Widget Wishlist, Prev: Widget Minor Utilities. ========== - - Function: widget-prompt-value WIDGET PROMPT [ VALUE UNBOUND ] + - Function: widget-prompt-value widget prompt [ value unbound ] Prompt for a value matching WIDGET, using PROMPT. The current value is assumed to be VALUE, unless UNBOUND is non-nil. - - Function: widget-get-sibling WIDGET + - Function: widget-get-sibling widget Get the item WIDGET is assumed to toggle. This is only meaningful for radio buttons or checkboxes in a list. @@ -1512,39 +1515,40 @@ Wishlist symbol, it should pop up a menu. +  Tag Table: -Node: Top227 -Node: Introduction607 -Node: User Interface4090 -Node: Programming Example8985 -Node: Setting Up the Buffer12302 -Node: Basic Types14019 -Node: link20064 -Node: url-link20578 -Node: info-link20890 -Node: push-button21181 -Node: editable-field21754 -Node: text23093 -Node: menu-choice23391 -Node: radio-button-choice24244 -Node: item25811 -Node: choice-item26199 -Node: toggle26697 -Node: checkbox27434 -Node: checklist27740 -Node: editable-list29184 -Node: group30366 -Node: Sexp Types30653 -Node: constants30966 -Node: generic32045 -Node: atoms32578 -Node: composite34525 -Node: Widget Properties36995 -Node: Defining New Widgets40060 -Node: Widget Browser45360 -Node: Widget Minor Mode46218 -Node: Utilities46775 -Node: Widget Wishlist47256 +Node: Top211 +Node: Introduction591 +Node: User Interface4075 +Node: Programming Example8970 +Node: Setting Up the Buffer13120 +Node: Basic Types14837 +Node: link20895 +Node: url-link21409 +Node: info-link21721 +Node: push-button22012 +Node: editable-field22585 +Node: text24068 +Node: menu-choice24366 +Node: radio-button-choice25219 +Node: item26786 +Node: choice-item27174 +Node: toggle27672 +Node: checkbox28409 +Node: checklist28715 +Node: editable-list30159 +Node: group31341 +Node: Sexp Types31628 +Node: constants31941 +Node: generic33020 +Node: atoms33553 +Node: composite35500 +Node: Widget Properties37970 +Node: Defining New Widgets41035 +Node: Widget Browser46335 +Node: Widget Minor Mode47193 +Node: Utilities47750 +Node: Widget Wishlist48231  End Tag Table