summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-06-18 21:58:37 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-06-18 21:58:37 (GMT)
commit5c890e60ea61704d56cbf00d28155c16c7a2860d (patch)
tree9b03b5d994b774c45832fb52878c33130c72ef73
parent0b772657c0f563b66f30475242189d3137a559f3 (diff)
downloadtk-5c890e60ea61704d56cbf00d28155c16c7a2860d.zip
tk-5c890e60ea61704d56cbf00d28155c16c7a2860d.tar.gz
tk-5c890e60ea61704d56cbf00d28155c16c7a2860d.tar.bz2
Added example
-rw-r--r--doc/raise.n17
-rw-r--r--doc/winfo.n14
-rw-r--r--doc/wm.n15
3 files changed, 39 insertions, 7 deletions
diff --git a/doc/raise.n b/doc/raise.n
index 534aa12..0591a50 100644
--- a/doc/raise.n
+++ b/doc/raise.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: raise.n,v 1.2 1998/09/14 18:22:59 stanton Exp $
+'\" RCS: @(#) $Id: raise.n,v 1.3 2004/06/18 21:58:37 dkf Exp $
'\"
.so man.macros
.TH raise n 3.3 Tk "Tk Built-In Commands"
@@ -30,9 +30,22 @@ In this case the \fBraise\fR command will insert
\fIwindow\fR into the stacking order just above \fIaboveThis\fR
(or the ancestor of \fIaboveThis\fR that is a sibling of \fIwindow\fR);
this could end up either raising or lowering \fIwindow\fR.
+.SH EXAMPLE
+Make a button appear to be in a sibling frame that was created after
+it. This is is often necessary when building GUIs in the style where
+you create your activity widgets first before laying them out on the
+display:
+.CS
+button .b -text "Hi there!"
+pack [frame .f -background blue]
+pack [label .f.l1 -text "This is above"]
+pack .b -in .f
+pack [label .f.l2 -text "This is below"]
+\fBraise\fR .b
+.CE
.SH "SEE ALSO"
-lower
+lower(n)
.SH KEYWORDS
obscure, raise, stacking order
diff --git a/doc/winfo.n b/doc/winfo.n
index 975c51a..324d6e3 100644
--- a/doc/winfo.n
+++ b/doc/winfo.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: winfo.n,v 1.4 2004/03/25 14:33:33 dkf Exp $
+'\" RCS: @(#) $Id: winfo.n,v 1.5 2004/06/18 22:31:18 dkf Exp $
'\"
.so man.macros
.TH winfo n 4.3 Tk "Tk Built-In Commands"
@@ -327,6 +327,18 @@ Returns a decimal string giving the y-coordinate, in \fIwindow\fR's
parent, of the
upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
has no border).
+.SH EXAMPLE
+Print where the mouse pointer is and what window it is currently over:
+.CS
+lassign [\fBwinfo\fR pointerxy .] x y
+puts -nonewline "Mouse pointer at ($x,$y) which is "
+set win [\fBwinfo\fR containing $x $y]
+if {$win eq ""} {
+ puts "over no window"
+} else {
+ puts "over $win"
+}
+.CE
.SH KEYWORDS
atom, children, class, geometry, height, identifier, information, interpreters,
diff --git a/doc/wm.n b/doc/wm.n
index 4f575f3..c1d3f44 100644
--- a/doc/wm.n
+++ b/doc/wm.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: wm.n,v 1.12 2003/03/12 00:25:41 mdejong Exp $
+'\" RCS: @(#) $Id: wm.n,v 1.13 2004/06/18 22:07:59 dkf Exp $
'\"
.so man.macros
.TH wm n 8.4 Tk "Tk Built-In Commands"
@@ -479,7 +479,6 @@ Note: it sometimes seems to be necessary to withdraw a
window and then re-map it (e.g. with \fBwm deiconify\fR) to get some
window managers to pay attention to changes in window attributes
such as group.
-
.SH "GEOMETRY MANAGEMENT"
.PP
By default a top-level window appears on the screen in its
@@ -506,7 +505,6 @@ all forms of resizing, including the window's natural size as
well as manual resizes and the \fBwm geometry\fR command.
You can also use the command \fBwm resizable\fR to completely
disable interactive resizing in one or both dimensions.
-
.SH "GRIDDED GEOMETRY MANAGEMENT"
.PP
Gridded geometry management occurs when one of the widgets of an
@@ -540,13 +538,22 @@ in \fBwm minsize\fR, \fBwm maxsize\fR, and \fBwm geometry\fR commands
are treated as grid units rather than pixel units.
Interactive resizing is also carried out in even numbers of grid units
rather than pixels.
-
.SH BUGS
.PP
Most existing window managers appear to have bugs that affect the
operation of the \fBwm\fR command. For example, some changes won't
take effect if the window is already active: the window will have
to be withdrawn and de-iconified in order to make the change happen.
+.SH EXAMPLE
+A fixed-size window that says that it is fixed-size too:
+.CS
+toplevel .fixed
+\fBwm\fR title .fixed "Fixed-size Window"
+\fBwm\fR resizable .fixed 0 0
+.CE
+
+.SH "SEE ALSO"
+toplevel(n), winfo(n)
.SH KEYWORDS
aspect ratio, deiconify, focus model, geometry, grid, group, icon, iconify, increments, position, size, title, top-level window, units, window manager