summaryrefslogtreecommitdiffstats
path: root/doc/grab.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-06-30 22:57:00 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-06-30 22:57:00 (GMT)
commitd6e7f6b3743e98803d7e8c7debc709c072c6e6a5 (patch)
treed6714c53bb2368a4c8befd4c7dc0085d88b31a15 /doc/grab.n
parent8ab3b0fffbe37701d924b4da873e6f231a843e5f (diff)
downloadtk-d6e7f6b3743e98803d7e8c7debc709c072c6e6a5.zip
tk-d6e7f6b3743e98803d7e8c7debc709c072c6e6a5.tar.gz
tk-d6e7f6b3743e98803d7e8c7debc709c072c6e6a5.tar.bz2
Minor doc updates (removing out of date changebars, improving typedef formatting,
etc.)
Diffstat (limited to 'doc/grab.n')
-rw-r--r--doc/grab.n7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/grab.n b/doc/grab.n
index b16b933..3a15523 100644
--- a/doc/grab.n
+++ b/doc/grab.n
@@ -1,3 +1,4 @@
+'\" -*- nroff -*-
'\"
'\" Copyright (c) 1992 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -5,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: grab.n,v 1.8 2007/12/13 15:23:43 dgp Exp $
+'\" RCS: @(#) $Id: grab.n,v 1.9 2008/06/30 22:57:02 dkf Exp $
'\"
.so man.macros
.TH grab n "" Tk "Tk Built-In Commands"
@@ -18,7 +19,6 @@ grab \- Confine pointer and keyboard events to a window sub-tree
.sp
\fBgrab \fIoption \fR?\fIarg arg \fR...?
.BE
-
.SH DESCRIPTION
.PP
This command implements simple pointer and keyboard grabs for Tk.
@@ -104,6 +104,7 @@ Returns \fBnone\fR if no grab is currently set on \fIwindow\fR,
\fBlocal\fR if a local grab is set on \fIwindow\fR, and
\fBglobal\fR if a global grab is set.
.SH WARNING
+.PP
It is very easy to use global grabs to render a display completely
unusable (e.g. by setting a grab on a widget which does not respond to
events and not providing any mechanism for releasing the grab). Take
@@ -123,6 +124,7 @@ only one of those applications can have a local grab for a given
display at any given time. If the applications are in different
processes, this restriction does not exist.
.SH EXAMPLE
+.PP
Set a grab so that only one button may be clicked out of a group. The
other buttons are unresponsive to the mouse until the middle button is
clicked.
@@ -132,6 +134,5 @@ pack [button .b2 \-text "Click me! #2" \-command {destroy .b2}]
pack [button .b3 \-text "Click me! #3" \-command {destroy .b3}]
\fBgrab\fR .b2
.CE
-
.SH KEYWORDS
grab, keyboard events, pointer events, window