diff options
Diffstat (limited to 'doc/busy.n')
-rw-r--r-- | doc/busy.n | 84 |
1 files changed, 40 insertions, 44 deletions
@@ -28,10 +28,12 @@ .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -busy \- confine pointer events to a window sub-tree +busy \- Make Tk widgets busy, temporarily blocking user interactions .SH SYNOPSIS \fBtk busy\fR \fIwindow \fR?\fIoptions\fR? .sp +\fBtk busy busywindow \fIwindow\fR +.sp \fBtk busy hold\fR \fIwindow \fR?\fIoptions\fR? .sp \fBtk busy configure \fIwindow\fR ?\fIoption value\fR?... @@ -44,8 +46,8 @@ busy \- confine pointer events to a window sub-tree .BE .SH DESCRIPTION .PP -The \fBtk busy\fR command provides a simple means to block pointer events from -Tk widgets, while overriding the widget's cursor with a configurable busy +The \fBtk busy\fR command provides a simple means to block mouse pointer events +from Tk widgets, while overriding the widget's cursor with a configurable busy cursor. Note this command does not prevent keyboard events from being sent to the widgets made busy. .SH INTRODUCTION @@ -128,24 +130,11 @@ The following operations are available for the \fBtk busy\fR command: . Shortcut for \fBtk busy hold\fR command. .TP -\fBtk busy hold \fIwindow\fR ?\fIoption value\fR?... +\fBtk busy busywindow \fIwindow\fR . -Makes the specified \fIwindow\fR (and its descendants in the Tk window -hierarchy) appear busy. \fIWindow\fR must be a valid path name of a Tk widget. -A transparent window is put in front of the specified window. This transparent -window is mapped the next time idle tasks are processed, and the specified -window and its descendants will be blocked from user interactions. Normally -\fBupdate\fR should be called immediately afterward to insure that the hold -operation is in effect before the application starts its processing. The -following configuration options are valid: -.RS -.TP -\fB\-cursor \fIcursorName\fR -. -Specifies the cursor to be displayed when the widget is made busy. -\fICursorName\fR can be in any form accepted by \fBTk_GetCursor\fR. The -default cursor is \fBwait\fR on Windows and \fBwatch\fR on other platforms. -.RE +Returns the pathname of the busy window (i.e. the transparent window +shielding the window appearing busy) created by the \fBtk busy hold\fR +command for \fIwindow\fR, or the empty string if \fIwindow\fR is not busy. .TP \fBtk busy cget \fIwindow\fR \fIoption\fR . @@ -181,6 +170,12 @@ option add *Frame.BusyCursor gumby .CE .RE .TP +\fBtk busy current \fR?\fIpattern\fR? +. +Returns the pathnames of all widgets that are currently busy. If a +\fIpattern\fR is given, only the path names of busy widgets matching +\fIpattern\fR are returned. +.TP \fBtk busy forget \fIwindow\fR ?\fIwindow\fR?... . Releases resources allocated by the \fBtk busy\fR command for \fIwindow\fR, @@ -189,11 +184,26 @@ including the transparent window. User events will again be received by \fIWindow\fR must be the name of a widget specified in the \fBhold\fR operation, otherwise an error is reported. .TP -\fBtk busy current \fR?\fIpattern\fR? +\fBtk busy hold \fIwindow\fR ?\fIoption value\fR?... . -Returns the pathnames of all widgets that are currently busy. If a -\fIpattern\fR is given, only the path names of busy widgets matching -\fIpattern\fR are returned. +Makes the specified \fIwindow\fR (and its descendants in the Tk window +hierarchy) appear busy. \fIWindow\fR must be a valid path name of a Tk widget. +A transparent window is put in front of the specified window. This transparent +window is mapped the next time idle tasks are processed, and the specified +window and its descendants will be blocked from user interactions. Normally +\fBupdate\fR should be called immediately afterward to insure that the hold +operation is in effect before the application starts its processing. The +command returns the pathname of the busy window that was created (i.e. the +transparent window shielding the window appearing busy). The following +configuration options are valid: +.RS +.TP +\fB\-cursor \fIcursorName\fR +. +Specifies the cursor to be displayed when the widget is made busy. +\fICursorName\fR can be in any form accepted by \fBTk_GetCursor\fR. The +default cursor is \fBwait\fR on Windows and \fBwatch\fR on other platforms. +.RE .TP \fBtk busy status \fIwindow\fR . @@ -206,32 +216,18 @@ The event blocking feature is implemented by creating and mapping a transparent window that completely covers the widget. When the busy window is mapped, it invisibly shields the widget and its hierarchy from all events that may be sent. Like Tk widgets, busy windows have widget names in the Tk window -hierarchy. This means that you can use the \fBbind\fR command, to handle -events in the busy window. +hierarchy. This means that you can use the \fBbind\fR command to handle +events in the busy window: .PP .CS \fBtk busy\fR hold .frame.canvas -bind .frame.canvas_Busy <Enter> { ... } +bind [\fBtk busy\fR busywindow .frame.canvas] <Enter> { ... } .CE .PP -Normally the busy window is a sibling of the widget. The name of the busy -window is -.QW \fIwidget\fB_Busy\fR -where \fIwidget\fR is the name of the widget to be made busy. In the previous -example, the pathname of the busy window is -.QW \fB.frame.canvas_Busy\fR . -The exception is when the widget is a toplevel widget (such as -.QW . ) -where the busy window can't be made a sibling. The busy window is then a child -of the widget named -.QW \fIwidget\fB._Busy\fR -where \fIwidget\fR is the name of the toplevel widget. In the following -example, the pathname of the busy window is -.QW \fB._Busy\fR . -.PP +or .CS -\fBtk busy\fR hold . -bind ._Busy <Enter> { ... } +set busyWin [\fBtk busy\fR hold .frame.canvas] +bind $busyWin <Enter> { ... } .CE .SS "ENTER/LEAVE EVENTS" .PP |