1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1992 The Regents of the University of California.
|
3 |
|
|
'\" Copyright (c) 1994-1996 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 |
|
|
'\" RCS: @(#) $Id: tk.n,v 1.1.1.1 2002-01-16 10:25:49 markom Exp $
|
9 |
|
|
'\"
|
10 |
|
|
.so man.macros
|
11 |
|
|
.TH tk n 4.0 Tk "Tk Built-In Commands"
|
12 |
|
|
.BS
|
13 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
14 |
|
|
.SH NAME
|
15 |
|
|
tk \- Manipulate Tk internal state
|
16 |
|
|
.SH SYNOPSIS
|
17 |
|
|
\fBtk\fR \fIoption \fR?\fIarg arg ...\fR?
|
18 |
|
|
.BE
|
19 |
|
|
|
20 |
|
|
.SH DESCRIPTION
|
21 |
|
|
.PP
|
22 |
|
|
The \fBtk\fR command provides access to miscellaneous
|
23 |
|
|
elements of Tk's internal state.
|
24 |
|
|
Most of the information manipulated by this command pertains to the
|
25 |
|
|
application as a whole, or to a screen or display, rather than to a
|
26 |
|
|
particular window.
|
27 |
|
|
The command can take any of a number of different forms
|
28 |
|
|
depending on the \fIoption\fR argument. The legal forms are:
|
29 |
|
|
.TP
|
30 |
|
|
\fBtk appname \fR?\fInewName\fR?
|
31 |
|
|
If \fInewName\fR isn't specified, this command returns the name
|
32 |
|
|
of the application (the name that may be used in \fBsend\fR
|
33 |
|
|
commands to communicate with the application).
|
34 |
|
|
If \fInewName\fR is specified, then the name of the application
|
35 |
|
|
is changed to \fInewName\fR.
|
36 |
|
|
If the given name is already in use, then a suffix of the form
|
37 |
|
|
``\fB #2\fR'' or ``\fB #3\fR'' is appended in order to make the name unique.
|
38 |
|
|
The command's result is the name actually chosen.
|
39 |
|
|
\fInewName\fR should not start with a capital letter.
|
40 |
|
|
This will interfere with option processing, since names starting with
|
41 |
|
|
capitals are assumed to be classes; as a result, Tk may not
|
42 |
|
|
be able to find some options for the application.
|
43 |
|
|
If sends have been disabled by deleting the \fBsend\fR command,
|
44 |
|
|
this command will reenable them and recreate the \fBsend\fR
|
45 |
|
|
command.
|
46 |
|
|
.VS
|
47 |
|
|
.TP
|
48 |
|
|
\fBtk scaling \fR?\fB\-displayof \fIwindow\fR? ?\fInumber\fR?
|
49 |
|
|
.
|
50 |
|
|
Sets and queries the current scaling factor used by Tk to convert between
|
51 |
|
|
physical units (for example, points, inches, or millimeters) and pixels. The
|
52 |
|
|
\fInumber\fR argument is a floating point number that specifies the number of
|
53 |
|
|
pixels per point on \fIwindow\fR's display. If the \fIwindow\fR argument is
|
54 |
|
|
omitted, it defaults to the main window. If the \fInumber\fR argument is
|
55 |
|
|
omitted, the current value of the scaling factor is returned.
|
56 |
|
|
.RS
|
57 |
|
|
.PP
|
58 |
|
|
A ``point'' is a unit of measurement equal to 1/72 inch. A scaling factor
|
59 |
|
|
of 1.0 corresponds to 1 pixel per point, which is equivalent to a standard
|
60 |
|
|
72 dpi monitor. A scaling factor of 1.25 would mean 1.25 pixels per point,
|
61 |
|
|
which is the setting for a 90 dpi monitor; setting the scaling factor to
|
62 |
|
|
1.25 on a 72 dpi monitor would cause everything in the application to be
|
63 |
|
|
displayed 1.25 times as large as normal. The initial value for the scaling
|
64 |
|
|
factor is set when the application starts, based on properties of the
|
65 |
|
|
installed monitor, but it can be changed at any time. Measurements made
|
66 |
|
|
after the scaling factor is changed will use the new scaling factor, but it
|
67 |
|
|
is undefined whether existing widgets will resize themselves dynamically to
|
68 |
|
|
accomodate the new scaling factor.
|
69 |
|
|
.RE
|
70 |
|
|
.VE
|
71 |
|
|
.SH KEYWORDS
|
72 |
|
|
application name, send
|