rtfstyle.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * $Id: $
00004  *
00005  *
00006  * Copyright (C) 1997-2008 by Dimitri van Heesch.
00007  *
00008  * Permission to use, copy, modify, and distribute this software and its
00009  * documentation under the terms of the GNU General Public License is hereby 
00010  * granted. No representations are made about the suitability of this software 
00011  * for any purpose. It is provided "as is" without express or implied warranty.
00012  * See the GNU General Public License for more details.
00013  *
00014  * Documents produced by Doxygen are derivative works derived from the
00015  * input used in their production; they are not affected by this license.
00016  *
00017  */
00018 
00019 #ifndef RTFSTYLE_H
00020 #define RTFSTYLE_H
00021 
00022 #include "qtbc.h"
00023 #include <qregexp.h>
00024 #include <qdict.h>
00025 
00026 // used for table column width calculation
00027 const int rtf_pageWidth = 8748;
00028 
00029 extern QCString rtf_title;
00030 extern QCString rtf_subject;
00031 extern QCString rtf_comments;
00032 extern QCString rtf_company;
00033 extern QCString rtf_logoFilename;
00034 extern QCString rtf_author;
00035 extern QCString rtf_manager;
00036 extern QCString rtf_documentType;
00037 extern QCString rtf_documentId;
00038 extern QCString rtf_keywords;
00039 
00040 struct RTFListItemInfo
00041 {
00042   bool isEnum;
00043   int number;
00044 };
00045 
00046 const int rtf_maxIndentLevels = 10;
00047 
00048 extern RTFListItemInfo rtf_listItemInfo[rtf_maxIndentLevels];
00049 
00050 struct Rtf_Style_Default
00051 {
00052   const char *name;
00053   const char *reference;
00054   const char *definition;
00055 };
00056 
00057 extern char rtf_Style_Reset[];
00058 extern Rtf_Style_Default rtf_Style_Default[];
00059 
00060 struct StyleData
00061 {
00062   // elements of this type are stored in dictionary Rtf_Style
00063   //
00064   // to define a tag in the header reference + definition is required
00065   // to use a tag in the body of the document only reference is required
00066 
00067   unsigned index;   // index in style-sheet, i.e. number in s-clause
00068   char* reference;  // everything required to apply the style
00069   char* definition; // aditional tags like \snext and style name
00070 
00071   StyleData(const char* reference, const char* definition);
00072   ~StyleData();
00073   bool setStyle(const char* s, const char* styleName);
00074 
00075   static const QRegExp s_clause;
00076 };
00077 
00078 extern QDict<StyleData> rtf_Style;
00079 
00080 void loadExtensions(const char *name);
00081 void loadStylesheet(const char *name, QDict<StyleData>& dict);
00082 
00083 #endif



Generated on Mon Mar 31 10:58:43 2008 by  doxygen 1.5.1