2 '\" Copyright (c) 1990 The Regents of the University of California.
3 '\" Copyright (c) 1994-1998 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 .TH Tk_GetReliefFromObj 3 8.1 Tk "Tk Library Procedures"
12 Tk_GetReliefFromObj, Tk_GetRelief, Tk_NameOfRelief \- translate between strings and relief values
18 \fBTk_GetReliefFromObj(\fIinterp, objPtr, reliefPtr\fB)\fR
21 \fBTk_GetRelief(\fIinterp, name, reliefPtr\fB)\fR
24 \fBTk_NameOfRelief(\fIrelief\fB)\fR
26 .AS "Tcl_Interp" *reliefPtr
27 .AP Tcl_Interp *interp in
28 Interpreter to use for error reporting.
29 .AP Tcl_Obj *objPtr in/out
30 String value contains name of relief, one of
38 (or any unique abbreviation thereof on input);
39 the internal rep will be modified to cache corresponding relief value.
41 Same as \fIobjPtr\fR except description of relief is passed as
43 .AP int *reliefPtr out
44 Pointer to location in which to store relief value corresponding to
45 \fIobjPtr\fR or \fIname\fR.
46 .AP "const char" *name
49 Relief value (one of \fBTK_RELIEF_FLAT\fR, \fBTK_RELIEF_RAISED\fR,
50 \fBTK_RELIEF_SUNKEN\fR, \fBTK_RELIEF_GROOVE\fR, \fBTK_RELIEF_SOLID\fR,
51 or \fBTK_RELIEF_RIDGE\fR).
55 \fBTk_GetReliefFromObj\fR places in \fI*reliefPtr\fR the relief value
56 corresponding to the value of \fIobjPtr\fR. This value will be one of
57 \fBTK_RELIEF_FLAT\fR, \fBTK_RELIEF_RAISED\fR, \fBTK_RELIEF_SUNKEN\fR,
58 \fBTK_RELIEF_GROOVE\fR, \fBTK_RELIEF_SOLID\fR, or \fBTK_RELIEF_RIDGE\fR.
59 Under normal circumstances the return value is \fBTCL_OK\fR and
60 \fIinterp\fR is unused.
61 If \fIobjPtr\fR does not contain one of the valid relief names
62 or an abbreviation of one of them, then \fBTCL_ERROR\fR is returned,
63 \fI*reliefPtr\fR is unmodified, and an error message
64 is stored in \fIinterp\fR's result if \fIinterp\fR is not NULL.
65 \fBTk_GetReliefFromObj\fR caches information about the return
66 value in \fIobjPtr\fR, which speeds up future calls to
67 \fBTk_GetReliefFromObj\fR with the same \fIobjPtr\fR.
69 \fBTk_GetRelief\fR is identical to \fBTk_GetReliefFromObj\fR except
70 that the description of the relief is specified with a string instead
71 of an object. This prevents \fBTk_GetRelief\fR from caching the
72 return value, so \fBTk_GetRelief\fR is less efficient than
73 \fBTk_GetReliefFromObj\fR.
75 \fBTk_NameOfRelief\fR is the logical inverse of \fBTk_GetRelief\fR.
76 Given a relief value it returns the corresponding string (\fBflat\fR,
77 \fBraised\fR, \fBsunken\fR, \fBgroove\fR, \fBsolid\fR, or \fBridge\fR).
78 If \fIrelief\fR is not a legal relief value, then