1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" RCS: @(#) $Id: GetRelief.3,v 1.2 1998/09/14 18:22:51 stanton Exp $
'\"
.so man.macros
.TH Tk_GetRelief 3 "" Tk "Tk Library Procedures"
.BS
.SH NAME
Tk_GetRelief, Tk_NameOfRelief \- translate between strings and relief values
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
int
\fBTk_GetRelief(\fIinterp, name, reliefPtr\fB)\fR
.sp
char *
\fBTk_NameOfRelief(\fIrelief\fB)\fR
.SH ARGUMENTS
.AS "Tcl_Interp" *reliefPtr
.AP Tcl_Interp *interp in
Interpreter to use for error reporting.
.AP char *name in
String containing relief name (one of ``flat'', ``groove'',
``raised'', ``ridge'', ``solid'', or ``sunken'').
.AP int *reliefPtr out
Pointer to location in which to store relief value corresponding to
\fIname\fR.
.AP int relief in
Relief value (one of TK_RELIEF_FLAT, TK_RELIEF_RAISED, TK_RELIEF_SUNKEN,
TK_RELIEF_GROOVE, TK_RELIEF_SOLID, or TK_RELIEF_RIDGE).
.BE
.SH DESCRIPTION
.PP
\fBTk_GetRelief\fR places in \fI*reliefPtr\fR the relief value
corresponding to \fIname\fR. This value will be one of
TK_RELIEF_FLAT, TK_RELIEF_RAISED, TK_RELIEF_SUNKEN,
TK_RELIEF_GROOVE, TK_RELIEF_SOLID, or TK_RELIEF_RIDGE.
Under normal circumstances the return value is TCL_OK and
\fIinterp\fR is unused.
If \fIname\fR doesn't contain one of the valid relief names
or an abbreviation of one of them, then an error message
is stored in \fIinterp->result\fR,
TCL_ERROR is returned, and \fI*reliefPtr\fR is unmodified.
.PP
\fBTk_NameOfRelief\fR is the logical inverse of \fBTk_GetRelief\fR.
Given a relief value it returns the corresponding string (``flat'',
``raised'', ``sunken'', ``groove'', ``solid'', or ``ridge'').
If \fIrelief\fR isn't a legal relief value, then ``unknown relief''
is returned.
.SH KEYWORDS
name, relief, string
|