summaryrefslogtreecommitdiffstats
path: root/doc/GetAnchor.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/GetAnchor.3')
-rw-r--r--doc/GetAnchor.334
1 files changed, 18 insertions, 16 deletions
diff --git a/doc/GetAnchor.3 b/doc/GetAnchor.3
index 0b25cb0..8698353 100644
--- a/doc/GetAnchor.3
+++ b/doc/GetAnchor.3
@@ -14,39 +14,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
@@ -59,10 +62,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.
@@ -72,13 +75,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