% classref.sty
%
% Style file to aid typesetting a C++ class reference manual,
% with macros defined to be scanned by utilities to
% provide on-line help (wxHelp, WinHelp).
% These utilities are called tex2help and tex2win.
%
% The classes should be in a separate document, e.g. classes.tex.
% Each class definition should be typeset with e.g.
%
% \section{\class{Name}: Parent}
%
% followed by a description of the class.
% Each member should follow:
%
% \membersection{wxName::Member}
%
% with a description of what this member does.
% Then, one (or more if overloaded) member (function) in detail:
%
% \func{return type}{name}{args}
% or
% \member{type}{name}
%
% where args is a list of \param{type}{name}, ...
%
% To insert hyperlinks (or references, in Latex), \label the sections
% or membersections (\label{ref-label} immediately after the section, on the same line)
% and use \helpref{text-to-show}{ref-label} to make a reference.
%
% Note that if a non-ASCII character starts a newline and there should be a space
% between the last word on the previous line and the first word on this line,
% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
% in all other formats.
%
% Julian Smart
% Artificial Intelligence Applications Institute

% ------------------------- LATEX MACROS -------------------------

% Function, e.g.
% e.g. to typeset
%
% void DoIt(char *string);
%
% write:
%
% \func{void}{DoIt}{\param{char *}{string}}
%

\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
{{\it #1} {\bf #2}\index{#2}}(#3)}

% For function/type definition where the name is a pointer,
% e.g. to typeset
%
% typedef void (*wxFunction)(wxObject&)
%
% write:
%
% \pfunc{typedef void}{wxFunction}{param{wxObject&}}

\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
{{\it #1} ({\bf *#2})\index{#2}}(#3)}

% Use an ordinary \section command for class name definitions.

% This is used for a member, such as wxBitmap: GetDepth
\newcommand{\membersection}[1]{\subsection*{#1}}

% CLIPS function
\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
{{\bf #1} ({\bf #2}\index{#2}}#3)}

\newcommand{\clipssection}[1]{\chapter{#1}}

% This is used for a CLIPS function name
\newcommand{\functionsection}[1]{\subsection*{#1}}

\newcommand{\helpignore}[1]{#1}
\newcommand{\helponly}[1]{}
\newcommand{\cinsert}{$<<$}
\newcommand{\cextract}{$>>$}
\newcommand{\helpref}[2]{{\bf #1} (section \ref{#2})}
\newcommand{\helprefn}[2]{{\bf #1}}
%\newcommand{\memberref}[2]{{\bf #1}, P.~ \pageref{#3}}
\newcommand{\rtfsp}{} % Force a space in RTF, ignore in Latex

% Member: a type and a name
\newcommand{\member}[2]{{\bf #1 \it #2}}

% C++ Parameter: a type and a name (no intervening space)
\newcommand{\param}[2]{{\it #1}{\bf #2}}

% CLIPS Parameter: a type and a name (one intervening space)
\newcommand{\cparam}[2]{{\bf #1} {\it #2}}

% Class: puts in index
\newcommand{\class}[1]{#1\index{#1}}

% Void type
\newcommand{\void}{{\it void}}

% Typeset destructor
\newcommand{\destruct}[1]{{$\sim$}#1}

% Input a file only for help system (binder thickness is not a limitation
% in help systems!)
\newcommand{\helpinput}[1]{}

\newcommand{\wxclips}[0]{{wxCLIPS}}
\newcommand{\hardy}[0]{{\sc hardy}}
\newcommand{\problem}[1]{{\begin{flushleft}\it #1\end{flushleft}}}

% Glossary entry
\newcommand{\gloss}[1]{\item[#1]\index{#1}}

% Headings consistent with generated ones
\newcommand{\myheading}[1]{\vspace*{25pt}
\begin{flushleft}
{\LARGE \bf #1}
\end{flushleft}
\vskip 20pt
}

% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
\newcommand{\image}[2]{\psboxto(#1){#2}}

% Global document font size/family, help only.
\newcommand{\helpfontsize}[1]{}
\newcommand{\helpfontfamily}[1]{}

