1Tk_GetReliefFromObj(3)       Tk Library Procedures      Tk_GetReliefFromObj(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_GetReliefFromObj,  Tk_GetRelief, Tk_NameOfRelief - translate between
9       strings and relief values
10

SYNOPSIS

12       #include <tk.h>
13
14       int
15       Tk_GetReliefFromObj(interp, objPtr, reliefPtr)
16
17       int
18       Tk_GetRelief(interp, name, reliefPtr)
19
20       const char *
21       Tk_NameOfRelief(relief)
22

ARGUMENTS

24       Tcl_Interp *interp (in)             Interpreter to use  for  error  re‐
25                                           porting.
26
27       Tcl_Obj *objPtr (in/out)            String  value  contains name of re‐
28                                           lief,  one  of  “flat”,   “groove”,
29raised”,   “ridge”,   “solid”,  or
30sunken” (or any  unique  abbrevia‐
31                                           tion  thereof on input); the inter‐
32                                           nal rep will be modified  to  cache
33                                           corresponding relief value.
34
35       char *string (in)                   Same  as  objPtr except description
36                                           of relief is passed as a string.
37
38       int *reliefPtr (out)                Pointer to  location  in  which  to
39                                           store relief value corresponding to
40                                           objPtr or name.
41
42       const char   *name                  Name of the relief.
43
44       int relief (in)                     Relief   value   (one   of   TK_RE‐
45                                           LIEF_FLAT, TK_RELIEF_RAISED, TK_RE‐
46                                           LIEF_SUNKEN,      TK_RELIEF_GROOVE,
47                                           TK_RELIEF_SOLID,      or     TK_RE‐
48                                           LIEF_RIDGE).
49______________________________________________________________________________
50

DESCRIPTION

52       Tk_GetReliefFromObj places in *reliefPtr the relief value corresponding
53       to  the  value  of  objPtr.   This value will be one of TK_RELIEF_FLAT,
54       TK_RELIEF_RAISED, TK_RELIEF_SUNKEN, TK_RELIEF_GROOVE,  TK_RELIEF_SOLID,
55       or  TK_RELIEF_RIDGE.   Under  normal  circumstances the return value is
56       TCL_OK and interp is unused.  If objPtr does not  contain  one  of  the
57       valid relief names or an abbreviation of one of them, then TCL_ERROR is
58       returned, *reliefPtr is unmodified, and an error message is  stored  in
59       interp's  result if interp is not NULL.  Tk_GetReliefFromObj caches in‐
60       formation about the return value in  objPtr,  which  speeds  up  future
61       calls to Tk_GetReliefFromObj with the same objPtr.
62
63       Tk_GetRelief  is  identical  to Tk_GetReliefFromObj except that the de‐
64       scription of the relief is specified with a string instead  of  an  ob‐
65       ject.   This  prevents  Tk_GetRelief  from caching the return value, so
66       Tk_GetRelief is less efficient than Tk_GetReliefFromObj.
67
68       Tk_NameOfRelief is the logical inverse of Tk_GetRelief.  Given a relief
69       value  it  returns  the  corresponding  string  (flat,  raised, sunken,
70       groove, solid, or ridge).  If relief is not a legal relief value,  then
71       “unknown relief” is returned.
72

KEYWORDS

74       name, relief, string
75
76
77
78Tk                                    8.1               Tk_GetReliefFromObj(3)
Impressum