%
% LessTif.tex -- The ``Inside LessTif'' documentation for all those
%                hungry programmers.
%
% (c) 1996, 97 The Hungry Programmers
% (c) 1996, 97 Harald Albrecht (albrecht@igpm.rwth-aachen.de)
% See the file PUBLIC for details.
%

% The documentclass is set in LessTif.single.tex or LessTif.double.tex!
%\documentclass[11pt,a4paper,oneside,openany]{book}
\usepackage[latin1]{inputenc}

% amai: this sequence different from the original one makes vtex happy
\usepackage{times}% We use P*stScr*pt fonts!
\normalfont
\usepackage[T1]{fontenc}


\usepackage{mathptm} % avoid font scale warnings with hyperref?
\usepackage{makeidx}
% \usepackage{epsfig}
\usepackage{graphicx}
%\DeclareGraphicsExtensions{.eps}

% amai: was called twice??
% \usepackage{mathptm}% avoid font scale warnings with hyperref
\usepackage{Hungry}% This must be the last style package in the list!

\usepackage[hyperindex,backref,plainpages=false]{hyperref}

%
% PDF document meta information
%
\hypersetup{
  pdftitle={Inside LessTif},
  pdfauthor={D. Backx, M. Miers, C. Toshok, H. Albrecht},
  pdfkeywords={LessTif, Motif, Xt, Xm, programmer's guide, free software, LGPL, GNU, Stallman}
}
%
% Enable indexing and other goodies.
%
\makeindex
%
% First define a few important (well, more or less...) brand names...
%
\newcommand{\CSF}{\textsc{CSF}}
\newcommand{\Motif}{\textsc{M\makebox[.35em]{\raisebox{-.5ex}{*}}tif}}
\newcommand{\Unix}{\textsc{Un\makebox[.35em]{\raisebox{-.5ex}{*}}x}}
\newcommand{\LessTif}{\textsc{LessTif}}
\newcommand{\INSIDEL}{``Inside LessTif''}
% -----------------------------------------------------------------------------
% Here we really start our booklet. Let's begin with a fancy title page. Here
% we bypass LaTeX as its title page style looks too severe. The title page
% also features a simple drawing...
%
\begin{document}
\frontmatter
\begin{hungrytitle}
\TitlepageMotifation{Providing (Really) Open Technology.}
%\TitlepageTitle{Inside LessTif}
\TitlepageTitle{\includegraphics[scale=1.1]{LessTifTitle}}
\TitlepageSubtitle{Information for the Hungry Programmer}
\makebox[0pt][l]{\raisebox{-100mm}[0pt][0pt]{%
\hspace{-\textwidth}\hspace{1.5in}\includegraphics{Hungry}}}%
Danny Backx\\
Mitch Miers\\
Chris Toshok\\
Harald Albrecht
\end{hungrytitle}
%
% Now for the necessary preliminary stuff each book needs in one or the
% other form.
%
\pagestyle{hungry}
\thispagestyle{empty}
\renewcommand{\thepage}{\Roman{page}}
{\sc Legal Notice}\\[3pt]
\copyright{} 1996, 2001 by\\
\hspace*{2.5em}D. Backx
 (\href{mailto:danny.backx@skynet.be}{danny.backx@skynet.be}),\\
\hspace*{2.5em}M. Miers
 (\href{mailto:miers@packet.net}{miers@packet.net}),\\
\hspace*{2.5em}C. Toshok
 (\href{mailto:toshok@hungry.com}{toshok@hungry.com}),\\
\hspace*{2.5em}H. Albrecht:
 editor, figures and typesetting
 (\href{mailto:harald@plt.rwth-aachen.de}{harald@plt.rwth-aachen.de}).

\INSIDEL{} may be reproduced and distributed in whole or in part for
non-commercial purposes, subject to the following conditions:

\begin{itemlist}
\item The copyright notice above and this permission notice must be
preserved complete on all complete or partial copies.

\item Any translation or derivative work of \INSIDEL{} must be
approved by the authors in writing before distribution.

\item If you distribute \INSIDEL{} in part, instructions for
obtaining the complete version of \INSIDEL{} must be included.

\item Small portions may be reproduced as illustrations for reviews or
quotes in other works without this permission notice if proper citation
is given.
\end{itemlist}

Exception to this rules may be granted for academic purposes. These
restrictions are here to protect us as authors, not to restrict you
as educators and learners.

\textsc{Disclaimer}\\[3pt]
The information contained within this document is subject to change
without notice.

No one of the authors shall be liable for errors contained herein or
for incidental consequential damages in connection with the
furnishing, performance, or use of this material.

\textsc{Acknowledgements}\\[3pt]
Many of the designations used by manufacturers and sellers to
distinguish their products are claimed as trademarks. Where those
designations appear in this book, and we were aware of a trademark
claim, the designations have been printed in caps or initial caps. We
appologize for some designations being mangled during the process of
typesetting. Really.

\textsc{PIGS\raisebox{5pt}{\tiny TM}/P3P Rating}\\[3pt]
Absurd, Perverse, For Programmers Only. Attention: The information
contained herein may cause damage to your opinions about the \CSF{}
and Graphical User Interfaces in general. You have been forewarned.

\vspace*{\fill}
%Edition BETA--IV, August 1997.
Edition Ia, November 2001 (PDF ``Reprint'')

%
% Now for the tables...
%
\setcounter{page}{0}
\parskip 0cm
\tableofcontents
\newpage
\listoftables
\newpage
\listoffigures
\parskip 7pt
%
%
%
\chapter{Foreword}
\by{~}

\section*{Foreword}
When I first heard rumors of \LessTif{}, I was already struggling for
years with the famous \Motif{} graphical user interface on different
hardware platforms. Every new day unveiled another and -- so to say --
exciting feature not written down in the official
documentation.

Needless to say that that official documentation was, and still is,
lacking the \emph{really} interesting aspects: writing not-so-trivial
\Motif{} widgets, how \Motif{}'s own geometry management utilities
work, what the BaseClass stuff is for, and many other
goodies. Ordinarily, this would be the time to ``read the source,
Luke''. Unfortunately, the great creator of \Motif{} -- the
\textsc{Closed Software Foundation} (or CSF for short) -- reveals the
source only to those willing to pay (``pay-per-view principle'').

Fortunately, \LessTif{} upheld the flag of ``providing open
technology'' from its early beginning: the source is freely available
under the terms of the GNU Public Library License.  And it is common
knowlegde that the source is also the source of information (``may the
source be with you...'').

Although standing on its own feet, \LessTif{} provides deep insight
not only into itself but also into the abyss of that other graphical
user interface called ``\Motif{}''. But browsing through the source
and understanding all the intrinsic and intricate things inside
\LessTif{} isn't an easy task. You can easily get lost. Or to cite
Mitch Miers and his law \#37 of programming:

\begin{quotation}
\vspace{-11pt}
\noindent\emph{Real Programmers don't write documentation, they leave that
to the tech writers.\\It was hard to code, it should be hard to
understand.}
\vspace{-11pt}
\end{quotation}

This is where \INSIDEL{} comes into play. Written by the creators of
\LessTif{}, this book provides a deep and thorough insight into this
free \Motif{} ``clone''. We show you all the mechanisms and smart
improvements behind the scenes.

This book is definitely not a beginner's guide but is aimed at the
programmer who has already a working knowledge of programming with --
or should I say: fighting against -- \Motif{}. A basic knowledge about
the Xt Intrinsics' widget class mechanism is necessary too.

I wish to thank especially all the authors for writing down their
first-hand knowledge about \LessTif{}. They had to cut off many
valueable spare hours from their coding time to make this
documentation real. Also my special thanks to Rob Blue, who has taken
the (maybe daunting but nevertheless very important) part of
proofreading.

\begin{flushright}
Harald Albrecht
\end{flushright}

\vspace*{\fill}
P.S.: If you find \INSIDEL{} to be useful (and we -- the authors --
are sure you will) then we ask you to donate a reasonable amount to a
charitable institution.


\newpage
\section*{Status of this Document}
This document is no longer being actively maintained or even
enhanced. In autumn 2001 its complete sources have been
added to the \LessTif{}
\href{http://www.lesstif.org/cvs.html}{CVS repository}.
In addition the old sources were updated to finally
allow creation of enhanced versions in PDF and HTML format
including internal and external(!) hyperlinks.


More information about \LessTif{} (including
source code, links and mailing lists) can be found on the two
homepages at
\\
\href{http://www.lesstif.org}{http://www.lesstif.org}
and
\\
\href{http://sf.net/projects/lesstif}{http://sf.net/projects/lesstif}
.


If you want to comment on this document, come up with suggestion,
corrections or even additions please send an email to
\\
\href{mailto:lesstif@lesstif.org}{lesstif@lesstif.org}

%
% ----------------------------------------------------------------------------
% Now for the text itself...  %
\mainmatter
\input{SyntheticResources.tex}
\input{BaseClass.tex}
\input{Grab.tex}
\input{Geometry.tex}
\input{GeoUtils.tex}
\input{DragNDrop.tex}
\input{VirtKeys.tex}
\input{XmStrings.tex}
\input{Caches.tex}
%
\appendix
\input{Appendix.tex}
%
\backmatter
\cleardoublepage
\printindex 
%\end{document} % That's it, folks!
% End of LessTif.tex
