archie/tk4.2/doc/GetRelief.3
2024-05-27 16:40:40 +02:00

60 lines
1.9 KiB
Groff

'\"
'\" 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.
'\"
'\" SCCS: @(#) GetRelief.3 1.10 96/03/26 18:12:01
'\"
.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'', 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, 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, 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'', or ``ridge'').
If \fIrelief\fR isn't a legal relief value, then ``unknown relief''
is returned.
.SH KEYWORDS
name, relief, string