Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/latexgen.h

Source at commit 1322 created 9 years 5 months ago.
By meklort, Add doxygen to utils folder
1/******************************************************************************
2 *
3 * $Id: latexgen.h,v 1.50 2001/03/19 19:27:41 root Exp $
4 *
5 * Copyright (C) 1997-2011 by Dimitri van Heesch.
6 *
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
12 *
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
15 *
16 */
17
18#ifndef LATEXGEN_H
19#define LATEXGEN_H
20
21#include "outputgen.h"
22
23class QFile;
24
25class LatexGenerator : public OutputGenerator
26{
27 public:
28 LatexGenerator();
29 ~LatexGenerator();
30 static void init();
31 static void writeStyleSheetFile(QFile &f);
32 static void writeHeaderFile(QFile &f);
33 static void writeFooterFile(QFile &f);
34
35 //OutputGenerator *copy();
36 //OutputGenerator *clone() { return new LatexGenerator(*this); }
37 //void append(const OutputGenerator *o);
38 void enable()
39 { if (genStack->top()) active=*genStack->top(); else active=TRUE; }
40 void disable() { active=FALSE; }
41 void enableIf(OutputType o) { if (o==Latex) active=TRUE; }
42 void disableIf(OutputType o) { if (o==Latex) active=FALSE; }
43 void disableIfNot(OutputType o) { if (o!=Latex) active=FALSE; }
44 bool isEnabled(OutputType o) { return (o==Latex && active); }
45 OutputGenerator *get(OutputType o) { return (o==Latex) ? this : 0; }
46
47 void printDoc(DocNode *,const char *);
48
49 void startFile(const char *name,const char *manName,const char *title);
50 void writeFooter() {}
51 void endFile();
52 void clearBuffer();
53
54 void startIndexSection(IndexSections);
55 void endIndexSection(IndexSections);
56 void writePageLink(const char *,bool);
57 void startProjectNumber();
58 void endProjectNumber() {}
59 void writeStyleInfo(int part);
60 void startTitleHead(const char *);
61 void startTitle();
62 void endTitleHead(const char *,const char *name);
63 void endTitle() { t << "}"; }
64
65 void newParagraph();
66 void startParagraph();
67 void endParagraph();
68 void writeString(const char *text);
69 void startIndexListItem() {}
70 void endIndexListItem() {}
71 void startIndexList() { t << "\\begin{DoxyCompactList}" << endl; }
72 void endIndexList() { t << "\\end{DoxyCompactList}" << endl; }
73 void startIndexKey();
74 void endIndexKey();
75 void startIndexValue(bool);
76 void endIndexValue(const char *,bool);
77 void startItemList() { t << "\\begin{DoxyCompactItemize}" << endl; }
78 void endItemList() { t << "\\end{DoxyCompactItemize}" << endl; }
79 void startIndexItem(const char *ref,const char *file);
80 void endIndexItem(const char *ref,const char *file);
81 void docify(const char *text);
82 void codify(const char *text);
83 void writeObjectLink(const char *ref,const char *file,
84 const char *anchor,const char *name);
85 void writeCodeLink(const char *ref, const char *file,
86 const char *anchor,const char *name,
87 const char *tooltip);
88 void startTextLink(const char *,const char *);
89 void endTextLink();
90 void startHtmlLink(const char *url);
91 void endHtmlLink();
92 void startTypewriter() { t << "{\\ttfamily "; }
93 void endTypewriter() { t << "}"; }
94 void startGroupHeader(int);
95 void endGroupHeader(int);
96 void startItemListItem() { t << "\\item " << endl; }
97 void endItemListItem() {}
98
99 void startMemberSections() {}
100 void endMemberSections() {}
101 void startHeaderSection() {}
102 void endHeaderSection() {}
103 void startMemberHeader(const char *);
104 void endMemberHeader();
105 void startMemberSubtitle() {}
106 void endMemberSubtitle() {}
107 void startMemberDocList() {}
108 void endMemberDocList() {}
109 void startMemberList();
110 void endMemberList();
111 void startInlineDescription() {}
112 void endInlineDescription() {}
113 void startInlineHeader();
114 void endInlineHeader();
115 void startAnonTypeScope(int);
116 void endAnonTypeScope(int);
117 void startMemberItem(int);
118 void endMemberItem();
119 void startMemberTemplateParams();
120 void endMemberTemplateParams();
121
122 void startMemberGroupHeader(bool);
123 void endMemberGroupHeader();
124 void startMemberGroupDocs();
125 void endMemberGroupDocs();
126 void startMemberGroup();
127 void endMemberGroup(bool);
128
129 void insertMemberAlign(bool) {}
130
131 void writeRuler() { t << endl << endl; }
132 void writeAnchor(const char *fileName,const char *name);
133 void startCodeFragment();
134 void endCodeFragment();
135 void writeLineNumber(const char *,const char *,const char *,int l);
136 void startCodeLine();
137 void endCodeLine();
138 void startEmphasis() { t << "{\\em "; }
139 void endEmphasis() { t << "}"; }
140 void startBold() { t << "{\\bfseries "; }
141 void endBold() { t << "}"; }
142 void startDescription();
143 void endDescription();
144 void startDescItem();
145 void endDescItem();
146 void lineBreak(const char *style=0) { (void)style; t << "\\par\n"; }
147 void startMemberDoc(const char *,const char *,const char *,const char *,bool);
148 void endMemberDoc(bool);
149 void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
150 void endDoxyAnchor(const char *,const char *);
151 void startCodeAnchor(const char *);
152 void endCodeAnchor();
153 void writeChar(char c);
154 void writeLatexSpacing() { t << "\\hspace{0.3cm}"; }
155 void writeStartAnnoItem(const char *type,const char *file,
156 const char *path,const char *name);
157 void writeEndAnnoItem(const char *name);
158 void startSubsection() { t << "\\subsection*{"; }
159 void endSubsection() { t << "}" << endl; }
160 void startSubsubsection() { t << "\\subsubsection*{"; }
161 void endSubsubsection() { t << "}" << endl; }
162 void startCenter() { t << "\\begin{center}" << endl; }
163 void endCenter() { t << "\\end{center}" << endl; }
164 void startSmall() { t << "\\footnotesize "; }
165 void endSmall() { t << "\\normalsize "; }
166 void startMemberDescription();
167 void endMemberDescription();
168 void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; }
169 void endDescList() { t << "\\end{Desc}" << endl; }
170 void startSimpleSect(SectionTypes,const char *,const char *,const char *);
171 void endSimpleSect();
172 void startParamList(ParamListTypes,const char *title);
173 void endParamList();
174 void startDescForItem() { t << "\\par" << endl; }
175 void endDescForItem() {}
176 void startSection(const char *,const char *,SectionInfo::SectionType);
177 void endSection(const char *,SectionInfo::SectionType);
178 void addIndexItem(const char *,const char *);
179 void startIndent() {}
180 void endIndent() {}
181 void writeSynopsis() {}
182 void startClassDiagram();
183 void endClassDiagram(const ClassDiagram &,const char *,const char *);
184 void startPageRef();
185 void endPageRef(const char *,const char *);
186 void startQuickIndices() {}
187 void endQuickIndices() {}
188 void writeSplitBar(const char *) {}
189 void writeLogo() {}
190 void writeQuickLinks(bool,HighlightedItem) {}
191 void startContents() {}
192 void endContents() {}
193 void writeNonBreakableSpace(int);
194
195 void startDescTable()
196 { t << "\\begin{description}" << endl; }
197 void endDescTable()
198 { t << "\\end{description}" << endl; }
199 void startDescTableTitle()
200 { t << "\\item[{\\em " << endl; }
201 void endDescTableTitle()
202 { t << "}]"; }
203 void startDescTableData() {}
204 void endDescTableData() {}
205 void lastIndexPage() {}
206
207 void startDotGraph();
208 void endDotGraph(const DotClassGraph &);
209 void startInclDepGraph();
210 void endInclDepGraph(const DotInclDepGraph &);
211 void startCallGraph();
212 void startGroupCollaboration();
213 void endGroupCollaboration(const DotGroupCollaboration &g);
214 void endCallGraph(const DotCallGraph &);
215 void startDirDepGraph();
216 void endDirDepGraph(const DotDirDeps &g);
217 void writeGraphicalHierarchy(const DotGfxHierarchyTable &) {}
218
219 void startTextBlock(bool) {}
220 void endTextBlock(bool) {}
221
222 void startMemberDocPrefixItem() {}
223 void endMemberDocPrefixItem() {}
224 void startMemberDocName(bool) {}
225 void endMemberDocName() {}
226 void startParameterType(bool,const char *);
227 void endParameterType();
228 void startParameterName(bool);
229 void endParameterName(bool,bool,bool);
230 void startParameterList(bool);
231 void endParameterList();
232
233 void startConstraintList(const char *);
234 void startConstraintParam();
235 void endConstraintParam();
236 void startConstraintType();
237 void endConstraintType();
238 void startConstraintDocs();
239 void endConstraintDocs();
240 void endConstraintList();
241
242 void startFontClass(const char *); // {}
243 void endFontClass(); // {}
244
245 void writeCodeAnchor(const char *) {}
246 void linkableSymbol(int,const char *,Definition *,Definition *) {}
247
248 private:
249 LatexGenerator(const LatexGenerator &);
250 LatexGenerator &operator=(const LatexGenerator &);
251 void escapeLabelName(const char *s);
252 void escapeMakeIndexChars(const char *s);
253 int col;
254 bool insideTabbing;
255 bool firstDescItem;
256 bool disableLinks;
257 QCString relPath;
258 QCString sourceFileName;
259 int m_indent;
260 bool templateMemberItem;
261 bool m_prettyCode;
262};
263
264#endif
265

Archive Download this file

Revision: 1322