Debian Codegraph @

pod/pTk/GetRelief.pod

raw
1 # Copyright (c) 1990 The Regents of the University of California.
2 # Copyright (c) 1994-1996 Sun Microsystems, Inc.
3 # See the file "license.terms" for information on usage and redistribution
4 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
5 #
6 #
7
8 =head1 NAME
9
10 Tk_GetRelief, Tk_NameOfRelief - translate between strings and relief values
11
12 =for category C Programming
13
14 =head1 SYNOPSIS
15
16 B<#include E<lt>tk.hE<gt>>
17
18 int
19 B<Tk_GetRelief(>I<interp, name, reliefPtr>B<)>
20
21 char *
22 B<Tk_NameOfRelief(>I<relief>B<)>
23
24 =head1 ARGUMENTS
25
26 =over 4
27
28 =item Tcl_Interp *interp (in)
29
30 Interpreter to use for error reporting.
31
32 =item char *name (in)
33
34 String containing relief name (one of ``flat'', ``groove'',
35 ``raised'', ``ridge'', ``solid'', or ``sunken'').
36
37 =item int *reliefPtr (out)
38
39 Pointer to location in which to store relief value corresponding to
40 I<name>.
41
42 =item int relief (in)
43
44 Relief value (one of TK_RELIEF_FLAT, TK_RELIEF_RAISED, TK_RELIEF_SUNKEN,
45 TK_RELIEF_GROOVE, TK_RELIEF_SOLID, or TK_RELIEF_RIDGE).
46
47 =back
48
49 =head1 DESCRIPTION
50
51 B<Tk_GetRelief> places in I<*reliefPtr> the relief value
52 corresponding to I<name>. This value will be one of
53 TK_RELIEF_FLAT, TK_RELIEF_RAISED, TK_RELIEF_SUNKEN,
54 TK_RELIEF_GROOVE, TK_RELIEF_SOLID, or TK_RELIEF_RIDGE.
55 Under normal circumstances the return value is TCL_OK and
56 I<interp> is unused.
57 If I<name> doesn't contain one of the valid relief names
58 or an abbreviation of one of them, then an error message
59 is stored in I<interp-E<gt>result>,
60 TCL_ERROR is returned, and I<*reliefPtr> is unmodified.
61
62 B<Tk_NameOfRelief> is the logical inverse of B<Tk_GetRelief>.
63 Given a relief value it returns the corresponding string (``flat'',
64 ``raised'', ``sunken'', ``groove'', ``solid'', or ``ridge'').
65 If I<relief> isn't a legal relief value, then ``unknown relief''
66 is returned.
67
68 =head1 KEYWORDS
69
70 name, relief, string