Chameleon

Chameleon Svn Source Tree

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

Source at commit 1322 created 9 years 5 months ago.
By meklort, Add doxygen to utils folder
1/******************************************************************************
2 *
3 * $Id: rtfgen.h,v 1.13 2001/03/19 19:27:41 root Exp $
4 *
5 * Copyright (C) 1997-2011 by Parker Waechter & 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 RTFGEN_H
19#define RTFGEN_H
20
21#include "outputgen.h"
22
23class QFile;
24
25class RTFGenerator : public OutputGenerator
26{
27 public:
28 RTFGenerator();
29 ~RTFGenerator();
30 static void init();
31 static void writeStyleSheetFile(QFile &f);
32 static void writeExtensionsFile(QFile &file);
33
34 void enable()
35 { if (genStack->top()) active=*genStack->top(); else active=TRUE; }
36 void disable() { active=FALSE; }
37 void enableIf(OutputType o) { if (o==RTF) active=TRUE; }
38 void disableIf(OutputType o) { if (o==RTF) active=FALSE; }
39 void disableIfNot(OutputType o) { if (o!=RTF) active=FALSE; }
40 bool isEnabled(OutputType o) { return (o==RTF && active); }
41 OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; }
42
43 void printDoc(DocNode *,const char *);
44
45 void startFile(const char *name,const char *manName,const char *title);
46 void writeFooter() {}
47 void endFile();
48 void clearBuffer();
49 //void postProcess(QByteArray &);
50
51 void startIndexSection(IndexSections);
52 void endIndexSection(IndexSections);
53 void writePageLink(const char *,bool);
54 void startProjectNumber();
55 void endProjectNumber();
56 void writeStyleInfo(int part);
57 void startTitleHead(const char *);
58 void startTitle();
59 void endTitleHead(const char *,const char *name);
60 void endTitle() {}
61
62 void newParagraph();
63 void startParagraph();
64 void endParagraph();
65 void writeString(const char *text);
66 void startIndexListItem();
67 void endIndexListItem();
68 void startIndexList();
69 void endIndexList();
70 void startIndexKey();
71 void endIndexKey();
72 void startIndexValue(bool);
73 void endIndexValue(const char *,bool);
74 void startItemList();
75 void endItemList();
76 void startIndexItem(const char *ref,const char *file);
77 void endIndexItem(const char *ref,const char *file);
78 void docify(const char *text);
79 void codify(const char *text);
80 void writeObjectLink(const char *ref,const char *file,
81 const char *anchor,const char *name);
82 void writeCodeLink(const char *ref, const char *file,
83 const char *anchor,const char *name,
84 const char *tooltip);
85 void startTextLink(const char *f,const char *anchor);
86 void endTextLink();
87 void startHtmlLink(const char *url);
88 void endHtmlLink();
89 void startTypewriter() { t << "{\\f2 "; }
90 void endTypewriter() { t << "}"; }
91 void startGroupHeader(int);
92 void endGroupHeader(int);
93 //void writeListItem();
94 void startItemListItem();
95 void endItemListItem();
96
97 void startMemberSections() {}
98 void endMemberSections() {}
99 void startHeaderSection() {}
100 void endHeaderSection() {}
101 void startMemberHeader(const char *) { startGroupHeader(FALSE); }
102 void endMemberHeader() { endGroupHeader(FALSE); }
103 void startMemberSubtitle();
104 void endMemberSubtitle();
105 void startMemberDocList() {}
106 void endMemberDocList() {}
107 void startMemberList();
108 void endMemberList();
109 void startInlineDescription();
110 void endInlineDescription();
111 void startInlineHeader();
112 void endInlineHeader();
113 void startAnonTypeScope(int) {}
114 void endAnonTypeScope(int) {}
115 void startMemberItem(int);
116 void endMemberItem();
117 void startMemberTemplateParams() {}
118 void endMemberTemplateParams() {}
119 void insertMemberAlign(bool) {}
120
121 void writeRuler() { rtfwriteRuler_thin(); }
122
123 void writeAnchor(const char *fileName,const char *name);
124 void startCodeFragment();
125 void endCodeFragment();
126 void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
127 void startCodeLine() { col=0; }
128 void endCodeLine() { lineBreak(); }
129 void startEmphasis() { t << "{\\i "; }
130 void endEmphasis() { t << "}"; }
131 void startBold() { t << "{\\b "; }
132 void endBold() { t << "}"; }
133 void startDescription();
134 void endDescription();
135 void startDescItem();
136 void endDescItem();
137 void lineBreak(const char *style=0);
138 void startMemberDoc(const char *,const char *,const char *,const char *,bool);
139 void endMemberDoc(bool);
140 void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
141 void endDoxyAnchor(const char *,const char *);
142 void startCodeAnchor(const char *) {};
143 void endCodeAnchor() {};
144 void writeChar(char c);
145 void writeLatexSpacing() {};//{ t << "\\hspace{0.3cm}"; }
146 void writeStartAnnoItem(const char *type,const char *file,
147 const char *path,const char *name);
148 void writeEndAnnoItem(const char *name);
149 void startSubsection();
150 void endSubsection();
151 void startSubsubsection();
152 void endSubsubsection();
153 void startCenter() { t << "{\\qc" << endl; }
154 void endCenter() { t << "}"; }
155 void startSmall() { t << "{\\sub "; }
156 void endSmall() { t << "}"; }
157
158 void startMemberDescription();
159 void endMemberDescription();
160 void startDescList(SectionTypes);
161 void startSimpleSect(SectionTypes,const char *,const char *,const char *);
162 void endSimpleSect();
163 void startParamList(ParamListTypes,const char *);
164 void endParamList();
165 //void writeDescItem();
166 void startDescForItem();
167 void endDescForItem();
168 void startSection(const char *,const char *,SectionInfo::SectionType);
169 void endSection(const char *,SectionInfo::SectionType);
170 void addIndexItem(const char *,const char *);
171 void startIndent();
172 void endIndent();
173 void writeSynopsis() {}
174 void startClassDiagram();
175 void endClassDiagram(const ClassDiagram &,const char *filename,const char *name);
176 void startPageRef();
177 void endPageRef(const char *,const char *);
178 void startQuickIndices() {}
179 void endQuickIndices() {}
180 void writeSplitBar(const char *) {}
181 void writeLogo() {}
182 void writeQuickLinks(bool,HighlightedItem) {}
183 void startContents() {}
184 void endContents() {}
185 void writeNonBreakableSpace(int);
186
187 void startDescTable();
188 void endDescTable();
189 void startDescTableTitle();
190 void endDescTableTitle();
191 void startDescTableData();
192 void endDescTableData();
193
194 void startDotGraph();
195 void endDotGraph(const DotClassGraph &);
196 void startInclDepGraph();
197 void endInclDepGraph(const DotInclDepGraph &);
198 void startGroupCollaboration();
199 void endGroupCollaboration(const DotGroupCollaboration &g);
200 void startCallGraph();
201 void endCallGraph(const DotCallGraph &);
202 void startDirDepGraph();
203 void endDirDepGraph(const DotDirDeps &g);
204 void writeGraphicalHierarchy(const DotGfxHierarchyTable &) {}
205
206 void startMemberGroupHeader(bool);
207 void endMemberGroupHeader();
208 void startMemberGroupDocs();
209 void endMemberGroupDocs();
210 void startMemberGroup();
211 void endMemberGroup(bool);
212
213 void startTextBlock(bool dense);
214 void endTextBlock(bool);
215 void lastIndexPage();
216
217 void startMemberDocPrefixItem() {}
218 void endMemberDocPrefixItem() {}
219 void startMemberDocName(bool) {}
220 void endMemberDocName() {}
221 void startParameterType(bool,const char *);
222 void endParameterType() {}
223 void startParameterName(bool) {}
224 void endParameterName(bool,bool,bool) {}
225 void startParameterList(bool) {}
226 void endParameterList() {}
227
228 void startConstraintList(const char *);
229 void startConstraintParam();
230 void endConstraintParam();
231 void startConstraintType();
232 void endConstraintType();
233 void startConstraintDocs();
234 void endConstraintDocs();
235 void endConstraintList();
236
237
238 void startFontClass(const char *) {}
239 void endFontClass() {}
240
241 void writeCodeAnchor(const char *) {}
242 void linkableSymbol(int,const char *,Definition *,Definition *) {}
243
244 static bool preProcessFileInplace(const char *path,const char *name);
245
246 private:
247 RTFGenerator(const RTFGenerator &);
248 RTFGenerator &operator=(const RTFGenerator &);
249
250 const char *rtf_BList_DepthStyle();
251 const char *rtf_CList_DepthStyle();
252 const char *rtf_EList_DepthStyle();
253 const char *rtf_LCList_DepthStyle();
254 const char *rtf_DList_DepthStyle();
255 const char *rtf_Code_DepthStyle();
256 void incrementIndentLevel();
257 void decrementIndentLevel();
258 int col;
259
260 bool m_bstartedBody; // has startbody been called yet?
261 int m_listLevel; // // RTF does not really have a addative indent...manually set list level.
262 bool m_omitParagraph; // should a the next paragraph command be ignored?
263 int m_numCols; // number of columns in a table
264 QCString relPath;
265
266 void beginRTFDocument();
267 void beginRTFChapter();
268 void beginRTFSection();
269 void rtfwriteRuler_doubleline();
270 void rtfwriteRuler_emboss();
271 void rtfwriteRuler_thick();
272 void rtfwriteRuler_thin();
273 void writeRTFReference(const char *label);
274 //char *getMultiByte(int c);
275};
276
277#endif
278

Archive Download this file

Revision: 1322