\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#63: Add -compound Option to Menu Entries}
\date{September 27, 2001}
\author{Vince Darley}
\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 \#63}&\textbf{Add -compound Option to Menu Entries}\\\hline
Author&

Vince Darley \tipmail{vincentdarley}{users.sourceforge.net}
\\
Created&Thursday, \(\text{27}^{\text{th}}\) September 2001\\
Type&Project\\
Tcl Version&\(8.4\)\\
State&Final\\
Vote&Done\\
Version&\tipversion$Revision: 1.5 $\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

This TIP adds to menu entries the ability to display both textual labels and images (or bitmaps) in exactly the same way as buttons and menubuttons currently can, by adding a \textit{-compound} option.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

Menu entries are very similar to labels in most respects, but they currently lack the ability to show an image and a piece of text at the same time. It is a useful piece of functionality currently missing from Tk (certainly many standard applications make use of such menu entries, e.g. Internet Explorer). The changes involved are relatively small.

A very similar TIP \cite{tip11} was accepted without much argument.

\section{Proposal}

This TIP implements the change by adding an additional option \textit{-compound} to menu entries which behaves identically to Tk's existing \textit{-compound} option: it accepts the values \textit{none}, \textit{center}, \textit{left}, \textit{right}, \textit{top}, and \textit{bottom}, and controls the relative placement of an image to the text label in the entry.

A reference implementation exists, and is available from: \url{ftp://ftp.ucsd.edu/pub/alpha/tcl/compoundmenu.diff} (note this diff has Windows-style line endings). This implementation is known to work on Windows and Unix, and since the changes are very, very similar on MacOS I expect it to work there (except perhaps for simple editing mistakes).

\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 \#11]{tip11}
Todd Helfter,
\emph{Tk Menubutton Enhancement: -compound option for menubutton},
on-line at \url{http://purl.org/tcl/tip/11.html}
\end{thebibliography}
\end{document}
