% Reference Card for Tk 3.3
% written by Paul Raines <raines@bohr.physics.upenn.edu>
%**start of header
\newcount\columnsperpage

% This file can be printed with 1, 2, or 3 columns per page (see below).
% Specify how many you want here.  Nothing else needs to be changed.
% It is really designed for 3 columns

\columnsperpage=3

% I crafted this reference card using the emacs refcard.tex by Stephen Gildea
% as a template. Therefore, the usual GNU copyright info follows.

% Copyright (c) 1987 Free Software Foundation, Inc.

% This file is part of GNU Emacs.

% GNU Emacs is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 1, or (at your option)
% any later version.

% GNU Emacs is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.

% You should have received a copy of the GNU General Public License

% Permission is granted to make and distribute copies of
% this card provided the copyright notice and this permission notice
% are preserved on all copies.

\def\bye{\par\vfill\supereject\end}

\newdimen\intercolumnskip
\newbox\columna
\newbox\columnb

\def\ncolumns{\the\columnsperpage}

\message{[\ncolumns\space
  column\if 1\ncolumns\else s\fi\space per page]}

\def\scaledmag#1{ scaled \magstep #1}

% This multi-way format was designed by Stephen Gildea
% October 1986.
\if 1\ncolumns
  \hsize 4in
  \vsize 10in
  \voffset -.7in
  \font\titlefont=\fontname\tenbf \scaledmag3
  \font\headingfont=\fontname\tenbf \scaledmag2
  \font\smallfont=\fontname\sevenrm
  \font\smallsy=\fontname\sevensy
  \footline{\hss\folio}
  \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
