[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
The button package defines functions for inserting and manipulating clickable (with the mouse, or via keyboard commands) buttons in Emacs buffers, such as might be used for help hyper-links, etc. Emacs uses buttons for the hyper-links in help text and the like.
A button is essentially a set of properties attached (via text properties or overlays) to a region of text in an Emacs buffer. These properties are called button properties.
One of these properties (action
) is a function, which will be called
when the user invokes it using the keyboard or the mouse. The invoked
function may then examine the button and use its other properties as
desired.
In some ways the Emacs button package duplicates functionality offered by
the widget package (voir (widget)Top section `Introduction' dans The Emacs Widget Library), but the button package has the advantage that it is much faster,
much smaller, and much simpler to use (for elisp programmers—for users,
the result is about the same). The extra speed and space savings are useful
mainly if you need to create many buttons in a buffer (for instance an
*Apropos*
buffer uses buttons to make entries clickable, and may
contain many thousands of entries).
38.17.1 Button Properties | Button properties with special meanings. | |
38.17.2 Button Types | Defining common properties for classes of buttons. | |
38.17.3 Making Buttons | Adding buttons to Emacs buffers. | |
38.17.4 Manipulating Buttons | Getting and setting properties of buttons. | |
38.17.5 Button Buffer Commands | Buffer-wide commands and bindings for buttons. |
Ce document a été généré par Eric Reinbold le 13 Octobre 2007 en utilisant texi2html 1.78.