kword/latex/export/table.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_TABLE_H__
24#define __KWORD_TABLE_H__
25
26#include <tqstring.h>
27#include <tqptrlist.h>
28#include "element.h" /* Child class */
29#include "layout.h" /* Cell flow */
30
31/***********************************************************************/
32/* Class: Table */
33/***********************************************************************/
34
40class Table: public TQPtrList<Element>, public Element
41{
42 /* MARKUP DATA */
43 //TQString _name;
44 //TQString _grpMgr;
45
46 /* USEFULL DATA */
47 int _maxRow, _maxCol; /* Size of the table (nb of cell) */
48
49 public:
64 Table(TQString grpMng);
65
66 /*
67 * Destructor
68 *
69 * The destructor must remove the list of frames.
70 */
71
72 virtual ~Table();
73
78 //TQString getName () const { return _name; }
79 //TQString getGrpMgr() const { return _grpMgr; }
80 int getMaxRow() const { return _maxRow; }
81 int getMaxCol() const { return _maxCol; }
82
83 EEnv getCellFlow (int);
84 double getCellSize (int);
85
89 void setMaxRow(int r) { _maxRow = r; }
90 void setMaxCol(int c) { _maxCol = c; }
91
95 Element* searchCell(int, int);
96 void append (Element*);
97 void generate (TQTextStream&);
98
99 private:
100 void generateCell(TQTextStream&, int, int);
101 void generateTableHeader(TQTextStream&);
102 void generateTopLineBorder(TQTextStream&, int);
103 void generateBottomLineBorder(TQTextStream&, int);
104};
105
106#endif /* __KWORD_TABLE_H__ */
107
This class is a element.
This class hold a table.
Table()
Constructors.
Element * searchCell(int, int)
Helpfull functions.
int getMaxRow() const
Accessors.
void setMaxRow(int r)
Modifiers.