\else
  \hsize 3.2in
  \vsize 7.95in
  \hoffset -.75in
  \voffset -.745in
  \font\titlefont=cmbx10 \scaledmag2
  \font\headingfont=cmbx10 \scaledmag1
  \font\smallfont=cmr6
  \font\smallsy=cmsy6
  \font\eightrm=cmr8
  \font\eightbf=cmbx8
  \font\eightit=cmti8
  \font\eighttt=cmtt8
  \font\eightsy=cmsy8
  \textfont0=\eightrm
  \textfont2=\eightsy
  \def\rm{\eightrm}
  \def\bf{\eightbf}
  \def\it{\eightit}
  \def\tt{\eighttt}
  \normalbaselineskip=.8\normalbaselineskip
  \normallineskip=.8\normallineskip
  \normallineskiplimit=.8\normallineskiplimit
  \normalbaselines\rm           %make definitions take effect

  \if 2\ncolumns
    \let\maxcolumn=b
    \footline{\hss\rm\folio\hss}
    \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
  \else \if 3\ncolumns
    \let\maxcolumn=c
    \nopagenumbers
  \else
    \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
    \errmessage{Illegal number of columns per page}
  \fi\fi

  \intercolumnskip=.46in
  \def\abc{a}
  \output={%
      % This next line is useful when designing the layout.
      %\immediate\write16{Column \folio\abc\space starts with \firstmark}
      \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
      \else\if a\abc
        \global\setbox\columna\columnbox \global\def\abc{b}
        %% in case we never use \columnb (two-column mode)
        \global\setbox\columnb\hbox to -\intercolumnskip{}
      \else
        \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
  \def\multicolumnformat{\shipout\vbox{\makeheadline
      \hbox{\box\columna\hskip\intercolumnskip
        \box\columnb\hskip\intercolumnskip\columnbox}
      \makefootline}\advancepageno}
  \def\columnbox{\leftline{\pagebody}}

  \def\bye{\par\vfill\supereject
    \if a\abc \else\null\vfill\eject\fi
    \if a\abc \else\null\vfill\eject\fi
    \end}
\fi

% we won't be using math mode much, so redefine some of the characters
% we might want to talk about
\catcode`\^=12
\catcode`\_=12

\chardef\\=`\\
\chardef\{=`\{
\chardef\}=`\}

\hyphenation{mini-buf-fer}

\parindent 0pt
\parskip .2ex plus .5ex minus .5ex

\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}

\outer\def\newcolumn{\vfill\eject}

\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}

\outer\def\section#1{\par\vskip7pt\filbreak
  {\headingfont #1}\mark{#1}% 
  \par}

\newdimen\keyindent

\def\beginindentedkeys{\keyindent=1em}
\def\endindentedkeys{\keyindent=0em}
\endindentedkeys

\def\paralign{\vskip\parskip\halign}

\def\<#1>{$\langle${\rm #1}$\rangle$}

\def\kbd#1{{\tt#1}\null}        %\null so not an abbrev even if period follows

\def\beginexample{\leavevmode\begingroup
  \obeylines\obeyspaces\parskip0pt}
{\obeyspaces\global\let =\ }
\def\endexample{\endgroup}

\def\key#1#2{\leavevmode\hbox to \hsize{\vtop
  {\hsize=.75\hsize\rightskip=1em
  \hskip\keyindent\relax#1}\kbd{#2}\hfil}}

\newbox\metaxbox
\setbox\metaxbox\hbox{\kbd{M-x }}
\newdimen\metaxwidth
\metaxwidth=\wd\metaxbox

\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
  {\hskip\keyindent\relax#1\hfil}%
  \hskip -\metaxwidth minus 1fil
  \kbd{#2}\hfil}}

\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad
  &\kbd{#3}\quad\cr}

%**end of header
\title{Tk Widget Reference Card}
\centerline{(for version 3.3)}
\beginexample
All widgets have the method:
      {\it widget} configure {\it ?option value ...?}
\endexample
Widgets {\bf frame, label, message} and {\bf toplevel} have
no other methods.
\section{button}
{\it button} activate \par
{\it button} deactivate \par
{\it button} flash \par
{\it button} invoke \par
\section{checkbutton}
{\it checkbutton} activate \par
{\it checkbutton} deactivate \par
{\it checkbutton} deselect \par
{\it checkbutton} flash \par
{\it checkbutton} invoke \par
{\it checkbutton} select \par
{\it checkbutton} toggle \par
\section{entry}
{\it entry} delete {\it first ?last? } \par
{\it entry} get \par
{\it entry} icursor {\it index } \par
{\it entry} index {\it index } \par
{\it entry} insert {\it index string } \par
{\it entry} scan mark { \it x } \par
{\it entry} scan dragto { \it x } \par
{\it entry} select adjust {\it index } \par
{\it entry} select clear \par
{\it entry} select from {\it index } \par
{\it entry} select to {\it index } \par
{\it entry} view {\it index } \par
Indices: {\it number}, end, insert, sel.first, sel.last, @{\it{number}}
\section{listbox}
{\it listbox} curselection \par
{\it listbox} delete {\it first ?last? } \par
{\it listbox} get {\it index } \par
{\it listbox} insert {\it index ?element element ...? } \par
{\it listbox} nearest {\it y } \par
{\it listbox} scan mark {\it x y } \par
{\it listbox} scan dragto {\it x y } \par
{\it listbox} select adjust {\it index } \par
{\it listbox} select clear \par
{\it listbox} select from {\it index } \par
{\it listbox} select to {\it index } \par
{\it listbox} size \par
{\it listbox} xview {\it index } \par
{\it listbox} yview {\it index } \par
\section{canvas}
{\it canvas} addtag {\it tag searchSpec ?arg arg ...? } \par
{\it canvas} bbox {\it tagOrId ?tagOrId tagOrId ...? } \par
{\it canvas} bind {\it tagOrId ?sequence? ?command? } \par
{\it canvas} canvasx {\it screenx ?gridspacing? } \par
{\it canvas} canvasy {\it screeny ?gridspacing? } \par
{\it canvas} coords {\it tagOrId ?x0 y0 ...? } \par
{\it canvas} create {\it type x y ?x y ...? ?option value ...? } \par
{\it canvas} dchars {\it tagOrId first ?last? } \par
{\it canvas} delete {\it ?tagOrId tagOrId ...? } \par
{\it canvas} dtag {\it tagOrId ?tagToDelete? } \par
{\it canvas} find {\it searchCommand ?arg arg ...? } \par
{\it canvas} focus {\it ?tagOrId? } \par
{\it canvas} gettags {\it tagOrId } \par
{\it canvas} icursor {\it tagOrId index } \par
{\it canvas} index {\it tagOrId index } \par
{\it canvas} insert {\it tagOrId beforeThis string } \par
{\it canvas} itemconfigure {\it tagOrId  ?option value ...? } \par
{\it canvas} lower {\it tagOrId ?belowThis? } \par
{\it canvas} move {\it tagOrId xAmount yAmount } \par
{\it canvas} postscript {\it ?option value option value ...? } \par
{\it canvas} raise {\it tagOrId ?aboveThis? } \par
{\it canvas} scale {\it tagOrId xOrigin yOrigin xScale yScale } \par
{\it canvas} scan mark {\it x y } \par
{\it canvas} scan dragto {\it x y } \par
{\it canvas} select adjust {\it tagOrId index } \par
{\it canvas} select clear \par
{\it canvas} select from {\it tagOrId index } \par
{\it canvas} select item \par
{\it canvas} select to {\it tagOrId index } \par
{\it canvas} type {\it tagOrId } \par
{\it canvas} xview {\it index } \par
{\it canvas} yview {\it index } \par
{\it canvas} create arc {\it x1 y1 x2 y2 ?option value ...? } \par
{\it canvas} create bitmap {\it x y ?option value ...? } \par
{\it canvas} create line {\it x1 y1... xn yn ?option value ...? } \par
{\it canvas} create oval {\it x1 y1 x2 y2 ?option value ...? } \par
{\it canvas} create polygon {\it x1 y1 ... xn yn ?option value ...? } \par
{\it canvas} create rectangle {\it x1 y1 x2 y2 ?option value ...? } \par
{\it canvas} create text {\it x y ?option value ...? } \par
{\it canvas} create window {\it x y ?option value ...? } \par
\section{menu}
{\it menu} activate {\it index } \par
{\it menu} add {\it type ?option value ...? } \par
{\it menu} delete {\it index1 ?index2? } \par
{\it menu} disable {\it index } \par
{\it menu} enable {\it index } \par
{\it menu} entryconfigure {\it index ?options? } \par
{\it menu} index {\it index } \par
{\it menu} invoke {\it index } \par
{\it menu} post {\it x y } \par
{\it menu} unpost \par
{\it menu} yposition {\it index } \par
Indices: {\it number}, active, last, none,
 @{\it{number}}, {\it pattern}
\beginexample
Types: cascade, checkbutton, command, radiobutton,
       separator
\endexample
\section{menubutton}
{\it menubutton} activate \par
{\it menubutton} deactivate \par
\section{radiobutton}
{\it radiobutton} activate \par
{\it radiobutton} deactivate \par
{\it radiobutton} deselect \par
{\it radiobutton} flash \par
{\it radiobutton} invoke \par
{\it radiobutton} select \par
\section{scale}
{\it scale} get \par
{\it scale} set {\it value } \par
\section{scrollbar}
{\it scrollbar} get \par
{\it scrollbar} set {\it totalUnits windowUnits firstUnit lastUnit } \par
\section{text}
{\it text} compare {\it index1 op index2 } \par
{\it text} debug {\it ?boolean? } \par
{\it text} delete {\it index1 ?index2? } \par
{\it text} get {\it index1 ?index2? } \par
{\it text} index {\it index } \par
{\it text} insert {\it index chars } \par
{\it text} mark names \par
{\it text} mark set {\it markName index } \par
{\it text} mark unset {\it markName ?markName markName ...? } \par
{\it text} scan mark { \it y } \par
{\it text} scan dragto { \it y } \par
{\it text} tag add {\it tagName index1 ?index2? } \par
{\it text} tag bind {\it tagName ?sequence? ?command? } \par
{\it text} tag  {\it configure  tagName  ?option?  ?value?  ?option } \par
{\it text} tag delete {\it tagName ?tagName ...? } \par
{\it text} tag lower {\it tagName ?belowThis? } \par
{\it text} tag names {\it ?index? } \par
{\it text} tag nextrange {\it tagName index1 ?index2? } \par
{\it text} tag raise {\it tagName ?aboveThis? } \par
{\it text} tag ranges {\it tagName } \par
{\it text} tag remove {\it tagName index1 ?index2? } \par
{\it text} yview {\it ?-pickplace? what } \par
Indices: {\it line.char}, @{\it{x,y}}, end, {\it mark}, {\it tag}.first,
{\it tag}.last
\beginexample
Modifiers: +{\tt |}- {\it count} chars{\tt |}lines, linestart, lineend,
           wordstart, wordend
\endexample
\section{tk\_dialog}
tk\_dialog {\it window title text bitmap default string string...}
\beginexample
Bitmaps: error, gray50, gray25, hourglass, info
            questhead, question, warning
\endexample

\newcolumn

\title{Widget Options}
\section{button}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -activebackground   & -cursor               & -relief               \cr
\+&& -activeforeground   & -disabledforeground   & -state                \cr
\+&& -anchor             & -font                 & -text                 \cr
\+&& -background         & -foreground           & -textvariable         \cr
\+&& -bitmap             & -height               & -width                \cr
\+&& -borderwidth        & -padx                 &                       \cr
\+&& -command            & -pady                 &                       \cr
}

\section{canvas}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -background         & -insertofftime         & -selectborderwidth     \cr
\+&& -borderwidth        & -insertontime          & -selectforeground      \cr    
\+&& -cursor             & -insertwidth           & -width                 \cr     
\+&& -height             & -relief                & -xscrollcommand        \cr 
\+&& -insertbackground   & -selectbackground      & -yscrollcommand        \cr
\+&& -insertborderwidth  &                        &                        \cr
}
{\settabs\+\indent&AAAAAAAA\quad&-disabledforeground\quad&\cr
\+&& -closeenough       & {\it float}           \cr      
\+&& -confine           & {\it boolean}         \cr
\+&& -scrollincrement   & {\it coordinate}      \cr
\+&& -scrollregion      & {\it coordiante\_corners}    \cr
}

\section{checkbutton}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -activebackground & -cursor             & -relief             \cr
\+&& -activeforeground & -disabledforeground & -state              \cr
\+&& -anchor           & -font               & -text               \cr
\+&& -background       & -foreground         & -textvariable       \cr
\+&& -bitmap           & -height             & -variable           \cr
\+&& -borderwidth      & -padx               & -width              \cr
\+&& -command          & -pady               &                     \cr
}
{\settabs\+\indent&AAAAAAAA\quad&-disabledforeground\quad&\cr
\+&& -offvalue           & {\it value}           \cr
\+&& -onvalue            & {\it value}           \cr
\+&& -selector           & {\it color}           \cr
}

\section{entry}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -background         & -insertborderwidth   & -selectbackground   \cr
\+&& -borderwidth        & -insertofftime       & -selectborderwidth  \cr
\+&& -cursor             & -insertontime        & -selectforeground   \cr 
\+&& -exportselection    & -insertwidth         & -state              \cr
\+&& -font               & -relief              & -textvariable       \cr 
\+&& -foreground         & -scrollcommand       & -width              \cr
\+&& -insertbackground   &                      &                     \cr
}

\section{frame}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -background        & -geometry     & -relief       \cr
\+&& -borderwidth       & -height       & -width        \cr
}

\section{label}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -anchor            & -font               & -relief             \cr
\+&& -background        & -foreground         & -text               \cr
\+&& -bitmap            & -height             & -textvariable       \cr
\+&& -borderwidth       & -padx               & -width              \cr
\+&& -cursor            & -pady                &                    \cr
}

\section{listbox}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -background        & -foreground        & -selectforeground \cr
\+&& -borderwidth       & -geometry          & -setgrid          \cr
\+&& -cursor            & -relief            & -xscrollcommand   \cr
\+&& -exportselection   & -selectbackground  & -yscrollcommand   \cr
\+&& -font              & -selectborderwidth &                  \cr
}

\section{menu}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -activebackground  & -background         & -disabledforeground \cr
\+&& -activeborderwidth & -borderwidth        & -font               \cr
\+&& -activeforeground  & -cursor             & -foreground         \cr
}
{\settabs\+\indent&AAAAAAAA\quad&-disabledforeground\quad&\cr        
\+&& -postcommand       & {\it command} \cr
\+&& -selector          & {\it color}   \cr
}

\section{menubutton}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -activebackground  & -cursor             & -pady              \cr
\+&& -activeforeground  & -disabledforeground & -relief            \cr
\+&& -anchor            & -font               & -state             \cr
\+&& -background        & -foreground         & -text              \cr
\+&& -bitmap            & -height             & -textvariable      \cr
\+&& -borderwidth       & -padx               & -width              \cr
}
{\settabs\+\indent&AAAAAAAA\quad&-disabledforeground\quad&\cr
\+&& -menu                      & {\it menuPath}        \cr
\+&& -underline                 & {\it charIndex}       \cr
}

\section{message}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -anchor            & -font               & -relief             \cr
\+&& -background        & -foreground         & -text               \cr
\+&& -borderwidth       & -padx               & -textvariable       \cr
\+&& -cursor            & -pady               & -width               \cr
}
{\settabs\+\indent&AAAAAAAA\quad&-disabledforeground\quad&\cr
\+&& -ascpect           & {\it integer}     \cr
\+&& -justify           & left$|$center$|$right \cr
}

\section{radiobutton}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -activebackground  & -cursor               & -relief               \cr
\+&& -activeforeground  & -disabledforeground   & -state                \cr
\+&& -anchor            & -font                 & -text                 \cr
\+&& -background        & -foreground           & -textvariable         \cr
\+&& -bitmap            & -height               & -value                \cr
\+&& -borderwidth       & -padx                 & -variable             \cr
\+&& -command           & -pady                 & -width                \cr
}
{\settabs\+\indent&AAAAAAAA\quad&-disabledforeground\quad&\cr
\+&& -selector          & {\it color}           \cr
}

\section{scale}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -activeforeground  & -cursor                & -orient                \cr
\+&& -background        & -font                  & -relief                \cr
\+&& -borderwidth       & -foreground            & -state                 \cr
\+&& -command           & -length                & -width                 \cr
}
{\settabs\+\indent&AAAAAAAA\quad&-disabledforeground\quad&\cr
\+&& -from              & {\it integer} \cr
\+&& -label             & {\it string}  \cr
\+&& -showvalue            & {\it boolean}         \cr
\+&& -sliderforeground     & {\it boolean}         \cr
\+&& -sliderlength         & {\it pixels}          \cr
\+&& -tickinterval         & {\it integer}         \cr
\+&& -to                   & {\it integer}         \cr
}

\section{scrollbar}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -activeforeground  & -cursor       & -repeatdelay          \cr
\+&& -background        & -foreground   & -repeatinterval       \cr
\+&& -borderwidth       & -orient       & -width                \cr
\+&& -command           & -relief       &                       \cr
}

\section{text}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -background      & -insertborderwidth  & -selectborderwidth   \cr   
\+&& -borderwidth     & -insertofftime      & -selectforeground    \cr   
\+&& -cursor          & -insertontime       & -setgrid             \cr   
\+&& -exportselection & -insertwidth        & -state               \cr   
\+&& -font            & -padx               & -textvariable        \cr   
\+&& -foreground      & -pady               & -width               \cr   
\+&& -height          & -relief             & -yscrollcommand      \cr   
\+&& -insertbackground& -selectbackground   &                      \cr
}
{\settabs\+\indent&AAAAAAAA\quad&-disabledforeground\quad&\cr
\+&& -wrap               & none$|$char$|$word        \cr   
}

\section{toplevel}
{\settabs\+\indent&\quad&-disabledforeground\quad&-disabledforeground\quad&\cr
\+&& -background        & -geometry             & -relief       \cr
\+&& -borderwidth       &                       &               \cr
}

\vskip10pt
\title{Standard Options}
{\settabs\+\indent&\quad&-disabledforeground\quad&\cr
\+&&-activebackground   & {\it color}           \cr
\+&&-activeborderwidth  & {\it pixelWidth}      \cr
\+&&-activeforeground   & {\it color}           \cr 
\+&&-anchor             & n$|$ne$|$e$|$se$|$s$|$sw$|$w$|$nw$|$center \cr
\+&&-background or -bg  & {\it color}           \cr
\+&&-bitmap             & {\it bitmap}          \cr
\+&&-borderwidth or -bd & {\it pixelWidth}      \cr
\+&&-command            & {\it tclCommand}      \cr
\+&&-cursor             & {\it cursor}          \cr
\+&&-disabledforeground & {\it color}           \cr
\+&&-exportselection    & {\it boolean}         \cr
\+&&-font               & {\it font}            \cr
\+&&-foreground or -fg  & {\it color}           \cr
\+&&-geometry           & {\it width}x{\it height} \cr
\+&&-height             & {\it pixelWidth} or {\it textLines}   \cr
\+&&-insertbackground   & {\it color}           \cr
\+&&-insertborderwidth  & {\it pixelWidth}      \cr
\+&&-insertofftime      & {\it milliseconds}    \cr
\+&&-insertontime       & {\it milliseconds}    \cr
\+&&-insertwidth        & {\it pixelWidth}      \cr
\+&&-orient             & horizontal$|$vertical \cr
\+&&-padx               & {\it pixelWidth}      \cr
\+&&-pady               & {\it pixelWidth}      \cr
\+&&-relief             & flat$|$groove$|$raised$|$ridge$|$sunken \cr
\+&&-repeatdelay        & {\it milliseconds}    \cr
\+&&-repeatinterval     & {\it milliseconds}    \cr
\+&&-scrollcommand      & {\it cmdPrefix}       \cr
\+&&-selectbackground   & {\it color}           \cr
\+&&-selectborderwidth  & {\it pixelWidth}      \cr
\+&&-selectforeground   & {\it color}           \cr
\+&&-setgrid            & {\it boolean}         \cr
\+&&-state              & normal$|$disabled ( $|$active {\it for buttons} ) \cr
\+&&-text               & {\it string}          \cr
\+&&-textvariable       & {\it variable}        \cr
\+&&-variable           & {\it variable}        \cr
\+&&-width              & {\it pixelWidth} or {\it textChars} \cr
\+&&-xscrollcommand     & {\it cmdPrefix}       \cr
\+&&-yscrollcommand     & {\it cmdPrefix}       \cr
}

\newcolumn
\title{Tk Misc Reference Card}
\centerline{(for version 3.3)}

\section{Window Information}
winfo atom {\it name } \par
winfo atomname {\it id } \par
winfo cells {\it window } \par
winfo children {\it window } \par
winfo class {\it window } \par
winfo containing {\it rootX rootY } \par
winfo depth {\it window } \par
winfo exists {\it window } \par
winfo fpixels {\it window number } \par
winfo geometry {\it window } \par
winfo height {\it window } \par
winfo id {\it window } \par
winfo interps \par
winfo ismapped {\it window } \par
winfo name {\it window } \par
winfo parent {\it window } \par
winfo pathname {\it id } \par
winfo pixels {\it window number } \par
winfo reqheight {\it window } \par
winfo reqwidth {\it window } \par
winfo rgb {\it window color } \par
winfo rootx {\it window } \par
winfo rooty {\it window } \par
winfo screen {\it window } \par
winfo screencells {\it window } \par
winfo screendepth {\it window } \par
winfo screenheight {\it window } \par
winfo screenmmheight {\it window } \par
winfo screenmmwidth {\it window } \par
winfo screenvisual {\it window } \par
winfo screenwidth {\it window } \par
winfo toplevel {\it window } \par
winfo visual {\it window } \par
winfo vrootheight {\it window } \par
winfo vrootwidth {\it window } \par
winfo vrootx {\it window } \par
winfo vrooty {\it window } \par
winfo width {\it window } \par
winfo x {\it window } \par
winfo y {\it window } \par

\newcolumn
\section{Binding}
bind {\it windowSpec} \par
bind {\it windowSpec} $<${\it{modifier-modifier-type-detail}}$>$ \par
bind {\it windowSpec} $<${\it{modifier-modifier-type-detail}}$>$ {\it command} \par
bind {\it windowSpec} $<${\it{modifier-modifier-type-detail}}$>$ +{\it{command}} \par

Modifiers:\par
{\settabs\+\indent&\quad&Button5, B5\quad\quad&\cr
\+&&Control                 &Any\cr
\+&&Shift                   &Double\cr
\+&&Lock                    &Triple\cr
\+&&Button1, B1             &Mod1, M1, Meta, M\cr
\+&&Button2, B2             &Mod2, M2, Alt\cr
\+&&Button3, B3             &Mod3, M3\cr
\+&&Button4, B4             &Mod4, M4\cr
\+&&Button5, B5             &Mod5, M5\cr
}
Type:\par
{\settabs\+\indent&\quad&ButtonPress, Button\quad&KeyPress, Key\quad&\cr
\+&&ButtonPress, Button &Expose             &Leave\cr
\+&&ButtonRelease       &FocusIn            &Map\cr
\+&&Circulate           &FocusOut           &Property\cr
\+&&CirculateRequest    &Gravity            &Reparent\cr
\+&&Colormap            &Keymap             &ResizeRequest\cr
\+&&Configure           &KeyPress, Key      &Unmap\cr
\+&&ConfigureRequest    &KeyRelease         &Visibility\cr
\+&&Destroy             &MapRequest\cr
\+&&Enter               &Motion\cr
}
{\settabs\+\indent&Detail:\quad&\cr
\+&Detail:&for buttons a number 1-5\cr
\+&&or keys a keysym (/usr/include/X11/keysymdef)\cr
}
Codes:\par
{\settabs\+\indent&\quad&\%p\quad&{\it override\_redirect} field\quad&\%N\quad&\cr
\+&& \%\% & single \% sign & \%w & {\it width} field \cr
\+&& \%a & {\it above} field & \%x & {\it x} field \cr
\+&& \%b & button number & \%y & {\it y} field \cr
\+&& \%c & {\it count} field & \%A & ASCII character \cr
\+&& \%d & {\it detail} field &\%B & {\it border\_width} field \cr
\+&& \%f & {\it focus} field & \%D & {\it display} field \cr
\+&& \%h & {\it height} field & \%E & {\it send\_event} field \cr
\+&& \%k & {\it keycode} field & \%K & keysym as text \cr
\+&& \%m & {\it mode} field & \%N & keysym as decimal \cr
\+&& \%o & {\it override\_redirect} field & \%R & {\it root} window \cr
\+&& \%p & {\it place} field & \%S & {\it sub\_window} identifier \cr
\+&& \%s & {\it state} field & \%T & {\it type} field \cr
\+&& \%t & {\it time} field &  \%W & window pathname \cr
\+&& \%v & {\it value\_mask} field & \%X & {\it x\_root} field \cr
\+&& & & \%Y & {\it y\_root} field \cr
}
Examples:\par
\beginexample
  bind .mywin $<$Meta-Key-i$>$ ``wm withdraw \%W''
  bind .mywin $<$Shift-Control-Key-S$>$ ``searchtxt \%W''
  bind Text $<$B1-Motion$>$ ``bind\_textB1motion \%W @\%x,\%y''
\endexample

\newcolumn
\section{Other Tk Commands}
after {\it ms ?arg1 arg2 arg3 ...?} \par
destroy {\it ?window window ...?} \par
focus \par
focus {\it window} \par
focus default {\it ?window?} \par
focus none \par
grab ?-global? {\it window} \par
grab current {\it ?window?} \par
grab release {\it window} \par
grab set ?-global? {\it window} \par
grab status {\it window} \par
lower {\it window ?belowThis?} \par
option add {\it pattern value ?priority?} \par
option clear \par
option get {\it window name class} \par
option readfile {\it fileName ?priority?} \par
raise {\it window ?aboveThis?} \par
selection clear {\it window} \par
selection get {\it ?type?} \par
selection handle {\it window command ?type? ?format?} \par
selection own {\it ?window? ?command?} \par
send {\it interp cmd ?arg arg ...?} \par
tk colormodel {\it window ?newValue?} \par
tkwait variable {\it name} \par
tkwait visibility {\it name} \par
tkwait window {\it name} \par
tk\_bindForTraversal {\it arg arg ...} \par
tk\_listboxSingleSelect {\it listbox ?listbox ...?} \par
tk\_listboxSingleSelect Listbox \par
tk\_menuBar {\it frame ?menu menu ...?} \par
update ?idletasks? \par

\newcolumn
\title{Widget Method Options}
\section{canvas searchSpec}
{ \settabs\+\indent&-colormode color{\tt |}grey{\tt |}mono\quad&\cr
\+&above {\it tagGrid} & enclosed {\it x1 y1 x2 y2 } \cr
\+&all & overlapping{\it  x1 y1 x2 y2 } \cr
\+&below {\it tagGrid} & withtag {\it tagOrId} \cr
\+&closest {\it x y ?halo? ?start?} \cr
}

\section{canvas postscript options}
{ \settabs\+\indent&-colormode color{\tt |}grey{\tt |}mono\quad&\cr
\+&-colormap {\it varName} & -pagewidth {\it size} \cr
\+&-colormode color{\tt |}grey{\tt |}mono & -pagex {\it position} \cr
\+&-file {\it fileName} & -pagey {\it position} \cr
\+&-fontmap {\it varName} & -rotate {\it boolean} \cr
\+&-height {\it size} & -width {\it size} \cr
\+&-pageanchor {\it anchor} & -x {\it postion} \cr
\+&-pageheight {\it size} & -y {\it postion} \cr
}

\section{canvas arc options}
{ \settabs\+\indent&-capstyle butt{\tt |}projecting{\tt |}round\quad&\cr
\+&-extent {\it degrees} & -stipple {\it bitmap} \cr
\+&-fill {\it color} & -style pieslice{\tt |}chord{\tt |}arc \cr
\+&-outline {\it color} & -tags {\it tagList} \cr
\+&-start {\it degrees} & -width {\it outlineWidth} \cr
}

\section{canvas bitmap options}
{ \settabs\+\indent&-capstyle butt{\tt |}projecting{\tt |}round\quad&\cr
\+&-anchor {\it anchorPos} & -foreground {\it color} \cr
\+&-background {\it color} & -tags {\it tagList} \cr
\+&-bitmap {\it bitmap} \cr
}

\section{canvas line options}
{ \settabs\+\indent&-capstyle butt{\tt |}projecting{\tt |}round\quad&\cr
\+&-arrow {\it where}&-smooth {\it boolean}\cr
\+&-arrowshape {\it shape}&-splinesteps {\it number}\cr
\+&-capstyle butt{\tt |}projecting{\tt |}round&-stipple {\it bitmap}\cr
\+&-fill {\it color}&-tags {\it tagList}\cr
\+&-joinstyle bevel{\tt |}miter{\tt |}round&-width {\it lineWidth}\cr
}

\section{canvas oval options}
{ \settabs\+\indent&-capstyle butt{\tt |}projecting{\tt |}round\quad&\cr
\+&-fill {\it color}&-tags {\it tagList}\cr
\+&-outline {\it color}&-width {\it outlineWidth}\cr
\+&-stipple {\it bitmap}\cr
}

\section{canvas polygon options}
{ \settabs\+\indent&-capstyle butt{\tt |}projecting{\tt |}round\quad&\cr
\+&-fill {\it color}&-stipple {\it bitmap}\cr
\+&-smooth {\it boolean}&-tags {\it tagList}\cr
\+&-splinesteps {\it number}\cr
}

\section{canvas rectange options}
{ \settabs\+\indent&-capstyle butt{\tt |}projecting{\tt |}round\quad&\cr
\+&-fill {\it color}&-tags {\it tagList}\cr
\+&-outline {\it color}&-width {\it outlineWidth}\cr
\+&-stipple {\it bitmap}\cr
}

\section{canvas text options}
{ \settabs\+\indent&-capstyle butt{\tt |}projecting{\tt |}round\quad&\cr
\+&-anchor {\it anchorPos}&-stipple {\it bitmap}\cr
\+&-fill {\it color}&-tags {\it tagList}\cr
\+&-font {\it fontName}&-text {\it string}\cr
\+&-justify left{\tt |}right{\tt |}center&-width {\it lineLength}\cr
}

\section{canvas window options}
{ \settabs\+\indent&-capstyle butt{\tt |}projecting{\tt |}round\quad&\cr
\+&-anchor {\it anchorPos}&-width {\it pixels}\cr
\+&-height {\it pixels}&-window {\it pathName}\cr
\+&-tags {\it tagList}\cr
}

\section{menu add options}
{ \settabs\+\indent&-activebackground {\it color}\quad&\cr
\+&-activebackground {\it color}&-menu {\it menu}\cr
\+&-accelerator {\it string}&-offvalue {\it value}\cr
\+&-background {\it color}&-onvalue {\it value}\cr
\+&-bitmap {\it bitmap}&-state normal{\tt |}active{\tt |}disabled\cr
\+&-command {\it cmd}&-underline {\it charIndex}\cr
\+&-font {\it font}&-value {\it value}\cr
\+&-label {\it string}&-variable {\it variable}\cr
}

\section{text tag options}
{ \settabs\+\indent&-activebackground {\it color}\quad&\cr
\+&-background {\it color}&-font {\it font}\cr
\+&-bgstipple {\it bitmap}&-foreground {\it color}\cr
\+&-borderwidth {\it pixels}&-relief {\it relief}\cr
\+&-fgstipple {\it bitmap}&-underline {\it boolean}\cr
}

\vskip15pt
\title{Window Manager}
wm aspect {\it window ?minNumer minDenom maxNumer maxDenom? } \par
wm client {\it window ?name? } \par
wm command {\it window ?value? } \par
wm deiconify {\it window } \par
wm focusmodel {\it window ?active|passive? } \par
wm geometry {\it window ?newGeometry? } \par
wm grid {\it window ?baseWidth baseHeight widthInc heightInc? } \par
wm group {\it window ?{\it pathName}? } \par
wm iconbitmap {\it window ?bitmap? } \par
wm iconify {\it window } \par
wm iconmask {\it window ?bitmap? } \par
wm iconname {\it window ?newName? } \par
wm iconposition {\it window ?x y? } \par
wm iconwindow {\it window ?pathName? } \par
wm maxsize {\it window ?width height? } \par
wm minsize {\it window ?width height? } \par
wm overrideredirect {\it window ?boolean? } \par
wm positionfrom {\it window ?who? } \par
wm protocol {\it window ?name? ?command? } \par
wm sizefrom {\it window ?who? } \par
wm title {\it window ?string? } \par
wm transient {\it window ?master? } \par
wm withdraw {\it window } \par

\newcolumn
\title{Geometry Management}
\section{packing (old)}
pack after {\it sibling window options ?window options ...?} \par
pack append {\it parent window options ?window options ...?} \par
pack before {\it sibling window options ?window options ...?} \par
pack info {\it parent} \par
pack unpack {\it window} \par
{\settabs\+\indent&{\it padding}:\quad&\cr
\+&Options:& {\it edge padding filling} frame {\it anchor}\cr
\+&{\it edge}:&top, bottom, left, right\cr
\+&{\it padding}:& padx {\it num}, pady {\it num}, expand\cr
\+&{\it filling}:& fill, fillx, filly\cr
\+&{\it anchor}:& center, n, ne, e, se, sw, w, nw\cr
}

\section{packing (new)}
pack {\it slave ?slave ...? ?options?} \par
pack configure {\it slave ?slave ...? ?options?} \par
pack forget {\it slave ?slave ...?} \par
pack newinfo {\it slave} \par
pack propagate {\it master ?boolean?} \par
pack slaves {\it master} \par
{\settabs\+\indent& -expand {\it boolean}\quad&\cr
\+&Options:& {\it for} pack configure \cr
\+&-after {\it other}& -ipady {\it amount}\cr
\+&-anchor {\it anchor}& -padx {\it amount}\cr
\+&-before {\it other}& -pady {\it amount}\cr
\+&-expand {\it boolean}& -side {\it edge}\cr
\+&-fill {\it style}& \cr
\+&-in {\it other}& \cr
}
Fill styles: none, x, y, boht

\section{placing}
place window {\it option value ?option value ...?} \par
place configure {\it window option value ?option value ...?} \par
place forget {\it window} \par
place info {\it window} \par
place slaves {\it window} \par
{ \settabs\+\indent&-bordermode inside{\tt |}outside{\tt |}ignore\quad&\cr
\+&Options:& \cr
\+&-in {\it master}&-width {\it size}\cr
\+&-x {\it location}&-relwidth {\it size}\cr
\+&-relx {\it location}&-relwidth {\it size}\cr
\+&-y {\it location}&-height {\it size}\cr
\+&-rely {\it location}&-relheight {\it size}\cr
\+&-bordermode inside{\tt |}outside{\tt |}ignore&-anchor {\it where}\cr
}


\bye

% Local Variables: 
% mode: latex
% TeX-master: t
% End: 
