2
'\" Copyright (c) 1990-1994 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8
'\" RCS: @(#) $Id: GetJustify.3,v 1.2 1998/09/14 18:22:49 stanton Exp $
11
.TH Tk_GetJustify 3 4.0 Tk "Tk Library Procedures"
14
Tk_GetJustify, Tk_NameOfJustify \- translate between strings and justification styles
20
\fBTk_GetJustify(\fIinterp, string, justifyPtr\fB)\fR
23
\fBTk_NameOfJustify(\fIjustify\fB)\fR
25
.AS "Tk_Justify" *justifyPtr
26
.AP Tcl_Interp *interp in
27
Interpreter to use for error reporting.
29
String containing name of justification style (``left'', ``right'', or
31
.AP int *justifyPtr out
32
Pointer to location in which to store justify value corresponding to
34
.AP Tk_Justify justify in
35
Justification style (one of the values listed below).
40
\fBTk_GetJustify\fR places in \fI*justifyPtr\fR the justify value
41
corresponding to \fIstring\fR. This value will be one of the following:
44
Means that the text on each line should start at the left edge of
45
the line; as a result, the right edges of lines may be ragged.
47
\fBTK_JUSTIFY_RIGHT\fR
48
Means that the text on each line should end at the right edge of
49
the line; as a result, the left edges of lines may be ragged.
51
\fBTK_JUSTIFY_CENTER\fR
52
Means that the text on each line should be centered; as a result,
53
both the left and right edges of lines may be ragged.
55
Under normal circumstances the return value is \fBTCL_OK\fR and
56
\fIinterp\fR is unused.
57
If \fIstring\fR doesn't contain a valid justification style
58
or an abbreviation of one of these names, then an error message is
59
stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and
60
\fI*justifyPtr\fR is unmodified.
62
\fBTk_NameOfJustify\fR is the logical inverse of \fBTk_GetJustify\fR.
63
Given a justify value it returns a statically-allocated string
64
corresponding to \fIjustify\fR.
65
If \fIjustify\fR isn't a legal justify value, then
66
``unknown justification style'' is returned.
69
center, fill, justification, string