OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tk/] [doc/] [bindtags.n] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1990 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: bindtags.n,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
9
'\"
10
.so man.macros
11
.TH bindtags n 4.0 Tk "Tk Built-In Commands"
12
.BS
13
'\" Note:  do not modify the .SH NAME line immediately below!
14
.SH NAME
15
bindtags \- Determine which bindings apply to a window, and order of evaluation
16
.SH SYNOPSIS
17
\fBbindtags \fIwindow \fR?\fItagList\fR?
18
.BE
19
 
20
.SH DESCRIPTION
21
.PP
22
When a binding is created with the \fBbind\fR command, it is
23
associated either with a particular window such as \fB.a.b.c\fR,
24
a class name such as \fBButton\fR, the keyword \fBall\fR, or any
25
other string.
26
All of these forms are called \fIbinding tags\fR.
27
Each window contains a list of binding tags that determine how
28
events are processed for the window.
29
When an event occurs in a window, it is applied to each of the
30
window's tags in order:  for each tag, the most specific binding
31
that matches the given tag and event is executed.
32
See the \fBbind\fR command for more information on the matching
33
process.
34
.PP
35
By default, each window has four binding tags consisting of the
36
name of the window, the window's class name, the name of the window's
37
nearest toplevel ancestor, and \fBall\fR, in that order.
38
Toplevel windows have only three tags by default, since the toplevel
39
name is the same as that of the window.
40
The \fBbindtags\fR command allows the binding tags for a window to be
41
read and modified.
42
.PP
43
If \fBbindtags\fR is invoked with only one argument, then the
44
current set of binding tags for \fIwindow\fR is returned as a list.
45
If the \fItagList\fR argument is specified to \fBbindtags\fR,
46
then it must be a proper list; the tags for \fIwindow\fR are changed
47
to the elements of the list.
48
The elements of \fItagList\fR may be arbitrary strings;  however,
49
any tag starting with a dot is treated as the name of a window;  if
50
no window by that name exists at the time an event is processed,
51
then the tag is ignored for that event.
52
The order of the elements in \fItagList\fR determines the order in
53
which binding scripts are executed in response to events.
54
For example, the command
55
.CS
56
\fBbindtags .b {all . Button .b}\fR
57
.CE
58
reverses the order in which binding scripts will be evaluated for
59
a button named \fB.b\fR so that \fBall\fR bindings are invoked
60
first, following by bindings for \fB.b\fR's toplevel (``.''), followed by
61
class bindings, followed by bindings for \fB.b\fR.
62
If \fItagList\fR is an empty list then the binding tags for \fIwindow\fR
63
are returned to the default state described above.
64
.PP
65
The \fBbindtags\fR command may be used to introduce arbitrary
66
additional binding tags for a window, or to remove standard tags.
67
For example, the command
68
.CS
69
\fBbindtags .b {.b TrickyButton . all}\fR
70
.CE
71
replaces the \fBButton\fR tag for \fB.b\fR with \fBTrickyButton\fR.
72
This means that the default widget bindings for buttons, which are
73
associated with the \fBButton\fR tag, will no longer apply to \fB.b\fR,
74
but any bindings associated with \fBTrickyButton\fR (perhaps some
75
new button behavior) will apply.
76
 
77
.SH "SEE ALSO"
78
bind
79
 
80
.SH KEYWORDS
81
binding, event, tag

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.