filters

export/element.h
1
2/*
3** Header file for inclusion with kword_xml2latex.c
4**
5** Copyright (C) 2000 Robert JACOLIN
6**
7** This library is free software; you can redistribute it and/or
8** modify it under the terms of the GNU Library General Public
9** License as published by the Free Software Foundation; either
10** version 2 of the License, or (at your option) any later version.
11**
12** This library is distributed in the hope that it will be useful,
13** but WITHOUT ANY WARRANTY; without even the implied warranty of
14** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15** Library General Public License for more details.
16**
17** To receive a copy of the GNU Library General Public License, write to the
18** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20**
21*/
22
23#ifndef __KWORD_ELEMENT_H__
24#define __KWORD_ELEMENT_H__
25
26#include <tqtextstream.h>
27#include "xmlparser.h"
28#include "border.h"
29
30/* FRAMESET */
31enum SType
32{
33 ST_NONE,
34 ST_TEXT,
35 ST_PICTURE,
36 ST_PART, /* This last Type mustn't be */
37 ST_FORMULA, /* displayed where they are. */
38 ST_CLIPART,
39 ST_HLINE
40};
41
42enum SSect
43{
44 SS_NONE,
45 SS_HEADERS,
46 SS_FOOTERS,
47 SS_BODY,
48 SS_FOOTNOTES,
49 SS_TABLE
50};
51
52enum SInfo
53{
54 SI_NONE,
55 SI_FIRST,
56 SI_ODD,
57 SI_EVEN
58};
59
60/* FRAME */
61enum TAround
62{
63 TA_NONE,
64 TA_FRAME,
65 TA_TEXT
66};
67
68enum TCreate
69{
70 TC_EXTEND,
71 TC_CREATE,
72 TC_IGNORE
73};
74
75enum TNFrame
76{
77 TF_RECONNECT,
78 TF_NOCREATION,
79 TF_COPY
80};
81
82enum TSide
83{
84 TS_ANYSIDE,
85 TS_ODDPAGE,
86 TS_EVENPAGE
87};
88
89/***********************************************************************/
90/* Class: Element */
91/***********************************************************************/
92
97class Element: public XmlParser, public Border
98{
99 /* FRAMESET PARAM */
100 SType _type;
101 SSect _section;
102 SInfo _hinfo;
103 TQString _name;
104 bool _removable;
105 bool _visible;
106 TQString _grpMgr;
107 int _row,
108 _col,
109 _rows,
110 _cols;
111
112 /* USEFULL DATA */
113
114 public:
121 Element();
122
123 /*
124 * Destructor
125 *
126 */
127 virtual ~Element();
128
129 /*virtual bool hasColor() const = 0;
130 virtual bool hasUline() const = 0;*/
134 SSect getSection () const { return _section; }
135 SType getType () const { return _type; }
136 SInfo getInfo () const { return _hinfo; }
137 TQString getName () const { return _name; }
138 bool isVisible () const { return _visible; }
139 bool isRemovable() const { return _removable; }
140 TQString getGrpMgr () const { return _grpMgr; }
141 int getRow () const { return _row; }
142 int getCol () const { return _col; }
143 int getRows () const { return _rows; }
144 int getCols () const { return _cols; }
145 bool isTable () const { return (_section == SS_TABLE); }
146
150 void setType (SType t) { _type = t; }
151 void setSection (SSect s) { _section = s; }
152 void setVisible (bool v) { _visible = v; }
153 void setRemovable(bool r) { _removable = r; }
154 void setGrpMgr (TQString g) { _grpMgr = g; }
155 void setRow (int r) { _row = r; }
156 void setCol (int c) { _col = c; }
157 void setRows (int r) { _rows = r; }
158 void setCols (int c) { _cols = c; }
159
163
168 virtual void analyse(const TQDomNode);
169 virtual void generate(TQTextStream&) = 0;
170
171 private:
172 void analyseParam(const TQDomNode);
173};
174
175#endif /* __KWORD_ELEMENT_H__ */
Border()
Constructors.
Definition border.h:59
void setType(SType t)
Modifiors.
SSect getSection() const
Accessors.
Element()
Constructors.
virtual void analyse(const TQDomNode)
Helpfull functions.