~ubuntu-branches/ubuntu/warty/koffice/warty

« back to all changes in this revision

Viewing changes to kword/filters/mif/treebuild_textrect.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: treebuild_textrect.h,v 1.5 1999/10/20 10:29:29 kulow Exp $
2
 
 *
3
 
 * This file is part of MIFParse, a MIF parser for Unix.
4
 
 *
5
 
 * Copyright (C) 1998 by Matthias Kalle Dalheimer <kalle@dalheimer.de>
6
 
 */
7
 
 
8
 
#ifndef _TREEBUILD_TEXTRECT_H
9
 
#define _TREEBUILD_TEXTRECT_H
10
 
 
11
 
#include <qlist.h>
12
 
#include <qstring.h>
13
 
 
14
 
class ShapeRect;
15
 
class BRect;
16
 
class Angle;
17
 
class DashedPattern;
18
 
class FrameID;
19
 
class Unique;
20
 
class Pen;
21
 
class PenWidth;
22
 
class Fill;
23
 
class Separation;
24
 
class ObColor;
25
 
class RunAroundType;
26
 
class RunAroundGap;
27
 
 
28
 
class TRNumColumns
29
 
{
30
 
public:
31
 
        TRNumColumns( int value );
32
 
 
33
 
private:
34
 
        int _value;
35
 
};
36
 
 
37
 
 
38
 
class TRColumnGap
39
 
{
40
 
public:
41
 
        TRColumnGap( double value, const char* unit );
42
 
 
43
 
private:
44
 
        double _value;
45
 
};
46
 
 
47
 
 
48
 
 
49
 
class TRColumnBalance
50
 
{
51
 
public:
52
 
        TRColumnBalance( const char* value );
53
 
 
54
 
private:
55
 
        bool _value;
56
 
};
57
 
 
58
 
 
59
 
 
60
 
class TRSideheadWidth
61
 
{
62
 
public:
63
 
        TRSideheadWidth( double value, const char* unit );
64
 
 
65
 
private:
66
 
        double _value;
67
 
};
68
 
 
69
 
 
70
 
class TRSideheadGap
71
 
{
72
 
public:
73
 
        TRSideheadGap( double value, const char* unit );
74
 
 
75
 
private:
76
 
        double _value;
77
 
};
78
 
 
79
 
 
80
 
class TRSideheadPlacement
81
 
{
82
 
public:
83
 
        TRSideheadPlacement( const char* value );
84
 
 
85
 
private:
86
 
        QString _value;
87
 
};
88
 
 
89
 
 
90
 
 
91
 
class TRNext
92
 
{
93
 
public:
94
 
        TRNext( int value );
95
 
 
96
 
private:
97
 
        int _value;
98
 
};
99
 
 
100
 
 
101
 
 
102
 
 
103
 
 
104
 
class TextRectElement
105
 
{
106
 
public:
107
 
        enum TextRectElementType { T_ShapeRect, T_BRect, T_TRNext, T_TRNumColumns,
108
 
                                                           T_TRColumnGap, T_TRColumnBalance, 
109
 
                                                           T_TRSideheadWidth, T_TRSideheadGap,
110
 
                                                           T_TRSideheadPlacement, T_FrameID, T_Unique,
111
 
                                                           T_Pen, T_PenWidth, T_Separation, T_ObColor,
112
 
                                                           T_Fill, T_DashedPattern, T_Angle,
113
 
                                                           T_RunAroundGap, T_RunAroundType };
114
 
 
115
 
        TextRectElement( ShapeRect* element );
116
 
        TextRectElement( BRect* element );
117
 
        TextRectElement( TRNext* element );
118
 
        TextRectElement( TRNumColumns* element );
119
 
        TextRectElement( TRColumnGap* element );
120
 
        TextRectElement( TRColumnBalance* element );
121
 
        TextRectElement( TRSideheadWidth* element );
122
 
        TextRectElement( TRSideheadGap* element );
123
 
        TextRectElement( TRSideheadPlacement* element );
124
 
        TextRectElement( FrameID* element );
125
 
        TextRectElement( Unique* element );
126
 
        TextRectElement( Fill* element );
127
 
        TextRectElement( Pen* element );
128
 
        TextRectElement( PenWidth* element );
129
 
        TextRectElement( Separation* element );
130
 
        TextRectElement( ObColor* element );
131
 
        TextRectElement( DashedPattern* element );
132
 
        TextRectElement( Angle* element );
133
 
        TextRectElement( RunAroundType* element );
134
 
        TextRectElement( RunAroundGap* element );
135
 
 
136
 
        TextRectElementType type() const { return _type; }
137
 
 
138
 
        FrameID* frameID() const { return _type == T_FrameID ? 
139
 
                                                                   _frameid : 0; } 
140
 
        BRect* bRect() const { return _type == T_BRect ? _brect : 0; }
141
 
 
142
 
private:
143
 
        TextRectElementType _type;
144
 
        union {
145
 
                ShapeRect* _shaperect;
146
 
                BRect* _brect;
147
 
                TRNext* _trnext;
148
 
                TRNumColumns* _trnumcolumns;
149
 
                TRColumnGap* _trcolumngap;
150
 
                TRColumnBalance* _trcolumnbalance;
151
 
                TRSideheadWidth* _trsideheadwidth;
152
 
                TRSideheadGap* _trsideheadgap;
153
 
                TRSideheadPlacement* _trsideheadplacement;
154
 
                FrameID* _frameid;
155
 
                Unique* _unique;
156
 
                Fill* _fill;
157
 
                Pen* _pen;
158
 
                PenWidth* _penwidth;
159
 
                Separation* _separation;
160
 
                ObColor* _obcolor;
161
 
                DashedPattern* _dashedpattern;
162
 
                Angle* _angle;
163
 
                RunAroundGap* _runaroundgap;
164
 
                RunAroundType* _runaroundtype;
165
 
        };
166
 
};
167
 
 
168
 
 
169
 
typedef QList<TextRectElement> TextRectElementList;
170
 
 
171
 
class TextRect
172
 
{
173
 
public:
174
 
        TextRect( TextRectElementList* elements );
175
 
 
176
 
        TextRectElementList* elements() const { return _elements; }
177
 
        int id();
178
 
        BRect* bRect();
179
 
 
180
 
private:
181
 
        TextRectElementList* _elements;
182
 
};
183
 
 
184
 
typedef QList<TextRect> TextRectList;
185
 
 
186
 
 
187
 
#endif