documentstyle.h

00001 /***************************************************************************
00002                           documentstyle.h  -  description
00003                              -------------------
00004     begin                : Son Nov 10 2002
00005     copyright            : (C) 2002 by Andre Simon
00006     email                : andre.simon1@gmx.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef DOCUMENTSTYLE_H
00019 #define DOCUMENTSTYLE_H
00020 
00021 #include <string>
00022 #include <iostream>
00023 #include "configurationreader.h"
00024 #include "elementstyle.h"
00025 #include "stylecolour.h"
00026 
00027 using namespace std;
00028 
00029 namespace highlight {
00030 
00032 typedef map <string, ElementStyle*> KeywordStyles;
00033 
00035 typedef KeywordStyles::iterator KSIterator;
00036 
00042 class DocumentStyle
00043   {
00044   private:
00045     ElementStyle comment, slcomment, str, dstr,
00046                  escapeChar, number, directive, line, symbol;
00047     ElementStyle defaultElem;
00048     StyleColour  bgColour;
00049 
00050     string fontsize;
00051     bool fileFound;
00052 
00053     KeywordStyles keywordStyles;
00054 
00055   public:
00058     DocumentStyle(const string & styleDefinitionPath);
00059     DocumentStyle();
00060     ~DocumentStyle();
00061 
00065     bool load(const string & styleDefinitionFile);
00066 
00068     vector <string> getClassNames();
00069 
00071     KeywordStyles& getKeywordStyles();
00072 
00074     string &getFontSize();
00075 
00077     StyleColour& getBgColour();
00078 
00080     ElementStyle & getDefaultStyle() ;
00081 
00083     ElementStyle & getCommentStyle() ;
00084 
00086     ElementStyle& getSingleLineCommentStyle() ;
00087 
00089     ElementStyle & getKeywordStyle() ;
00090 
00092     ElementStyle & getStringStyle() ;
00093 
00095     ElementStyle & getDirectiveStringStyle() ;
00096 
00098     ElementStyle & getEscapeCharStyle() ;
00099 
00101     ElementStyle & getNumberStyle() ;
00102 
00104     ElementStyle & getDirectiveStyle() ;
00105 
00107     ElementStyle & getTypeStyle() ;
00108 
00110     ElementStyle & getLineStyle() ;
00111 
00113     ElementStyle & getSymbolStyle() ;
00114 
00119     ElementStyle & getKeywordStyle(const string &className);
00120 
00122     bool found() const ;
00123   };
00124 
00125 }
00126 
00127 #endif

Generated on Fri Apr 27 13:12:35 2007 for Highlight Code Converter by  doxygen 1.5.2