filters

border.h
1/* A TEXT IS A SET OF TITLES, A (SET OF) PARAGRAPHS OR LISTS */
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_LATEXBORDER_H__
24#define __KWORD_LATEXBORDER_H__
25
26/***********************************************************************/
27/* Class: Border */
28/***********************************************************************/
29
34class Border
35{
36 /* DATA MARKUP */
37 int _lWidth, _rWidth, _tWidth, _bWidth;
38 int _lRed, _lGreen, _lBlue;
39 int _rRed, _rGreen, _rBlue;
40 int _tRed, _tGreen, _tBlue;
41 int _bRed, _bGreen, _bBlue;
42 int _lStyle , _rStyle, _tStyle, _bStyle;
43 int _bkRed, _bkGreen, _bkBlue;
44 int _bleftpt, _brightpt, _btoppt, _bbottompt;
45
46 /* USEFULL DATA */
47 bool _hasLeftBorder;
48 bool _hasRightBorder;
49 bool _hasTopBorder;
50 bool _hasBottomBorder;
51
52 public:
60 {
61 _hasLeftBorder = false;
62 _hasRightBorder = false;
63 _hasTopBorder = false;
64 _hasBottomBorder = false;
65 _lWidth = 0,
66 _rWidth = 0;
67 _tWidth = 0;
68 _bWidth = 0;
69 _lRed = 0;
70 _lGreen = 0;
71 _lBlue = 0;
72 _rRed = 0;
73 _rGreen = 0;
74 _rBlue = 0;
75 _tRed = 0;
76 _tGreen = 0;
77 _tBlue = 0;
78 _bRed = 0;
79 _bGreen = 0;
80 _bBlue = 0;
81 _lStyle = 0;
82 _rStyle = 0;
83 _tStyle = 0;
84 _bStyle = 0;
85 _bkRed = 0;
86 _bkGreen = 0;
87 _bkBlue = 0;
88 _bleftpt = 0;
89 _brightpt = 0;
90 _btoppt = 0;
91 _bbottompt = 0;
92 }
93
94 /*
95 * Destructor
96 *
97 * The destructor must remove the list of parag and footnotes.
98 */
99 virtual ~Border() {}
100
104
105 bool hasLeftBorder () const { return _hasLeftBorder; }
106 bool hasRightBorder () const { return _hasRightBorder; }
107 bool hasTopBorder () const { return _hasTopBorder; }
108 bool hasBottomBorder() const { return _hasBottomBorder; }
109 int getLeftWidth () const { return _lWidth; }
110 int getRightWidth () const { return _rWidth; }
111 int getTopWidth () const { return _tWidth; }
112 int getBottomWidth () const { return _bWidth; }
113 int getLeftRed () const { return _lRed; }
114 int getLeftGreen () const { return _lGreen; }
115 int getLeftBlue () const { return _lBlue; }
116 int getRightRed () const { return _rRed; }
117 int getRightGreen () const { return _rGreen; }
118 int getRightBlue () const { return _rBlue; }
119 int getTopRed () const { return _tRed; }
120 int getTopGreen () const { return _tGreen; }
121 int getTopBlue () const { return _tBlue; }
122 int getBottomRed () const { return _bRed; }
123 int getBottomGreen () const { return _bGreen; }
124 int getBottomBlue () const { return _bBlue; }
125 int getLeftStyle () const { return _lStyle; }
126 int getRightStyle () const { return _rStyle; }
127 int getTopStyle () const { return _tStyle; }
128 int getBottomStyle () const { return _bStyle; }
129 int getBkRed () const { return _bkRed; }
130 int getBkGreen () const { return _bkGreen; }
131 int betBkBlue () const { return _bkBlue; }
132/* int bleftpt () const { return _bleftpt; }
133 int brightpt () const { return _brightpt; }
134 int btoppt () const { return _btoppt; }
135 int bbottompt () const { return _bbottompt; }
136*/
137
141 void useLeftBorder () { _hasLeftBorder = true; }
142 void useRightBorder () { _hasRightBorder = true; }
143 void useTopBorder () { _hasTopBorder = true; }
144 void useBottomBorder() { _hasBottomBorder = true; }
145
146 void setLeftWidth (const int w) { _lWidth = w; }
147 void setRightWidth (const int w) { _rWidth = w; }
148 void setTopWidth (const int w) { _tWidth = w; }
149 void setBottomWidth(const int w) { _bWidth = w; }
150
151 void setLeftRed (const int r) { _lRed = r; }
152 void setLeftGreen (const int g) { _lGreen = g; }
153 void setLeftBlue (const int b) { _lBlue = b; }
154 void setRightRed (const int r) { _rRed = r; }
155 void setRightGreen (const int g) { _rGreen = g; }
156 void setRightBlue (const int b) { _rBlue = b; }
157 void setTopRed (const int r) { _tRed = r; }
158 void setTopGreen (const int g) { _tGreen = g; }
159 void setTopBlue (const int b) { _tBlue = b; }
160 void setBottomRed (const int r) { _bRed = r; }
161 void setBottomGreen(const int g) { _bGreen = g; }
162 void setBottomBlue (const int b) { _bBlue = b; }
163
164 void setLeftStyle (const int l) { _lStyle = l; }
165 void setRightStyle (const int r) { _rStyle = r; }
166 void setTopStyle (const int t) { _tStyle = t; }
167 void setBottomStyle(const int b) { _bStyle = b; }
168
169 void setBkRed (const int r) { _bkRed = r; }
170 void setBkGreen (const int g) { _bkGreen = g; }
171 void setBkBlue (const int b) { _bkBlue = b; }
172/* void setBLeftPt (const int l) { _bkLeftPt = l; }
173 void setBRightPt (const int r) { _bkRightPt = r; }
174 void setBTopPt (const int t) { _bkTopPt = t; }
175 void setBBottomPt (const int b) { _bkBottomPt = b; }
176*/
177
181 void generate(TQTextStream&);
182
183 private:
184};
185
186#endif /* __KWORD_LATEXBORDER_H__ */
187
This class hold 2 lists of paragraphs for the text and for the footnotes.
Definition border.h:35
Border()
Constructors.
Definition border.h:59
bool hasLeftBorder() const
Accessors.
Definition border.h:105
void generate(TQTextStream &)
Write a border frame.
void useLeftBorder()
Modifiors.
Definition border.h:141