00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef SVGGenerator_H
00029 #define SVGGenerator_H
00030
00031 #include "codegenerator.h"
00032
00033 namespace highlight
00034 {
00035
00046 class SVGGenerator : public highlight::CodeGenerator
00047 {
00048 public:
00049
00050 SVGGenerator();
00051 ~SVGGenerator();
00052
00057 void setSVGSize ( const string& w, const string& h );
00058
00059 private:
00060
00063 string getHeader();
00064
00066 string getFooter();
00067
00069 void printBody();
00070
00072 void initOutputTags();
00073
00074 string styleDefinitionCache;
00075 string width, height;
00076
00077 string getStyleDefinition();
00078
00079 string getAttributes ( const string &, const ElementStyle & );
00080
00082 virtual string maskCharacter ( unsigned char );
00083
00084 string getOpenTag ( const string& );
00085
00086 string getKeywordOpenTag ( unsigned int styleID );
00087 string getKeywordCloseTag ( unsigned int styleID );
00088
00090 string getNewLine();
00091 };
00092
00093 }
00094
00095 #endif