OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / util / src / TclTk / tk8.6.12 / doc / GetRelief.3
1 '\"
2 '\" Copyright (c) 1990 The Regents of the University of California.
3 '\" Copyright (c) 1994-1998 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 .TH Tk_GetReliefFromObj 3 8.1 Tk "Tk Library Procedures"
9 .so man.macros
10 .BS
11 .SH NAME
12 Tk_GetReliefFromObj, Tk_GetRelief, Tk_NameOfRelief \- translate between strings and relief values
13 .SH SYNOPSIS
14 .nf
15 \fB#include <tk.h>\fR
16 .sp
17 int
18 \fBTk_GetReliefFromObj(\fIinterp, objPtr, reliefPtr\fB)\fR
19 .sp
20 int
21 \fBTk_GetRelief(\fIinterp, name, reliefPtr\fB)\fR
22 .sp
23 const char *
24 \fBTk_NameOfRelief(\fIrelief\fB)\fR
25 .SH ARGUMENTS
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
31 .QW \fBflat\fR ,
32 .QW \fBgroove\fR ,
33 .QW \fBraised\fR ,
34 .QW \fBridge\fR ,
35 .QW \fBsolid\fR ,
36 or
37 .QW \fBsunken\fR
38 (or any unique abbreviation thereof on input);
39 the internal rep will be modified to cache corresponding relief value.
40 .AP char *string in
41 Same as \fIobjPtr\fR except description of relief is passed as
42 a string.
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
47 Name of the relief.
48 .AP int relief in
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).
52 .BE
53 .SH DESCRIPTION
54 .PP
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.
68 .PP
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.
74 .PP
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
79 .QW "unknown relief"
80 is returned.
81 .SH KEYWORDS
82 name, relief, string