textzone.h
1/* A TEXT ZONE IS SOME WORDS WITH A SPECIAL STYLE (ITALIC, ...).
2 * IT'S NOT USE FOR TITLE (BUT IN THE FUTURE IT WILL BE USED FOR)
3 * OR FOR SPECIAL PARAG.
4 */
5/*
6** Header file for inclusion with kword_xml2latex.c
7**
8** Copyright (C) 2000, 2002 Robert JACOLIN
9**
10** This library is free software; you can redistribute it and/or
11** modify it under the terms of the GNU Library General Public
12** License as published by the Free Software Foundation; either
13** version 2 of the License, or (at your option) any later version.
14**
15** This library is distributed in the hope that it will be useful,
16** but WITHOUT ANY WARRANTY; without even the implied warranty of
17** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18** Library General Public License for more details.
19**
20** To receive a copy of the GNU Library General Public License, write to the
21** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23**
24*/
25
26#ifndef __KWORD_LATEX_TEXTZONE_H__
27#define __KWORD_LATEX_TEXTZONE_H__
28
29#include <tqtextstream.h>
30#include <tqstring.h>
31#include "textformat.h"
32
33/***********************************************************************/
34/* Class: TextZone */
35/***********************************************************************/
36
40class TextZone: public TextFormat
41{
42 /* TEXT MARKUP */
43 TQString _texte;
44
45 public:
46 /* === Constructors ==== */
47
53 TextZone(Para *para = 0);
61 TextZone(TQString text, Para *para = 0);
62
63 /*
64 * Destructor
65 *
66 */
67 virtual ~TextZone();
68
69 /* ==== Getters ==== */
74 bool useFormat() const;
75 TQString getTexte() const { return _texte; }
76
77 /* ==== Setters ==== */
78
79 void setTexte(TQString texte) { _texte = texte; }
80
81 /* ==== Helpfull functions ==== */
82
86 TQString escapeLatin1(TQString);
87
88 void analyse(const TQDomNode);
89 void analyse();
90 virtual void generate(TQTextStream&);
91
92 void generate_format_begin(TQTextStream &);
93 void generate_format_end(TQTextStream &);
94
95 protected:
96 void display(TQString, TQTextStream&);
97
98 private:
102 void convert(TQString&, int, const char*);
103};
104
105
106TQString convertSpecialChar(int);
107
108#endif /* __KWORD_LATEX_TEXTZONE_H__ */
This class hold a real paragraph.
Definition para.h:59
This class holds information formating the textzone.
Definition textformat.h:70
This class hold a zone of text with only one formating.
Definition textzone.h:41
TQString escapeLatin1(TQString)
convert a unicode text in latin1 enconding ala latex.
Definition textzone.cpp:91
bool useFormat() const
Definition textzone.cpp:80
void analyse(const TQDomNode)
Helpfull functions.
Definition textzone.cpp:282