1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1990-1994 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: GetJustify.3,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
|
9 |
|
|
'\"
|
10 |
|
|
.so man.macros
|
11 |
|
|
.TH Tk_GetJustify 3 4.0 Tk "Tk Library Procedures"
|
12 |
|
|
.BS
|
13 |
|
|
.SH NAME
|
14 |
|
|
Tk_GetJustify, Tk_NameOfJustify \- translate between strings and justification styles
|
15 |
|
|
.SH SYNOPSIS
|
16 |
|
|
.nf
|
17 |
|
|
\fB#include \fR
|
18 |
|
|
.sp
|
19 |
|
|
Tk_Justify
|
20 |
|
|
\fBTk_GetJustify(\fIinterp, string, justifyPtr\fB)\fR
|
21 |
|
|
.sp
|
22 |
|
|
char *
|
23 |
|
|
\fBTk_NameOfJustify(\fIjustify\fB)\fR
|
24 |
|
|
.SH ARGUMENTS
|
25 |
|
|
.AS "Tk_Justify" *justifyPtr
|
26 |
|
|
.AP Tcl_Interp *interp in
|
27 |
|
|
Interpreter to use for error reporting.
|
28 |
|
|
.AP char *string in
|
29 |
|
|
String containing name of justification style (``left'', ``right'', or
|
30 |
|
|
``center'').
|
31 |
|
|
.AP int *justifyPtr out
|
32 |
|
|
Pointer to location in which to store justify value corresponding to
|
33 |
|
|
\fIstring\fR.
|
34 |
|
|
.AP Tk_Justify justify in
|
35 |
|
|
Justification style (one of the values listed below).
|
36 |
|
|
.BE
|
37 |
|
|
|
38 |
|
|
.SH DESCRIPTION
|
39 |
|
|
.PP
|
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:
|
42 |
|
|
.TP
|
43 |
|
|
\fBTK_JUSTIFY_LEFT\fR
|
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.
|
46 |
|
|
.TP
|
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.
|
50 |
|
|
.TP
|
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.
|
54 |
|
|
.PP
|
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.
|
61 |
|
|
.PP
|
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.
|
67 |
|
|
|
68 |
|
|
.SH KEYWORDS
|
69 |
|
|
center, fill, justification, string
|