summaryrefslogtreecommitdiffstats
path: root/doc/GetAnchor.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/GetAnchor.3')
-rw-r--r--doc/GetAnchor.336
1 files changed, 19 insertions, 17 deletions
diff --git a/doc/GetAnchor.3 b/doc/GetAnchor.3
index a992980..5a2ac85 100644
--- a/doc/GetAnchor.3
+++ b/doc/GetAnchor.3
@@ -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: GetAnchor.3,v 1.4 2002/08/05 04:30:38 dgp Exp $
+'\" RCS: @(#) $Id: GetAnchor.3,v 1.10 2007/12/13 15:23:43 dgp Exp $
'\"
.so man.macros
.TH Tk_GetAnchorFromObj 3 8.1 Tk "Tk Library Procedures"
@@ -16,39 +16,42 @@ Tk_GetAnchorFromObj, Tk_GetAnchor, Tk_NameOfAnchor \- translate between strings
.nf
\fB#include <tk.h>\fR
.sp
-.VS 8.1
int
\fBTk_GetAnchorFromObj(\fIinterp, objPtr, anchorPtr\fB)\fR
-.VE
.sp
int
\fBTk_GetAnchor(\fIinterp, string, anchorPtr\fB)\fR
.sp
-CONST char *
+const char *
\fBTk_NameOfAnchor(\fIanchor\fB)\fR
.SH ARGUMENTS
.AS "Tk_Anchor" *anchorPtr
.AP Tcl_Interp *interp in
Interpreter to use for error reporting, or NULL.
-.VS 8.1 br
.AP Tcl_Obj *objPtr in/out
-String value contains name of anchor point: \fBn\fR, \fBne\fR,
-\fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or \fBcenter\fR;
+String value contains name of anchor point:
+.QW n ,
+.QW ne ,
+.QW e ,
+.QW se ,
+.QW s ,
+.QW sw ,
+.QW w ,
+.QW nw ,
+or
+.QW center ;
internal rep will be modified to cache corresponding Tk_Anchor.
-.AP "CONST char" *string in
+.AP "const char" *string in
Same as \fIobjPtr\fR except description of anchor point is passed as
a string.
-.VE
.AP int *anchorPtr out
Pointer to location in which to store anchor position corresponding to
\fIobjPtr\fR or \fIstring\fR.
.AP Tk_Anchor anchor in
Anchor position, e.g. \fBTCL_ANCHOR_CENTER\fR.
.BE
-
.SH DESCRIPTION
.PP
-.VS 8.1
\fBTk_GetAnchorFromObj\fR places in \fI*anchorPtr\fR an anchor position
(enumerated type \fBTk_Anchor\fR)
corresponding to \fIobjPtr\fR's value. The result will be one of
@@ -61,10 +64,10 @@ position the top center point of the object at a particular place.
.PP
Under normal circumstances the return value is \fBTCL_OK\fR and
\fIinterp\fR is unused.
-If \fIstring\fR doesn't contain a valid anchor position
+If \fIstring\fR does not contain a valid anchor position
or an abbreviation of one of these names, \fBTCL_ERROR\fR is returned,
\fI*anchorPtr\fR is unmodified, and an error message is
-stored in \fIinterp\fR's result if \fIinterp\fR isn't NULL.
+stored in \fIinterp\fR's result if \fIinterp\fR is not NULL.
\fBTk_GetAnchorFromObj\fR caches information about the return
value in \fIobjPtr\fR, which speeds up future calls to
\fBTk_GetAnchorFromObj\fR with the same \fIobjPtr\fR.
@@ -74,13 +77,12 @@ that the description of the anchor is specified with a string instead
of an object. This prevents \fBTk_GetAnchor\fR from caching the
return value, so \fBTk_GetAnchor\fR is less efficient than
\fBTk_GetAnchorFromObj\fR.
-.VE
.PP
\fBTk_NameOfAnchor\fR is the logical inverse of \fBTk_GetAnchor\fR.
Given an anchor position such as \fBTK_ANCHOR_N\fR it returns a
statically-allocated string corresponding to \fIanchor\fR.
-If \fIanchor\fR isn't a legal anchor value, then
-``unknown anchor position'' is returned.
-
+If \fIanchor\fR is not a legal anchor value, then
+.QW "unknown anchor position"
+is returned.
.SH KEYWORDS
anchor position