#include <latexgen.h>
|
| LatexCodeGenerator (FTextStream &t, const QCString &relPath, const QCString &sourceFile) |
|
| LatexCodeGenerator () |
|
void | setTextStream (FTextStream &t) |
|
void | setRelativePath (const QCString &path) |
|
void | setSourceFileName (const QCString &sourceFileName) |
|
void | codify (const char *text) |
|
void | writeCodeLink (const char *ref, const char *file, const char *anchor, const char *name, const char *tooltip) |
|
void | writeTooltip (const char *, const DocLinkInfo &, const char *, const char *, const SourceLinkInfo &, const SourceLinkInfo &) |
|
void | writeLineNumber (const char *, const char *, const char *, int) |
|
void | startCodeLine (bool) |
|
void | endCodeLine () |
|
void | startFontClass (const char *) |
|
void | endFontClass () |
|
void | writeCodeAnchor (const char *) |
|
void | setCurrentDoc (Definition *, const char *, bool) |
|
void | addWord (const char *, bool) |
|
virtual | ~CodeOutputInterface () |
|
Definition at line 27 of file latexgen.h.
Definition at line 43 of file latexgen.cpp.
void setTextStream(FTextStream &t)
QCString m_sourceFileName
#define Config_getBool(val)
LatexCodeGenerator::LatexCodeGenerator |
( |
| ) |
|
Definition at line 50 of file latexgen.cpp.
#define Config_getBool(val)
void LatexCodeGenerator::_writeCodeLink |
( |
const char * |
className, |
|
|
const char * |
ref, |
|
|
const char * |
file, |
|
|
const char * |
anchor, |
|
|
const char * |
name, |
|
|
const char * |
tooltip |
|
) |
| |
|
private |
void LatexCodeGenerator::addWord |
( |
const char * |
, |
|
|
bool |
|
|
) |
| |
|
inlinevirtual |
void LatexCodeGenerator::codify |
( |
const char * |
s | ) |
|
|
virtual |
Writes an code fragment to the output. This function should keep spaces visible, should break lines at a newline and should convert tabs to the right number of spaces.
Implements CodeOutputInterface.
Definition at line 71 of file latexgen.cpp.
78 int spacesToNextTabStop;
80 const int maxLineLen = 108;
89 case '\t': spacesToNextTabStop =
90 tabSize - (
m_col%tabSize);
92 m_col+=spacesToNextTabStop;
95 case '\n':
m_t <<
'\n';
m_col=0; p++;
102 #define COPYCHAR() do { \ 103 result[i++]=c; p++; \ 108 if (((uchar)c&0xE0)==0xE0) \ 113 if (((uchar)c&0xF0)==0xF0) \ 125 if (
m_col>=maxLineLen)
132 while (
m_col<maxLineLen && (c=*p) &&
133 c!=0x0c && c!=
'\t' && c!=
'\n' && c!=
' ' 138 if (
m_col>=maxLineLen)
QCString left(uint len) const
#define Config_getInt(val)
void filterLatexString(FTextStream &t, const char *str, bool insideTabbing, bool insidePre, bool insideItem, bool keepSpaces)
void LatexCodeGenerator::docify |
( |
const char * |
str | ) |
|
|
private |
void LatexCodeGenerator::endCodeLine |
( |
| ) |
|
|
virtual |
void LatexCodeGenerator::endFontClass |
( |
| ) |
|
|
virtual |
void LatexCodeGenerator::setCurrentDoc |
( |
Definition * |
, |
|
|
const char * |
, |
|
|
bool |
|
|
) |
| |
|
inlinevirtual |
void LatexCodeGenerator::setRelativePath |
( |
const QCString & |
path | ) |
|
void LatexCodeGenerator::setSourceFileName |
( |
const QCString & |
sourceFileName | ) |
|
void LatexCodeGenerator::setTextStream |
( |
FTextStream & |
t | ) |
|
Definition at line 55 of file latexgen.cpp.
void setDevice(QIODevice *)
QIODevice * device() const
void LatexCodeGenerator::startCodeLine |
( |
bool |
| ) |
|
|
virtual |
void LatexCodeGenerator::startFontClass |
( |
const char * |
clsName | ) |
|
|
virtual |
Starts a block with a certain meaning. Used for syntax highlighting, which elements of the same type are rendered using the same 'font class'.
- Parameters
-
clsName | The category name. |
Implements CodeOutputInterface.
Definition at line 233 of file latexgen.cpp.
235 m_t <<
"\\textcolor{" <<
name <<
"}{";
void LatexCodeGenerator::writeCodeAnchor |
( |
const char * |
name | ) |
|
|
inlinevirtual |
void LatexCodeGenerator::writeCodeLink |
( |
const char * |
ref, |
|
|
const char * |
file, |
|
|
const char * |
anchor, |
|
|
const char * |
name, |
|
|
const char * |
tooltip |
|
) |
| |
|
virtual |
Writes a link to an object in a code fragment.
- Parameters
-
ref | If this is non-zero, the object is to be found in an external documentation file. |
file | The file in which the object is located. |
anchor | The anchor uniquely identifying the object within the file. |
name | The text to display as a placeholder for the link. |
tooltip | The tooltip to display when the mouse is on the link. |
Implements CodeOutputInterface.
Definition at line 160 of file latexgen.cpp.
172 if (!ref && usePDFLatex && pdfHyperlinks)
174 m_t <<
"\\hyperlink{";
176 if (
f && anchor)
m_t <<
"_";
177 if (anchor)
m_t << anchor;
static QCString stripPath(const QCString &s)
Q_EXPORT uint qstrlen(const char *str)
void codify(const char *text)
#define Config_getBool(val)
void LatexCodeGenerator::writeLineNumber |
( |
const char * |
ref, |
|
|
const char * |
file, |
|
|
const char * |
anchor, |
|
|
int |
lineNumber |
|
) |
| |
|
virtual |
Writes the line number of a source listing
- Parameters
-
ref | External reference (when imported from a tag file) |
file | The file part of the URL pointing to the docs. |
anchor | The anchor part of the URL pointing to the docs. |
lineNumber | The line number to write |
Implements CodeOutputInterface.
Definition at line 189 of file latexgen.cpp.
204 if (usePDFLatex && pdfHyperlinks)
206 m_t <<
"\\hypertarget{" <<
stripPath(lineAnchor) <<
"}{}";
void writeCodeLink(const char *ref, const char *file, const char *anchor, const char *name, const char *tooltip)
static QCString stripPath(const QCString &s)
QCString m_sourceFileName
void codify(const char *text)
QCString & prepend(const char *s)
#define Config_getBool(val)
QCString & sprintf(const char *format,...)
Writes a tool tip definition
- Parameters
-
id | unique identifier for the tooltip |
docInfo | Info about the symbol's documentation. |
decl | full declaration of the symbol (for functions) |
desc | brief description for the symbol |
defInfo | Info about the symbol's definition in the source code |
declInfo | Info about the symbol's declaration in the source code |
Implements CodeOutputInterface.
Definition at line 39 of file latexgen.h.
int LatexCodeGenerator::m_col |
|
private |
bool LatexCodeGenerator::m_prettyCode |
|
private |
QCString LatexCodeGenerator::m_sourceFileName |
|
private |
bool LatexCodeGenerator::m_streamSet |
|
private |
The documentation for this class was generated from the following files: