\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#110: Add a Tristate Mode to the Checkbutton and Radiobutton}
\date{October 01, 2002}
\author{Brian Griffin}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#110}&\textbf{Add a Tristate Mode to the Checkbutton and Radiobutton}\\\hline
Author&

Brian Griffin \tipmail{bgriffin}{model.com}
\\
Created&Tuesday, \(\text{1}^{\text{st}}\) October 2002\\
Type&Project\\
Tcl Version&\(8.5\)\\
State&Final\\
Vote&Done\\
Version&\tipversion$Revision: 1.12 $\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

This TIP proposes adding a third value (tristate) to the checkbutton and radiobutton widgets and corresponding display.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

In order to meet more demanding requirements of todays complex graphical user interfaces, it would help add to the functionality of the basic checkbutton and radiobutton widgets. To support using checkbuttons and radiobuttons along with multiple selection, it is necessary for these buttons to be able to display a third state, i.e., both On and Off. This indicates the situation where a property has a particular value for some members of a selection set, but not others.

\section{Proposed Change}

The change would add a third ``tristate'' value to current On Off values of the checkbutton and radiobutton widgets. The widget would then display the check/dot mark (as appropriate) along with a ``grayed'' background, for example. When the checkbutton or radiobutton is invoked (i.e. clicked on) it would behave exactly as it does currently, setting the variable to the On value.

There is a concern that the Unix version of these widgets do not have a sufficiently different appearance when in the tristate state compared with the On and Off states. This issue is addressed in \cite{tip109}.

\section{Propsal Specifics}
\begin{enumerate}
\item{}
Identify a third, platform specific, presentation (e.g. check with grayed background) to represent the tristate value,
\item{}
Add the option ``-tristatevalue'' to specify the match value only. The default value of this option will be ``\{\}'',
\item{}
Change the behavior to display the indeterminate or tristate presentation when the associated variable's value matches the -tristatevalue, and
\item{}
Add the option ``-tristateimage'' to specify an image to display (in place of the image option) when the checkbutton or radiobutton has the tristate value (as defined above.)
\end{enumerate}

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\begin{thebibliography}{TIP \#1}
\addcontentsline{toc}{section}{References}
\bibitem[TIP \#109]{tip109}
Brian Griffin,
\emph{New Look for Checkbutton and Radiobutton on Unix},
on-line at \url{http://purl.org/tcl/tip/109.html}
\end{thebibliography}
\end{document}
