File: tk.html

package info (click to toggle)
gcl 2.6.14-21
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 60,864 kB
  • sloc: ansic: 177,407; lisp: 151,509; asm: 128,169; sh: 22,510; cpp: 11,923; tcl: 3,181; perl: 2,930; makefile: 2,360; sed: 334; yacc: 226; lex: 95; awk: 30; fortran: 24; csh: 23
file content (102 lines) | stat: -rw-r--r-- 4,465 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>tk (GCL TK Manual)</title>

<meta name="description" content="tk (GCL TK Manual)">
<meta name="keywords" content="tk (GCL TK Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html" rel="start" title="Top">
<link href="wm.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Control.html" rel="up" title="Control">
<link href="tkerror.html" rel="next" title="tkerror">
<link href="send.html" rel="prev" title="send">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<span id="tk"></span><div class="header">
<p>
Next: <a href="tkerror.html" accesskey="n" rel="next">tkerror</a>, Previous: <a href="send.html" accesskey="p" rel="prev">send</a>, Up: <a href="Control.html" accesskey="u" rel="up">Control</a> &nbsp; [<a href="wm.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<hr>
<span id="tk-1"></span><h3 class="section">3.19 tk</h3>

<p>tk \- Manipulate Tk internal state
</p><span id="Synopsis-32"></span><h4 class="unnumberedsubsec">Synopsis</h4>
<p><b>tk</b><span class="roman"> </span><i>option </i><span class="roman">?</span><i>arg arg ...</i>?
</p>
<span id="Description-30"></span><h4 class="unnumberedsubsec">Description</h4>

<p>The <b>tk</b> command provides access to miscellaneous
elements of Tk&rsquo;s internal state.
Most of the information manipulated by this command pertains to the
application as a whole, or to a screen or display, rather than to a
particular window.
The command can take any of a number of different forms
depending on the <i>option</i> argument.  The legal forms are:
</p>
<dl compact="compact">
<dt><b>tk :colormodel </b><i>window</i><span class="roman"> ?</span><i>newValue</i>?</dt>
<dd><p>If <i>newValue</i> isn&rsquo;t specified, this command returns the current
color model in use for <i>window</i>&rsquo;s screen, which will be either
<b>color</b><span class="roman"> or </span><b>monochrome</b>.
If <i>newValue</i><span class="roman"> is specified, then it must be either </span><b>color</b>
or <b>monochrome</b> or an abbreviation of one of them;
the color model for <i>window</i>&rsquo;s screen is set to this value.
</p></dd>
</dl>


<p>The color model is used by Tk and its widgets to determine whether
it should display in black and white only or use colors.
A single color model is shared by all of the windows managed by one
process on a given screen.
The color model for a screen is set initially by Tk to <b>monochrome</b>
if the display has four or fewer bit planes and to <b>color</b> otherwise.
The color model will automatically be changed from <b>color</b> to
<b>monochrome</b> if Tk fails to allocate a color because all entries
in the colormap were in use.
An application can change its own color model at any time (e.g. it
might change the model to <b>monochrome</b> in order to conserve
colormap entries, or it might set the model to <b>color</b>
to use color on a four-bit display in special circumstances), but
an application is not allowed to change the color model to <b>color</b>
unless the screen has at least two bit planes.
.RE
</p>
<span id="Keywords-33"></span><h4 class="unnumberedsubsec">Keywords</h4>
<p>color model, internal state
</p><hr>
<div class="header">
<p>
Next: <a href="tkerror.html" accesskey="n" rel="next">tkerror</a>, Previous: <a href="send.html" accesskey="p" rel="prev">send</a>, Up: <a href="Control.html" accesskey="u" rel="up">Control</a> &nbsp; [<a href="wm.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>



</body>
</html>