summaryrefslogtreecommitdiff
path: root/devdocs/elisp/button-properties.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/button-properties.html
new repository
Diffstat (limited to 'devdocs/elisp/button-properties.html')
-rw-r--r--devdocs/elisp/button-properties.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/devdocs/elisp/button-properties.html b/devdocs/elisp/button-properties.html
new file mode 100644
index 00000000..1ac6f6b6
--- /dev/null
+++ b/devdocs/elisp/button-properties.html
@@ -0,0 +1,16 @@
+ <h4 class="subsection">Button Properties</h4> <p>Each button has an associated list of properties defining its appearance and behavior, and other arbitrary properties may be used for application specific purposes. The following properties have special meaning to the Button package: </p> <dl compact> <dt><code>action</code></dt> <dd>
+ <p>The function to call when the user invokes the button, which is passed the single argument <var>button</var>. By default this is <code>ignore</code>, which does nothing. </p> </dd> <dt><code>mouse-action</code></dt> <dd>
+ <p>This is similar to <code>action</code>, and when present, will be used instead of <code>action</code> for button invocations resulting from mouse-clicks (instead of the user hitting <tt class="key">RET</tt>). If not present, mouse-clicks use <code>action</code> instead. </p> </dd> <dt><code>face</code></dt> <dd>
+ <p>This is an Emacs face controlling how buttons of this type are displayed; by default this is the <code>button</code> face. </p> </dd> <dt><code>mouse-face</code></dt> <dd>
+ <p>This is an additional face which controls appearance during mouse-overs (merged with the usual button face); by default this is the usual Emacs <code>highlight</code> face. </p> </dd> <dt><code>keymap</code></dt> <dd>
+ <p>The button’s keymap, defining bindings active within the button region. By default this is the usual button region keymap, stored in the variable <code>button-map</code>, which defines <tt class="key">RET</tt> and <tt class="key">mouse-2</tt> to invoke the button. </p> </dd> <dt><code>type</code></dt> <dd>
+ <p>The button type. See <a href="button-types">Button Types</a>. </p> </dd> <dt><code>help-echo</code></dt> <dd>
+ <p>A string displayed by the Emacs tooltip help system; by default, <code>"mouse-2, RET: Push this button"</code>. Alternatively, a function that returns, or a form that evaluates to, a string to be displayed or <code>nil</code>. For details see <a href="special-properties#Text-help_002decho">Text help-echo</a>. </p> <p>The function is called with three arguments, <var>window</var>, <var>object</var>, and <var>pos</var>. The second argument, <var>object</var>, is either the overlay that had the property (for overlay buttons), or the buffer containing the button (for text property buttons). The other arguments have the same meaning as for the special text property <code>help-echo</code>. </p> </dd> <dt><code>follow-link</code></dt> <dd>
+ <p>The <code>follow-link</code> property, defining how a <tt class="key">mouse-1</tt> click behaves on this button, See <a href="clickable-text">Clickable Text</a>. </p> </dd> <dt><code>button</code></dt> <dd>
+ <p>All buttons have a non-<code>nil</code> <code>button</code> property, which may be useful in finding regions of text that comprise buttons (which is what the standard button functions do). </p>
+</dd> </dl> <p>There are other properties defined for the regions of text in a button, but these are not generally interesting for typical uses. </p><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Button-Properties.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Button-Properties.html</a>
+ </p>
+</div>