]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/texhelp.sty
corrected default arguments, so that setting GetStdIcon works again
[wxWidgets.git] / docs / latex / wx / texhelp.sty
1 % LaTeX style file
2 % Name: texhelp.sty
3 % Author: Julian Smart
4 %
5 % Purpose
6 % -------
7 % Style file to enable the simultaneous preparation of printed LaTeX and on-line
8 % hypertext manuals.
9 % Use in conjunction with Tex2RTF (see Tex2RTF documentation).
10 %
11 % Note that if a non-ASCII character starts a newline and there should be a space
12 % between the last word on the previous line and the first word on this line,
13 % you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
14 % in all other formats.
15 %
16 % Julian Smart
17 % Artificial Intelligence Applications Institute
18 %
19 %
20 % ============== C++/CLIPS Documentation Facilities ==============
21 %
22 % Each class definition should be typeset with e.g.
23 %
24 % \section{\class{Name}: Parent}
25 %
26 % followed by a description of the class.
27 % Each member should follow:
28 %
29 % \membersection{wxName::Member}
30 %
31 % with a description of what this member does.
32 % Then, one (or more if overloaded) member (function) in detail:
33 %
34 % \func{return type}{name}{args}
35 % or
36 % \member{type}{name}
37 %
38 % where args is a list of \param{type}{name}, ...
39
40 % Function, e.g.
41 % e.g. to typeset
42 %
43 % void DoIt(char *string);
44 %
45 % write:
46 %
47 % \func{void}{DoIt}{\param{char *}{string}}
48 %
49
50 \newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
51 {{\it #1} {\bf #2}\index{#2}}(#3)}
52
53 % For function/type definition where the name is a pointer,
54 % e.g. to typeset
55 %
56 % typedef void (*wxFunction)(wxObject&)
57 %
58 % write:
59 %
60 % \pfunc{typedef void}{wxFunction}{param{wxObject&}}
61
62 \newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
63 {{\it #1} ({\bf *#2})\index{#2}}(#3)}
64
65 % Use an ordinary \section command for class name definitions.
66
67 % This is used for a member, such as wxBitmap: GetDepth
68 \newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
69
70 % CLIPS function
71 \newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
72 {{\bf #1} ({\bf #2}\index{#2}}#3)}
73
74 \newcommand{\clipssection}[1]{\chapter{#1}}
75
76 % This is used for a CLIPS function name
77 \newcommand{\functionsection}[1]{\subsection*{#1}}
78
79 % Member: a type and a name
80 \newcommand{\member}[2]{{\bf #1 \it #2}}
81
82 % C++ Parameter: a type and a name (no intervening space)
83 \newcommand{\param}[2]{{\it #1}{\bf #2}}
84
85 % CLIPS Parameter: a type and a name (one intervening space)
86 \newcommand{\cparam}[2]{{\bf #1} {\it #2}}
87
88 % Class: puts in index
89 \newcommand{\class}[1]{#1\index{#1}}
90
91 %\newcommand{\docparam}[2]{\parskip=0pt {\it #1}\par\parskip=10pt\begin{indented}{1cm}{#2}\end{indented}}
92
93 % Void type
94 \newcommand{\void}{{\it void}}
95
96 % Typeset destructor
97 \newcommand{\destruct}[1]{{$\sim$}#1}
98
99 % Typeset insert/extract operators
100 \newcommand{\cinsert}{$<<$}
101 \newcommand{\cextract}{$>>$}
102
103 % pythonnote: A note about the wxpython interface.
104 %\newcommand{\pythonnote}[1]{{\bf wxPython note: }#1}
105 \newcommand{\pythonnote}[1]{{}}
106 \newcommand{\perlnote}[1]{{}}
107
108 % =================== Hypertext facilities ===================
109 %
110 % To insert hyperlinks (or references, in Latex), \label the sections
111 % or membersections \label{ref-label} immediately after the section, on the same line,
112 % and use \helpref{text-to-show}{ref-label} to make a reference.
113 %
114
115 % Type text with section reference
116 \newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) }
117
118 % Type text with URL in verbatim mode
119 \newcommand{\urlref}[2]{#1 (\verb$#2$)}
120
121 % Don't typeset section number in LaTeX
122 \newcommand{\helprefn}[2]{{\it #1}}
123
124 % Like helpref, but popup text in WinHelp instead of hyperlinked
125 \newcommand{\popref}[2]{{\it #1}}
126
127 % Like footnote, but popup text.
128 \newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
129
130 % =================== On-line help specific macros ===================
131 %
132
133 % Global document font size/family, help only.
134 \newcommand{\helpfontsize}[1]{}
135 \newcommand{\helpfontfamily}[1]{}
136
137 % Ignore in all on-line help
138 \newcommand{\helpignore}[1]{#1}
139 % Only print in all on-line help
140 \newcommand{\helponly}[1]{}
141
142 % Ignore in LaTeX
143 \newcommand{\latexignore}[1]{}
144 % Only print in LaTeX
145 \newcommand{\latexonly}[1]{#1}
146
147 % Ignore in linear RTF
148 \newcommand{\rtfignore}[1]{#1}
149 % Only print in linear RTF
150 \newcommand{\rtfonly}[1]{}
151
152 % Ignore in WinHelp RTF
153 \newcommand{\winhelpignore}[1]{#1}
154 % Only print in WinHelp RTF
155 \newcommand{\winhelponly}[1]{}
156
157 % Ignore in wxHelp
158 \newcommand{\xlpignore}[1]{#1}
159 % Only print in wxHelp
160 \newcommand{\xlponly}[1]{}
161
162 % Ignore in HTML
163 \newcommand{\htmlignore}[1]{#1}
164 % Only print in HTML
165 \newcommand{\htmlonly}[1]{}
166
167 % Input a file only for help system (binder thickness is not a limitation
168 % in help systems!)
169 \newcommand{\helpinput}[1]{}
170
171 \newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
172
173 % =================== Miscellaneous macros ===================
174 %
175 % Headings consistent with generated ones
176 \newcommand{\myheading}[1]{\vspace*{25pt}
177 \begin{flushleft}
178 {\LARGE \bf #1}
179 \end{flushleft}
180 \vskip 20pt
181 }
182
183 % Heading with entry in contents page.
184 \newcommand{\chapterheading}[1]{\myheading{#1}
185 \addcontentsline{toc}{chapter}{#1}}
186
187 \newcommand{\sectionheading}[1]{\myheading{#1}
188 \addcontentsline{toc}{section}{#1}}
189
190 % Glossary environment
191 \newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
192
193 % Glossary entry
194 \newcommand{\gloss}[1]{\item[#1]\index{#1}}
195
196 % Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
197 \newcommand{\image}[2]{\psboxto(#1){#2}}
198
199 % Image, left aligned (HTML)
200 \newcommand{\imager}[2]{\psboxto(#1){#2}}
201
202 % Image, right aligned (HTML)
203 \newcommand{\imagel}[2]{\psboxto(#1){#2}}
204
205 % Imagemap: principally for HTML only. In Latex,
206 % acts like \image.
207 \newcommand{\imagemap}[3]{\psboxto(#1){#2}}
208
209 % Headers and footers
210 % \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
211 % {OddPageLeft}{OddPageCentre}{OddPageRight}
212 \newcommand{\setheader}[6]{
213 \lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
214 \chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
215 \rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
216 }
217
218 % \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
219 % {OddPageLeft}{OddPageCentre}{OddPageRight}
220 \newcommand{\setfooter}[6]{
221 \lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
222 \cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
223 \rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
224 }
225
226 % Needed for telling RTF where margin paragraph should go
227 % in mirrored margins mode.
228 \newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
229 \newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
230
231 % Environment for two-column table popular in WinHelp and manuals.
232 \newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
233 \newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
234 \newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
235
236 \twocolwidtha{3cm}
237 \twocolwidthb{8.5cm}
238 \twocolspacing{2}
239
240 \newcommand{\twocolitem}[2]{#1 & #2\\}
241 \newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
242
243 \newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
244 {\end{tabular}\renewcommand{\arraystretch}{1}}
245
246 % Specifying table rows for RTF compatibility
247 \newcommand{\row}[1]{#1\\}
248
249 % Use for the last ruled row for correct RTF generation.
250 \newcommand{\ruledrow}[1]{#1\\\hline}
251
252 % Indentation environment. Arg1 is left margin size
253 \newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
254 {\end{list}}
255
256 % Framed box of text, normal formatting.
257 \newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
258 % Double-framed box of text.
259 \newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
260
261 % WITHDRAWN -- can't do in RTF, easily.
262 % Framed box of text, horizontally centred. Ragged right within box.
263 % \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
264 % Double-framed box of text, horizontally centred. Ragged right within box.
265 % \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
266
267 % toocomplex environment: simply prints the argument in LaTeX,
268 % comes out verbatim in all generated formats.
269 \newenvironment{toocomplex}{}{}
270
271 % Colour: dummy commands since LaTeX doesn't support colour.
272 % \definecolour{name}{red}{blue}{green}
273 % \fcol{name}{text} ; Foreground
274 % \bcol{name}{text} ; Background
275 \newcommand{\definecolour}[4]{}
276 \newcommand{\definecolor}[4]{}
277 \newcommand{\fcol}[2]{#2}
278 \newcommand{\bcol}[2]{#2}
279 \newcommand{\sethotspotcolour}[1]{}
280 \newcommand{\sethotspotunderline}[1]{}
281 \newcommand{\settransparency}[1]{}
282 \newcommand{\backslashraw}[0]{}
283 \newcommand{\lbraceraw}[0]{}
284 \newcommand{\rbraceraw}[0]{}
285 \newcommand{\registered}[0]{(r)}
286 \newcommand{\background}[1]{}
287 \newcommand{\textcolour}[1]{}
288 \newcommand{\overview}[2]{See \helpref{#1}{#2}.}
289 \newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[]
290 #2%
291 \end{list}}
292 \newcommand{\wxheading}[1]{{\bf #1}}
293 \newcommand{\const}[0]{{\bf const}}
294 \newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
295 \newcommand{\windowstyle}[1]{{\bf #1}\index{#1}}
296
297 \addtolength{\textwidth}{1in}
298 \addtolength{\oddsidemargin}{-0.5in}
299 \addtolength{\topmargin}{-0.5in}
300 \addtolength{\textheight}{1in}
301 \sloppy
302