OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tk/] [doc/] [GetAnchor.3] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1990 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: GetAnchor.3,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
9
'\"
10
.so man.macros
11
.TH Tk_GetAnchor 3 "" Tk "Tk Library Procedures"
12
.BS
13
.SH NAME
14
Tk_GetAnchor, Tk_NameOfAnchor \- translate between strings and anchor positions
15
.SH SYNOPSIS
16
.nf
17
\fB#include \fR
18
.sp
19
int
20
\fBTk_GetAnchor(\fIinterp, string, anchorPtr\fB)\fR
21
.sp
22
char *
23
\fBTk_NameOfAnchor(\fIanchor\fB)\fR
24
.SH ARGUMENTS
25
.AS "Tk_Anchor" *anchorPtr
26
.AP Tcl_Interp *interp in
27
Interpreter to use for error reporting.
28
.AP char *string in
29
String containing name of anchor point: one of ``n'', ``ne'', ``e'', ``se'',
30
``s'', ``sw'', ``w'', ``nw'', or ``center''.
31
.AP int *anchorPtr out
32
Pointer to location in which to store anchor position corresponding to
33
\fIstring\fR.
34
.AP Tk_Anchor anchor in
35
Anchor position, e.g. \fBTCL_ANCHOR_CENTER\fR.
36
.BE
37
 
38
.SH DESCRIPTION
39
.PP
40
\fBTk_GetAnchor\fR places in \fI*anchorPtr\fR an anchor position
41
(enumerated type \fBTk_Anchor\fR)
42
corresponding to \fIstring\fR,  which will be one of
43
\fBTK_ANCHOR_N\fR, \fBTK_ANCHOR_NE\fR, \fBTK_ANCHOR_E\fR, \fBTK_ANCHOR_SE\fR,
44
\fBTK_ANCHOR_S\fR, \fBTK_ANCHOR_SW\fR, \fBTK_ANCHOR_W\fR, \fBTK_ANCHOR_NW\fR,
45
or \fBTK_ANCHOR_CENTER\fR.
46
Anchor positions are typically used for indicating a point on an object
47
that will be used to position that object, e.g. \fBTK_ANCHOR_N\fR means
48
position the top center point of the object at a particular place.
49
.PP
50
Under normal circumstances the return value is \fBTCL_OK\fR and
51
\fIinterp\fR is unused.
52
If \fIstring\fR doesn't contain a valid anchor position
53
or an abbreviation of one of these names, then an error message is
54
stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and
55
\fI*anchorPtr\fR is unmodified.
56
.PP
57
\fBTk_NameOfAnchor\fR is the logical inverse of \fBTk_GetAnchor\fR.
58
Given an anchor position such as \fBTK_ANCHOR_N\fR it returns a
59
statically-allocated string corresponding to \fIanchor\fR.
60
If \fIanchor\fR isn't a legal anchor value, then
61
``unknown anchor position'' is returned.
62
 
63
.SH KEYWORDS
64
anchor position

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.