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
25                                           reporting.
26
27       Tcl_Obj *objPtr (in/out)            String   value   contains  name  of
28                                           relief, one  of  “flat”,  “groove”,
29                                           “raised”,   “ridge”,   “solid”,  or
30                                           “sunken”; the internal rep will  be
31                                           modified   to  cache  corresponding
32                                           relief value.
33
34       char *string (in)                   Same as objPtr  except  description
35                                           of relief is passed as a string.
36
37       int *reliefPtr (out)                Pointer  to  location  in  which to
38                                           store relief value corresponding to
39                                           objPtr or name.
40
41       const char   *name                  Name of the relief.
42
43       int relief (in)                     Relief      value      (one      of
44                                           TK_RELIEF_FLAT,   TK_RELIEF_RAISED,
45                                           TK_RELIEF_SUNKEN, TK_RELIEF_GROOVE,
46                                           TK_RELIEF_SOLID,                 or
47                                           TK_RELIEF_RIDGE).
48_________________________________________________________________
49

DESCRIPTION

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

KEYWORDS

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