%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PULLDOWN.TEX                                             (C) Ulf Bartelt %
%==========================================================================%
% Copyright-Technisches:                                                   %
% ----------------------                                                   %
% - 'Rahmen' stammt aus 'Einf�hrung in TeX' von N.Schwarz.                 %
% - Wo keine anderslautenden Copyrights vermerkt sind, handelt es sich um  %
%   Kramzeugs aus meiner Schreibe.                                         %
%   Dieser darf von jedermann benutzt werden, sofern diese Kommentarbox    %
%   ebenfalls in die TeX-Quelle aufgenommen wird.                          %
%   Meine Adressen:   Ulf Bartelt                                          %
%                     FIDO: Ulf Bartelt on 2:240/420.1                     %
%                     EARN: STUB@DCZTU1                                    %
% - Leichte Ab"anderung von mir (Jens Pirnay), dass die Zeichen f"ur CTRL  %
%   und ALTERNATEjetzt die gleiche Breite (= Breite eines normalen \tt-    %
%   Zeichens) haben.                                                       %
%==========================================================================%
% Makros:                                                                  %
% -------                                                                  %
% \Rahmen{abstand}{dicke}{inhalt}                                          %
% \ctl{char}                                                               %
% \alt{char}                                                               %
% \menu                                                                    %
% \title{name}                                                             %
% \entry{name}                                                             %
% \endmenu                                                                 %
%                                                                          %
% Beispiel:       (etwas grob, da in ASCII-Zeichen...)                     %
% ---------                                                                %
% Die Befehlsfolge ('~' ist Tilde, dies schreib ich hier, falls die DfUe   %
%                   es zerschie�en sollte...)                              %
%    \menu                                                                 %
%        \title{Desk}                                                      %
%        \title{File}                                                      %
%           \entry{~~Open~~~~~~~\ctl{O}}                                   %
%           \entry{~~Close~~~~~~\ctl{C}}                                   %
%           \entry{----------------}                                       %
%           \entry{~~Save as...~\ctl{S}}                                   %
%           \entry{----------------}                                       %
%           \entry{~~Quit~~~~~~~\alt{Q}}                                   %
%           \entry{----------------}                                       %
%        \title{Printer}                                                   %
%        \title{Modem}                                                     %
%        \title{~~~~~~~~~~}% f�r Luft hinter 'Modem'...                    %
%     \endmenu                                                             %
%                                                                          %
% setzt (etwa) folgendes Bildchen:                                         %
%                                                                          %
%    +------------------------------------------+                          %
%    |   Desk  File  Printer  Modem             |                          %
%    +-------+----------------+-----------------+                          %
%            |  Open       ^O |                                            %
%            |  Close      ^C |                                            %
%            |----------------|                                            %
%            |  Save as... ^S |                                            %
%            |----------------|                                            %
%            |  Quit       #Q |                                            %
%            +----------------+                                            %
%                                                                          %
% Anmerkung: '#' steht hier f�r ALTERNATE, '^' f�r CONTROL...              %
%            '#' wird im geTeXten TeXt durch ein Karo dargestellt...       %
%==========================================================================%
% History:                                                                 %
% --------                                                                 %
% 900521 - Ans�tze in PLAIN-TeX in nettere Makros verpackt...              %
% 900523 - Verfeinerungen & bessere Kommentare...                          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\def\Rahmen#1#2#3{%
   \vbox{%
      \hrule height#2\hbox{%
         \vrule width#2%
         \hskip#1%
         \vbox{%
            \vskip#1{}%
            #3%
            \vskip#1%
            }%
         \hskip#1%
         \vrule width#2%
         }%
      \hrule height#2%
      }%
   }%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\ctl#1{\setbox0=\hbox{\tt J}%  JP
           \hbox to\wd0{\hss$\hat{~}$\hss}{\tt#1}}
\def\alt#1{\setbox0=\hbox{\tt J}%
           \hbox to\wd0{\hss$\diamondsuit$\hss}{\tt#1}}
% Original:
%\def\ctl#1{$\hat{~}${\tt#1}}
%\def\alt#1{$\diamondsuit${\tt#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newbox\titlebox%
\newbox\entrybox%
\newdimen\titlestart%
\newdimen\entryindent%
\def\menu{%
   \bgroup%
   \tt\offinterlineskip%
   \setbox\titlebox=\hbox{\strut~~}%
   \setbox\entrybox=\vbox{}%
   \def\title##1{%
      \titlestart=\wd\titlebox%
      \setbox\titlebox=\hbox{\unhbox\titlebox~##1~}%
      }%
   \def\entry##1{%
      \entryindent=\titlestart%
      \setbox\entrybox=\vbox{\unvbox\entrybox\hbox{\strut##1}}%
      }%
   }%
%
\def\endmenu{%
   \vbox{%
      \Rahmen{1pt}{.2pt}{\box\titlebox}%
      \nobreak%
      \hbox{%
         \hskip\entryindent%
         \Rahmen{1pt}{.2pt}{\box\entrybox}%
      }%
   }%
   \egroup%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% END OF PULLDOWN.TEX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

