\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#71: Tk Bitmap Image Improvements}
\date{October 26, 2001}
\author{Chris Nelson, Kevin Kenny, Eric Melski, Donal K. Fellows}
\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 \#71}&\textbf{Tk Bitmap Image Improvements}\\\hline
Author&

Chris Nelson \tipmail{chris}{pinebush.com}
\par
Kevin Kenny \tipmail{kennykb}{acm.org}
\par
Eric Melski \tipmail{ericm}{interwoven.com}
\par
Donal K. Fellows \tipmail{donal.k.fellows}{man.ac.uk}
\\
Created&Friday, \(\text{26}^{\text{th}}\) October 2001\\
Type&Project\\
Tcl Version&\(8.5\)\\
State&Withdrawn\\
Vote&Pending\\
Version&\tipversion$Revision: 1.14 $\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

Tk has a number of pre-defined bitmaps (10 on all platforms) but it lacks a number of bitmaps useful for creating GUI elements. This TIP adds several such bitmaps (as bitmap images).
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{New Bitmaps}

Many complex widgets like comboboxes, spinboxes, etc. require arrows pictures on buttons. While newer releases of Tk have added more widgets, there will always be some unforeseen need for new or customized widgets. One example is a menubutton which, according to the Microsoft Windows User Experience [\url{http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/welcome.asp}], should have a downward arrow on the right side. With compound buttons, it is not hard to do:
\begingroup\small\begin{verbatim}
   button .mb -text Tools -image downarrow -compound right
\end{verbatim}
\endgroup

but there is no stock down-arrow image. 

I propose to add 12 bitmap images providing all four directions (up, down, left, and right) in three sizes (3x2, 5x3, and 7x4) in black. The down arrows would look something like:
\begingroup\small\begin{verbatim}
   @@@@@@@   @@@@@      @@@
   .@@@@@.   .@@@.      .@.
   ..@@@..   ..@..    
   ...@...
\end{verbatim}
\endgroup

I propose the following names:
\begingroup\small\begin{verbatim}
   arrow_u7x4      arrow_u5x3      arrow_u3x2
   arrow_d7x4      arrow_d5x3      arrow_d3x2
   arrow_l7x4      arrow_l5x3      arrow_l3x2
   arrow_r7x4      arrow_r5x3      arrow_r3x2
\end{verbatim}
\endgroup

I'm mindful of the fact that adding new predefined bitmap images has the potential to collide with application-defined images or other commands but I'm unsure of the workaround for that.

\section{Reference Implementation}

SourceForge patch 475332 provided a reference implementation of a previous version of this proposal [\url{http://sf.net/tracker/?func=detail&aid=475332&group_id=12997&atid=312997}]. This version is not implemented yet.

\section{Commentary}

\textit{Donal K. Fellows \tipmail{donal.k.fellows}{man.ac.uk} writes:}

\begin{quote}
Previous versions of this TIP proposed fixing the problem using bitmaps instead of bitmap images and added an infrastructure for tracking those bitmaps. Since I think that ultimately we should be getting rid of bitmaps and instead using something based on the image infrastructure (which already has proper introspection support) those parts of this TIP have been removed. However, making the changes to effect the switch to using bitmap images instead of bitmaps for things like stippes, cursors, etc. lies outside the scope of this TIP.
\end{quote}

\textit{Donal K. Fellows \tipmail{donal.k.fellows}{man.ac.uk} writes:}

\begin{quote}
In the long period since this TIP was proposed, the world of GUIs has moved on somewhat. Although the requirement for arrows remains the same, the solutions proposed in this TIP (both originally and as it now stands) do not permit the sort of graphical snazziness that modern users tend to expect. Nor is there a sufficient range of sizes for a reasonable selection to be available for a modern display; even the largest of those arrows would look unusably tiny on my desktop! This indicates that a completely different solution is required, which in turn would be better stated as a separate TIP.
\end{quote}

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\end{document}
