diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-08-29 09:27:34 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-08-29 09:27:34 (GMT) |
commit | 90af9c5e09cfae599352ae2f24d7d8a44ad8f014 (patch) | |
tree | fbc7cd8daee10cdaf07eed85d912688132a222f6 /doc | |
parent | 97c495ce68eece2aab9e90f92a075dcd4b310b82 (diff) | |
download | tk-90af9c5e09cfae599352ae2f24d7d8a44ad8f014.zip tk-90af9c5e09cfae599352ae2f24d7d8a44ad8f014.tar.gz tk-90af9c5e09cfae599352ae2f24d7d8a44ad8f014.tar.bz2 |
TIP#165 (user data field) implementation.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/bind.n | 19 | ||||
-rw-r--r-- | doc/event.n | 9 |
2 files changed, 22 insertions, 6 deletions
@@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: bind.n,v 1.16 2004/08/20 10:56:36 dkf Exp $ +'\" RCS: @(#) $Id: bind.n,v 1.17 2004/08/29 09:27:35 dkf Exp $ '\" .so man.macros .TH bind n 8.0 Tk "Tk Built-In Commands" @@ -85,7 +85,6 @@ a particular button or keysym. Any of the fields may be omitted, as long as at least one of \fItype\fR and \fIdetail\fR is present. The fields must be separated by white space or dashes. .PP -.VS The third form of pattern is used to specify a user-defined, named virtual event. It has the following syntax: .CS @@ -98,11 +97,10 @@ virtual event to modify it. Bindings on a virtual event may be created before the virtual event is defined, and if the definition of a virtual event changes dynamically, all windows bound to that virtual event will respond immediately to the new definition. - +.PP Some widgets (e.g. \fBmenu\fR and \fBtext\fR) issue virtual events when their internal state is updated in some ways. Please see the manual page for each widget for details. -.VE .SS "MODIFIERS" .PP Modifiers consist of any of the following values: @@ -407,7 +405,11 @@ The \fIcount\fR field from the event. Valid only for \fBExpose\fR events. Indicates that there are \fIcount\fP pending \fBExpose\fP events which have not yet been delivered to the window. .IP \fB%d\fR 5 -The \fIdetail\fR field from the event. The \fB%d\fR is replaced by +The \fIdetail\fR +.VS 8.5 +or \fIuser_data\fR +.VE 8.5 +field from the event. The \fB%d\fR is replaced by a string identifying the detail. For \fBEnter\fR, \fBLeave\fR, \fBFocusIn\fR, and \fBFocusOut\fR events, the string will be one of the following: @@ -426,6 +428,13 @@ For \fBConfigureRequest\fR events, the string will be one of: Below None BottomIf TopIf\fR .DE +.VS +For virtual events, the string will be whatever value is stored in the +\fIuser_data\fR field when the event was created (typically with +\fBevent generate\fR), or the empty string if the field is NULL. +Virtual events corresponding to key sequence presses (see \fBevent +add\fR for details) set the \fIuser_data\fR to NULL. +.VE For events other than these, the substituted string is undefined. .RE .IP \fB%f\fR 5 diff --git a/doc/event.n b/doc/event.n index c74b483..6b988bb 100644 --- a/doc/event.n +++ b/doc/event.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: event.n,v 1.9 2004/08/20 10:56:36 dkf Exp $ +'\" RCS: @(#) $Id: event.n,v 1.10 2004/08/29 09:27:35 dkf Exp $ '\" .so man.macros .TH event n 8.3 Tk "Tk Built-In Commands" @@ -107,6 +107,13 @@ Corresponds to the \fB%b\fR substitution for binding scripts. \fINumber\fR must be an integer; it specifies the \fIcount\fR field for the event. Valid for \fBExpose\fR events. Corresponds to the \fB%c\fR substitution for binding scripts. +.VS 8.5 +.TP +\fB\-data\fI string\fR +\fIString\fR may be any value; it specifies the \fIuser_data\fR field +for the event. Only valid for virtual events. Corresponds to the +\fB%d\fR substitution for virtual events in binding scripts. +.VE 8.5 .TP \fB\-delta\fI number\fR \fINumber\fR must be an integer; it specifies the \fIdelta\fR field |