%==============================================================================
% Prosper -- (PPRgyom.sty) Style file
% A LaTeX class for creating slides
% Author: Thomas Deselaers, RWTH, Aachen
% 
% Copyright (c) 2002 Thomas Deselaers
% All rights reserved.
% 
% Permission is hereby granted, without written agreement and without
% license or royalty fees, to use, copy, modify, and distribute this
% software and its documentation for any purpose, provided that the
% above copyright notice and the following two paragraphs appear in
% all copies of this software.
% 
% IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, 
% SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF 
% THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED 
% OF THE POSSIBILITY OF SUCH DAMAGE.
% 
% THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES,
% INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
% AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
% ON AN "AS IS" BASIS, AND THE AUTHOR HAS NO OBLIGATION TO
% PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
%
% CVSId : $Id: PPRthomasd.sty,v 1.1 2003/01/27 14:39:20 exupery Exp $
%==============================================================================
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{PPRthomasd}
\typeout{`thomasds personal style for Prosper  ---}
\typeout{(c) 2001 Thomas Deselaers, RWTH, Aachen}
\typeout{CVSId: $Id: PPRthomasd.sty,v 1.1 2003/01/27 14:39:20 exupery Exp $}
\typeout{ }

\RequirePackage{amssymb}
\RequirePackage{fp}
\RequirePackage{ifthen}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcounter{mylastpage}
\makeatletter
\newcommand\@getsecondargument{}% LaTeX-check if already defined
\long\def\@getsecondarg#1#2#3\@nil{#2}
                                % \setreftocounter{refname}{countername}
\newcommand*{\setreftocounter}[1]{%
  \expandafter\@setreftocounter\csname r@#1\endcsname{#1}%
  }
\newcommand*{\@setreftocounter}[3]{%
  \ifx#1\relax
  \protect\G@refundefinedtrue % LaTeX: rerun warning
  \@latex@warning{Reference `#2' on page \thepage\space
    undefined}%
  \setcounter{#3}{0}%
  \else
    \setcounter{#3}{0\expandafter\@getsecondarg#1\@nil}%
    \fi
    }
  \makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Loading packages necessary to define this slide style.
\IfFileExists{pst-grad}{\RequirePackage{pst-grad}}{\RequirePackage{gradient}}

\newgray{mygray}{.5}
\newrgbcolor{titlecolor}{.29 .36 .75}
\newrgbcolor{gruen}{.04 .64 .19}
\newrgbcolor{highlighted}{.76 .15 .15}
\newrgbcolor{textcolor}{.0 .0 .0}

\FontTitle{%
  \usefont{T1}{phv}{b}{n}\fontsize{20pt}{18pt}\selectfont\titlecolor}{%
  \usefont{T1}{phv}{b}{n}\fontsize{20pt}{18pt}\selectfont\black}
\FontText{%
  \textcolor\usefont{T1}{phv}{m}{n}\fontsize{14.4pt}{14pt}\selectfont}{%
  \black\usefont{T1}{phv}{m}{n}\fontsize{14.4pt}{14pt}\selectfont}

\ColorFoot{\black}
% Positionning of the title of a slide.
\newcommand{\slidetitle}[1]{%
  \rput[c](4.8,4.3){\fontTitle{#1}}
}

% Positionning for a logo
\LogoPosition{-2.0,-1.2}

% Definition of this style for slides.

\newcommand{\TPFrame}[1] {%
% Der Rahmen um die Überschrift
\def\Fleft{-0.5}
\def\Fright{11.9}
\def\Fupper{8.5}
\def\Flower{7.4}
\psline[linewidth=3pt](\Fleft,\Flower)(\Fright,\Flower)(\Fright,\Fupper)(\Fleft,\Fupper)(\Fleft,\Flower)

% Der Rahmen um den Fortschrittsbalken
\def\PGBFleft{-1.1}
\def\PGBFlower{-1.1}
\def\PGBFupper{-0.9}
\def\PGBFright{9.6}
\psline[linewidth=0.5pt](\PGBFleft,\PGBFupper)(\PGBFright,\PGBFupper)(\PGBFright,\PGBFlower)(\PGBFleft,\PGBFlower)(\PGBFleft,\PGBFupper)

% Der Balken im Fortschrittsbalkenrahmen
\FPeval{PGBypos}{ ( \PGBFlower + \PGBFupper ) / 2 }
%\def\PGBleft{\PGBFleft}
\def\PGBoffset{-0.8}
\FPeval{PGBleft}{(\PGBoffset + \PGBFleft) }
\FPeval{PGBlhs}{(-0.2 + \PGBFleft)} 
%rechte Seite des Fortschrittsbalkens berechnen
\setreftocounter{last@page}{mylastpage} %% Get the \themylastpage-Counter-Thing
\ifthenelse{\themylastpage=0}{\def\themylastpage{20}}{} %% Inhibit Division by zero
%\FPeval{result}{ ( \PGBFright - 0.2 - \PGBFleft) / \themylastpage *
%\thepage - \PGBFleft} %% Calculate Right Side of progressbar
\FPeval{result}{(( \thepage / \themylastpage ) * ( \PGBFright - \PGBFleft )) + \PGBlhs + \PGBoffset}
\typeout{Debug: \PGBFleft § \PGBleft § \thepage § \result § \themylastpage}
%

\psline[linecolor=highlighted,linewidth=3pt](\PGBleft,\PGBypos)(\result ,\PGBypos)
\PutLogo % Mandatory
{#1}}

%% vorderezahl  größer -> rechts
%% hinterezahl  größer -> höher ?
\NewSlideStyle{t}{4.5,3.2}{TPFrame}
\PDFCroppingBox{10 40 594 800}
\RequirePackage{semhelv}

%\myitem{1}{\includegraphics[width=.4cm]{red-bullet-on-white.ps}}
%\myitem{2}{\includegraphics[width=.3cm]{green-bullet-on-white.ps}}
%\myitem{3}{\includegraphics[width=.3cm]{yellow-bullet-on-white.ps}}

\myitem{1}{\includegraphics[width=.4cm]{red-inverted-arrow.ps}}
\myitem{2}{\includegraphics[width=.3cm]{green-inverted-arrow.ps}}
\myitem{3}{\includegraphics[width=.3cm]{blue-inverted-arrow.ps}}

\endinput

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