⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bind.n

📁 linux系统下的音频通信
💻 N
📖 第 1 页 / 共 2 页
字号:
.IP \fB%c\fR 5The \fIcount\fR field from the event.  Valid only for \fBExpose\fR events..IP \fB%d\fR 5The \fIdetail\fR field from the event.  The \fB%d\fR is replaced bya string identifying the detail.  For \fBEnter\fR,\fBLeave\fR, \fBFocusIn\fR, and \fBFocusOut\fR events,the string will be one of the following:.RS.DS.ta 6c\fBNotifyAncestor	NotifyNonlinearVirtualNotifyDetailNone	NotifyPointerNotifyInferior	NotifyPointerRootNotifyNonlinear	NotifyVirtual\fR.DEFor events other than these, the substituted string is undefined..RE.IP \fB%f\fR 5The \fIfocus\fR field from the event (\fB0\fR or \fB1\fR).  Valid onlyfor \fBEnter\fR and \fBLeave\fR events..IP \fB%h\fR 5.VSThe \fIheight\fR field from the event.  Valid only for \fBConfigure\fR and\fBExpose\fR events..VE.IP \fB%k\fR 5The \fIkeycode\fR field from the event.  Valid only for \fBKeyPress\fRand \fBKeyRelease\fR events..IP \fB%m\fR 5The \fImode\fR field from the event.  The substituted string is one of\fBNotifyNormal\fR, \fBNotifyGrab\fR, \fBNotifyUngrab\fR, or.VS\fBNotifyWhileGrabbed\fR.  Valid only for \fBEnter\fR,\fBFocusIn\fR, \fBFocusOut\fR, and \fBLeave\fR events..VE.IP \fB%o\fR 5The \fIoverride_redirect\fR field from the event.  Valid only for\fBMap\fR, \fBReparent\fR, and \fBConfigure\fR events..IP \fB%p\fR 5The \fIplace\fR field from the event, substituted as one of thestrings \fBPlaceOnTop\fR or \fBPlaceOnBottom\fR.  Valid onlyfor \fBCirculate\fR events..IP \fB%s\fR 5The \fIstate\fR field from the event.  For \fBButtonPress\fR,\fBButtonRelease\fR, \fBEnter\fR, \fBKeyPress\fR, \fBKeyRelease\fR,\fBLeave\fR, and \fBMotion\fR events, a decimal stringis substituted.  For \fBVisibility\fR, one of the strings\fBVisibilityUnobscured\fR, \fBVisibilityPartiallyObscured\fR,and \fBVisibilityFullyObscured\fR is substituted..IP \fB%t\fR 5The \fItime\fR field from the event.  Valid only for events thatcontain a \fItime\fR field..IP \fB%w\fR 5The \fIwidth\fR field from the event.  Valid only for.VS\fBConfigure\fR and \fBExpose\fR events..VE.IP \fB%x\fR 5The \fIx\fR field from the event.  Valid only for events containingan \fIx\fR field..IP \fB%y\fR 5The \fIy\fR field from the event.  Valid only for events containinga \fIy\fR field..IP \fB%A\fR 5Substitutes the ASCII character corresponding to the event, orthe empty string if the event doesn't correspond to an ASCII character(e.g. the shift key was pressed).  \fBXLookupString\fR does all thework of translating from the event to an ASCII character.Valid only for \fBKeyPress\fR and \fBKeyRelease\fR events..IP \fB%B\fR 5The \fIborder_width\fR field from the event.  Valid only for\fBConfigure\fR events..IP \fB%E\fR 5The \fIsend_event\fR field from the event.  Valid for all event types..IP \fB%K\fR 5The keysym corresponding to the event, substituted as a textualstring.  Valid only for \fBKeyPress\fR and \fBKeyRelease\fR events..IP \fB%N\fR 5The keysym corresponding to the event, substituted as a decimalnumber.  Valid only for \fBKeyPress\fR and \fBKeyRelease\fR events..IP \fB%R\fR 5The \fIroot\fR window identifier from the event.  Valid only forevents containing a \fIroot\fR field..IP \fB%S\fR 5The \fIsubwindow\fR window identifier from the event,formatted as a hexadecimal number.Valid only for events containing a \fIsubwindow\fR field..IP \fB%T\fR 5The \fItype\fR field from the event.  Valid for all event types..IP \fB%W\fR 5The path name of the window to which the event was reported (the\fIwindow\fR field from the event).  Valid for all event types..IP \fB%X\fR 5The \fIx_root\fR field from the event.If a virtual-root window manager is being used then the substitutedvalue is the corresponding x-coordinate in the virtual root.Valid only for\fBButtonPress\fR, \fBButtonRelease\fR, \fBKeyPress\fR, \fBKeyRelease\fR,and \fBMotion\fR events..IP \fB%Y\fR 5The \fIy_root\fR field from the event.If a virtual-root window manager is being used then the substitutedvalue is the corresponding y-coordinate in the virtual root.Valid only for\fBButtonPress\fR, \fBButtonRelease\fR, \fBKeyPress\fR, \fBKeyRelease\fR,and \fBMotion\fR events..LPThe replacement string for a %-replacement is formatted as a properTcl list element.This means that it will be surrounded with bracesif it contains spaces, or special characters such as \fB$\fR and\fB{\fR may be preceded by backslashes.This guarantees that the string will be passed through the Tclparser when the binding script is evaluated.Most replacements are numbers or well-defined strings suchas \fBAbove\fR;  for these replacements no special formattingis ever necessary.The most common case where reformatting occurs is for the \fB%A\fRsubstitution.  For example, if \fIscript\fR is.CS\fBinsert\0%A\fR.CEand the character typed is an open square bracket, then the scriptactually executed will be.CS\fBinsert\0\e[\fR.CEThis will cause the \fBinsert\fR to receive the original replacementstring (open square bracket) as its first argument.If the extra backslash hadn't been added, Tcl would not have beenable to parse the script correctly..SH MULTIPLE MATCHES.PPIt is possible for several bindings to match a given X event.If the bindings are associated with different \fItag\fR's,then each of the bindings will be executed, in order.By default, a binding for the widget will be executed first, followedby a class binding, a binding for its toplevel, andan \fBall\fR binding.The \fBbindtags\fR command may be used to change this order fora particular window or to associate additional binding tags withthe window..PPThe \fBcontinue\fR and \fBbreak\fR commands may be used inside abinding script to control the processing of matching scripts.If \fBcontinue\fR is invoked, then the current binding scriptis terminated but Tk will continue processing binding scriptsassociated with other \fItag\fR's.If the \fBbreak\fR command is invoked within a binding script,then that script terminates and no other scripts will be invokedfor the event..VS.PPIf more than one binding matches a particular event and theyhave the same \fItag\fR, then the most specific bindingis chosen and its script is evaluated.The following tests are applied, in order, to determine which ofseveral matching sequences is more specific:(a) an event pattern that specifies a specific button or key is more specificthan one that doesn't;(b) a longer sequence (in terms of numberof events matched) is more specific than a shorter sequence;(c) if the modifiers specified in one pattern are a subset of themodifiers in another pattern, then the pattern with more modifiersis more specific..VS(d) a virtual event whose physical pattern matches the sequence is lessspecific than the same physical pattern that is not associated with a virtual event.(e) given a sequence that matches two or more virtual events, one of the virtual events will be chosen, but the order is undefined..PPIf the matching sequences contain more than one event, then tests(c)-(e) are applied in order from the most recent event to the least recentevent in the sequences.  If these tests fail to determine a winner, then themost recently registered sequence is the winner..PPIf there are two (or more) virtual events that are both triggered by thesame sequence, and both of those virtual events are bound to the same windowtag, then only one of the virtual events will be triggered, and it willbe picked at random:  .CSevent add <<Paste>> <Control-y>event add <<Paste>> <Button-2>event add <<Scroll>> <Button-2>bind Entry <<Paste>> {puts Paste}bind Entry <<Scroll>> {puts Scroll}.CEIf the user types Control-y, the \fB<<Paste>>\fR bindingwill be invoked, but if the user presses button 2 then one ofeither the \fB<<Paste>>\fR or the \fB<<Scroll>>\fR bindings willbe invoked, but exactly which one gets invoked is undefined..VE.PPIf an X event does not match any of the existing bindings, then theevent is ignored.An unbound event is not considered to be an error..SH "MULTI-EVENT SEQUENCES AND IGNORED EVENTS".PPWhen a \fIsequence\fR specified in a \fBbind\fR command containsmore than one event pattern, then its script is executed wheneverthe recent events (leading up to and including the current event)match the given sequence.  This means, for example, that if button 1 isclicked repeatedly the sequence \fB<Double-ButtonPress-1>\fR will matcheach button press but the first.If extraneous events that would prevent a match occur in the middleof an event sequence then the extraneous events areignored unless they are \fBKeyPress\fR or \fBButtonPress\fR events.For example, \fB<Double-ButtonPress-1>\fR will match a sequence ofpresses of button 1, even though there will be \fBButtonRelease\fRevents (and possibly \fBMotion\fR events) between the\fBButtonPress\fR events.Furthermore, a \fBKeyPress\fR event may be preceded by any numberof other \fBKeyPress\fR events for modifier keys without themodifier keys preventing a match.For example, the event sequence \fBaB\fR will match a press of the\fBa\fR key, a release of the \fBa\fR key, a press of the \fBShift\fRkey, and a press of the \fBb\fR key:  the press of \fBShift\fR isignored because it is a modifier key.Finally, if several \fBMotion\fR events occur in a row, onlythe last one is used for purposes of matching binding sequences..SH ERRORS.PPIf an error occurs in executing the script for a binding then the\fBbgerror\fR mechanism is used to report the error.The \fBbgerror\fR command will be executed at global level(outside the context of any Tcl procedure)..SH "SEE ALSO"bgerror.SH KEYWORDSform, manual

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -