"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/src/include/texgenerator.h" (12 May 2020, 2472 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /***************************************************************************
    2                           texcode.h  -  description
    3                              -------------------
    4     begin                : Mit Jul 24 2002
    5     copyright            : (C) 2002 by Andr�Simon
    6     email                : a.simon@mailbox.org
    7  ***************************************************************************/
    8 
    9 
   10 /*
   11 This file is part of Highlight.
   12 
   13 Highlight is free software: you can redistribute it and/or modify
   14 it under the terms of the GNU General Public License as published by
   15 the Free Software Foundation, either version 3 of the License, or
   16 (at your option) any later version.
   17 
   18 Highlight is distributed in the hope that it will be useful,
   19 but WITHOUT ANY WARRANTY; without even the implied warranty of
   20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   21 GNU General Public License for more details.
   22 
   23 You should have received a copy of the GNU General Public License
   24 along with Highlight.  If not, see <http://www.gnu.org/licenses/>.
   25 */
   26 
   27 
   28 #ifndef TEXGENERATOR_H
   29 #define TEXGENERATOR_H
   30 
   31 #include <string>
   32 
   33 #include "codegenerator.h"
   34 
   35 
   36 namespace highlight
   37 {
   38 
   39 /**
   40    \brief This class generates TeX.
   41 
   42    It contains information about the resulting document structure (document
   43    header and footer), the colour system, white space handling and text
   44    formatting attributes.
   45 
   46 * @author Andre Simon
   47 */
   48 
   49 class TexGenerator : public highlight::CodeGenerator
   50 {
   51 public:
   52 
   53     TexGenerator();
   54     ~TexGenerator();
   55 
   56 private:
   57 
   58     /** prints document header
   59      */
   60     string getHeader();
   61 
   62     /** Prints document footer*/
   63     string getFooter();
   64 
   65     /** Prints document body*/
   66     void printBody();
   67 
   68     /** initialize tags in specific format according to colouring information provided in DucumentStyle */
   69     void initOutputTags();
   70 
   71     string styleDefinitionCache;
   72 
   73     string getStyleDefinition();
   74 
   75     /** \return escaped character*/
   76     virtual string maskCharacter ( unsigned char );
   77 
   78     /**\return text formatting attributes in RTF format */
   79     string getAttributes ( const string & elemName, const ElementStyle & elem );
   80 
   81     /** @param styleID current style ID
   82         @return matching sequence to begin a new element formatting*/
   83     string getKeywordOpenTag ( unsigned int styleID );
   84 
   85     /** @param styleID current style ID
   86         @return matching  sequence to stop element formatting*/
   87     string getKeywordCloseTag ( unsigned int styleID );
   88 
   89 };
   90 
   91 }
   92 
   93 #endif