67 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <HTML><HEAD><TITLE>Tk Built-In Commands - tk manual page</TITLE></HEAD><BODY>
 | |
| <H3><A NAME="M2">NAME</A></H3>
 | |
| tk - Manipulate Tk internal state
 | |
| <H3><A NAME="M3">SYNOPSIS</A></H3>
 | |
| <B>tk</B> <I>option </I>?<I>arg arg ...</I>?<BR>
 | |
| <H3><A NAME="M4">DESCRIPTION</A></H3>
 | |
| The <B>tk</B> command provides access to miscellaneous
 | |
| elements of Tk'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>
 | |
| <P><DT><A NAME="M5"><B>tk appname </B>?<I>newName</I>?</A><DD>
 | |
| If <I>newName</I> isn't specified, this command returns the name
 | |
| of the application (the name that may be used in <B><A HREF="../TclCmd/send.htm">send</A></B>
 | |
| commands to communicate with the application).
 | |
| If <I>newName</I> is specified, then the name of the application
 | |
| is changed to <I>newName</I>.
 | |
| If the given name is already in use, then a suffix of the form
 | |
| ``<B> #2</B>'' or ``<B> #3</B>'' is appended in order to make the name unique.
 | |
| The command's result is the name actually chosen.
 | |
| <I>newName</I> should not start with a capital letter.
 | |
| This will interfere with option processing, since names starting with
 | |
| capitals are assumed to be classes;  as a result, Tk may not
 | |
| be able to find some options for the application.
 | |
| If sends have been disabled by deleting the <B><A HREF="../TclCmd/send.htm">send</A></B> command,
 | |
| this command will reenable them and recreate the <B><A HREF="../TclCmd/send.htm">send</A></B>
 | |
| command.
 | |
| <P><DT><A NAME="M6"><B>tk scaling </B>?<B>-displayof </B><I>window</I>? ?<I>number</I>?</A><DD>
 | |
| Sets and queries the current scaling factor used by Tk to convert between
 | |
| physical units (for example, points, inches, or millimeters) and pixels.  The
 | |
| <I>number</I> argument is a floating point number that specifies the number of
 | |
| pixels per point on <I>window</I>'s display.  If the <I>window</I> argument is
 | |
| omitted, it defaults to the main window.  If the <I>number</I> argument is 
 | |
| omitted, the current value of the scaling factor is returned.
 | |
| <P>
 | |
| A ``point'' is a unit of measurement equal to 1/72 inch.  A scaling factor
 | |
| of 1.0 corresponds to 1 pixel per point, which is equivalent to a standard
 | |
| 72 dpi monitor.  A scaling factor of 1.25 would mean 1.25 pixels per point,
 | |
| which is the setting for a 90 dpi monitor; setting the scaling factor to
 | |
| 1.25 on a 72 dpi monitor would cause everything in the application to be
 | |
| displayed 1.25 times as large as normal.  The initial value for the scaling
 | |
| factor is set when the application starts, based on properties of the
 | |
| installed monitor, but it can be changed at any time.  Measurements made
 | |
| after the scaling factor is changed will use the new scaling factor, but it
 | |
| is undefined whether existing widgets will resize themselves dynamically to
 | |
| accomodate the new scaling factor.
 | |
| <P><DT><A NAME="M7"><B>tk useinputmethods </B>?<B>-displayof </B><I>window</I>? ?<I>boolean</I>?</A><DD>
 | |
| Sets and queries the state of whether Tk should use XIM (X Input Methods)
 | |
| for filtering events.  The resulting state is returned.  XIM is used in
 | |
| some locales (ie: Japanese, Korean), to handle special input devices.  This
 | |
| feature is only significant on X.  If XIM support is not available, this
 | |
| will always return 0.  If the <I>window</I> argument is omitted, it defaults
 | |
| to the main window.  If the <I>boolean</I> argument is omitted, the current
 | |
| state is returned.  This is turned on by default for the main display.
 | |
| <P></DL>
 | |
| <H3><A NAME="M8">KEYWORDS</A></H3>
 | |
| <A href="../Keywords/A.htm#application name">application name</A>, <A href="../Keywords/S.htm#send">send</A>
 | |
| <HR><PRE>
 | |
| <A HREF="../copyright.htm">Copyright</A> © 1992 The Regents of the University of California.
 | |
| <A HREF="../copyright.htm">Copyright</A> © 1994-1996 Sun Microsystems, Inc.
 | |
| <A HREF="../copyright.htm">Copyright</A> © 1995-1997 Roger E. Critchlow Jr.</PRE>
 | |
| </BODY></HTML>
 | 
