Subversion Repositories Scribus

Rev

Rev 5620 | Rev 5674 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
838 cbradney 7
#ifndef SCRIBUSSTRUCTS_H
8
#define SCRIBUSSTRUCTS_H
9
 
10
#ifdef HAVE_CONFIG_H
2688 craig 11
#include "scconfig.h"
838 cbradney 12
#endif
13
 
14
#include <qvaluestack.h>
15
#include <qvaluelist.h>
1429 subik 16
#include <qvaluevector.h>
838 cbradney 17
#include <qstring.h>
1208 cbradney 18
#include <qaction.h>
3933 avox 19
#include <qkeysequence.h>
839 cbradney 20
#include <vector>
838 cbradney 21
 
3878 cbradney 22
#include "sctextstruct.h"
838 cbradney 23
#include "scfonts.h"
24
#include "fpointarray.h"
25
#include "vgradient.h"
4084 cbradney 26
#include "annotation.h"
838 cbradney 27
#include "pageitem.h"
28
 
1065 cbradney 29
struct CopyPasteBuffer
1429 subik 30
{
1460 cbradney 31
        PageItem::ItemType PType;
844 fschmid 32
        double Xpos;
33
        double Ypos;
34
        double Width;
35
        double Height;
36
        double RadRect;
37
        int FrameType;
38
        bool ClipEdited;
39
        double Pwidth;
40
        QString Pcolor;
41
        QString Pcolor2;
42
        int Shade;
43
        int Shade2;
44
        QString GrColor;
45
        QString GrColor2;
46
        int GrShade;
47
        int GrShade2;
48
        VGradient fill_gradient;
49
        int GrType;
50
        double GrStartX;
51
        double GrStartY;
52
        double GrEndX;
53
        double GrEndY;
54
        QString TxtStroke;
55
        QString TxtFill;
56
        int ShTxtStroke;
57
        int ShTxtFill;
58
        int TxtScale;
2230 fschmid 59
        int TxtScaleV;
844 fschmid 60
        int TxTStyle;
2234 fschmid 61
        int TxTBase;
2247 fschmid 62
        int TxtShadowX;
63
        int TxtShadowY;
2257 fschmid 64
        int TxtOutline;
2262 fschmid 65
        int TxtUnderPos;
66
        int TxtUnderWidth;
2272 fschmid 67
        int TxtStrikePos;
68
        int TxtStrikeWidth;
844 fschmid 69
        double Rot;
70
        int PLineArt;
71
        int PLineJoin;
72
        int PLineEnd;
73
        double LineSp;
2309 fschmid 74
        int LineSpMode;
2382 fschmid 75
        int ExtraV;
844 fschmid 76
        double LocalScX;
77
        double LocalScY;
78
        double LocalX;
79
        double LocalY;
80
        bool PicArt;
1392 cbradney 81
        bool flippedH;
82
        bool flippedV;
844 fschmid 83
        bool isPrintable;
84
        bool isBookmark;
4084 cbradney 85
        bool m_isAnnotation;
86
        Annotation m_annotation;
87
        QString AnName;
844 fschmid 88
        double Extra;
89
        double TExtra;
90
        double BExtra;
91
        double RExtra;
92
        QString Pfile;
93
        QString Pfile2;
94
        QString Pfile3;
95
        QString IProfile;
96
        QString EmProfile;
97
        int IRender;
98
        bool UseEmbedded;
1065 cbradney 99
        QString itemText;
844 fschmid 100
        QPointArray Clip;
101
        FPointArray PoLine;
102
        FPointArray ContourLine;
103
        bool PoShow;
104
        double BaseOffs;
5620 jghali 105
        int TextflowMode;
1065 cbradney 106
        int textAlignment;
844 fschmid 107
        QString IFont;
108
        int ISize;
109
        QValueStack<int> Groups;
110
        int LayerNr;
111
        bool ScaleType;
112
        bool AspectRatio;
113
        bool Locked;
114
        bool LockRes;
115
        double Transparency;
116
        double TranspStroke;
117
        bool Reverse;
118
        QString NamedLStyle;
119
        QString Language;
120
        QString guiLanguage;
121
        int Cols;
122
        double ColGap;
5184 avox 123
        QValueList<ParagraphStyle::TabRecord> TabValues;
844 fschmid 124
        QValueList<double> DashValues;
125
        double DashOffset;
126
        bool isTableItem;
127
        bool TopLine;
128
        bool LeftLine;
129
        bool RightLine;
130
        bool BottomLine;
131
        int LeftLinkID;
132
        int RightLinkID;
133
        int TopLinkID;
134
        int BottomLinkID;
135
        int startArrowIndex;
136
        int endArrowIndex;
1655 cbradney 137
        ObjAttrVector pageItemAttributes;
844 fschmid 138
};
838 cbradney 139
 
4579 cbradney 140
struct CopyContentsBuffer
141
{
142
        PageItem::ItemType sourceType;
143
        QString contentsFileName;
144
        double LocalScX;
145
        double LocalScY;
146
        double LocalX;
147
        double LocalY;
4831 cbradney 148
        double ItemX;
149
        double ItemY;
4581 cbradney 150
        QString inputProfile;
151
        bool useEmbedded;
152
        int renderingIntent;
4579 cbradney 153
};
154
 
5087 subik 155
/** \brief Pagemargins */
1065 cbradney 156
struct MarginStruct
1429 subik 157
{
3987 craig 158
        MarginStruct() : Top(0), Left(0), Bottom(0), Right(0) {}
159
        MarginStruct(double top, double left, double bottom, double right) :
160
                Top(top), Left(left), Bottom(bottom), Right(right) {}
844 fschmid 161
        double Top;
162
        double Left;
3987 craig 163
        double Bottom;
844 fschmid 164
        double Right;
165
};
838 cbradney 166
 
3016 fschmid 167
struct PageSet
168
{
169
        QString Name;
170
        int FirstPage;
171
        int Rows;
172
        int Columns;
173
        double GapHorizontal;
174
        double GapVertical;
175
        double GapBelow;
3026 fschmid 176
        QStringList pageNames;
3016 fschmid 177
};
178
 
1065 cbradney 179
struct CMSData
844 fschmid 180
{
181
        QString DefaultMonitorProfile;
182
        QString DefaultPrinterProfile;
2984 fschmid 183
        QString DefaultImageRGBProfile;
184
        QString DefaultImageCMYKProfile;
5345 mrdocs 185
        QString DefaultSolidColorRGBProfile;
186
        QString DefaultSolidColorCMYKProfile;
844 fschmid 187
        int ComponentsInput2;
5345 mrdocs 188
        int ComponentsInput3;
844 fschmid 189
        int ComponentsPrinter;
2984 fschmid 190
        int DefaultIntentImages;
5345 mrdocs 191
        int DefaultIntentColors;
844 fschmid 192
        bool CMSinUse;
193
        bool SoftProofOn;
5345 mrdocs 194
        bool SoftProofFullOn;
844 fschmid 195
        bool GamutCheck;
196
        bool BlackPoint;
197
} ;
838 cbradney 198
 
1065 cbradney 199
struct SingleLine
1429 subik 200
{
844 fschmid 201
        double Width;
202
        int Dash;
203
        int LineEnd;
204
        int LineJoin;
205
        QString Color;
206
        int Shade;
207
};
838 cbradney 208
 
1065 cbradney 209
struct ArrowDesc
844 fschmid 210
{
211
        QString name;
212
        bool userArrow;
213
        FPointArray points;
214
};
838 cbradney 215
 
844 fschmid 216
struct Layer
1429 subik 217
{
844 fschmid 218
        int LNr;
219
        int Level;
5572 fschmid 220
        int blendMode;
1065 cbradney 221
        bool isPrintable;
222
        bool isViewable;
4832 fschmid 223
        bool isEditable;
5359 fschmid 224
        bool flowControl;
5572 fschmid 225
        bool outlineMode;
5373 fschmid 226
        double transparency;
5572 fschmid 227
        QColor markerColor;
228
        QString Name;
844 fschmid 229
};
838 cbradney 230
 
1065 cbradney 231
struct PDFPresentationData
1429 subik 232
{
1065 cbradney 233
        int pageEffectDuration;
234
        int pageViewDuration;
235
        int effectType;
844 fschmid 236
        int Dm;
237
        int M;
238
        int Di;
239
};
838 cbradney 240
 
1065 cbradney 241
struct LPIData
1429 subik 242
{
844 fschmid 243
        int Frequency;
244
        int Angle;
245
        int SpotFunc;
246
};
838 cbradney 247
 
844 fschmid 248
struct Keys
1429 subik 249
{
1230 cbradney 250
        QString actionName;
1392 cbradney 251
        QString cleanMenuText;
3933 avox 252
        QKeySequence keySequence;
1392 cbradney 253
        int tableRow;
5352 cbradney 254
        QString menuName;
255
        int menuPos;
844 fschmid 256
};
838 cbradney 257
 
1429 subik 258
struct PrintOptions
844 fschmid 259
{
838 cbradney 260
        QString printer;
261
        QString filename;
262
        bool toFile;
263
        bool useAltPrintCommand;
264
        QString printerCommand;
265
        int PSLevel;
266
        bool outputSeparations;
267
        QString separationName;
3068 fschmid 268
        QStringList allSeparations;
269
        bool useSpotColors;
838 cbradney 270
        bool useColor;
271
        bool mirrorH;
272
        bool mirrorV;
273
        bool useICC;
274
        bool doGCR;
4649 fschmid 275
        bool doClip;
1861 fschmid 276
        bool setDevParam;
5308 fschmid 277
        bool doOverprint;
838 cbradney 278
        int copies;
279
        std::vector<int> pageNumbers;
280
        QString printerOptions;
281
};
282
 
844 fschmid 283
typedef QMap<QString,QString> ProfilesL;
1065 cbradney 284
typedef QValueVector<SingleLine> multiLine;
1460 cbradney 285
 
4512 cbradney 286
 
287
typedef enum {
288
        MissingGlyph=1,
289
        TextOverflow=2,
290
        ObjectNotOnPage=3,
291
        MissingImage=4,
292
        ImageDPITooLow=5,
293
        Transparency=6,
294
        PDFAnnotField=7,
5239 fschmid 295
        PlacedPDF=8,
5269 subik 296
        ImageDPITooHigh=9,
297
        ImageIsGIF=10
4512 cbradney 298
} PreflightError;
299
 
300
typedef QMap<PreflightError, int> errorCodes;
301
 
1065 cbradney 302
enum AppMode
303
{
2603 cbradney 304
        modeNormal,
305
        modeDrawShapes,
306
        modeStoryEditor,
307
        modeDrawPicture,
308
        modeDrawText,
309
        modeMagnifier,
310
        modeEdit,
311
        modeDrawLine,
312
        modeRotation,
313
        modeLinkFrames,
314
        modeUnlinkFrames,
315
        modeDrawRegularPolygon,
316
        modeDrawBezierLine,
317
        modeInsertPDFButton,
318
        modeInsertPDFTextfield,
319
        modeInsertPDFCheckbox,
320
        modeInsertPDFCombobox,
321
        modeInsertPDFListbox,
322
        modeInsertPDFTextAnnotation,
323
        modeInsertPDFLinkAnnotation,
324
        modeDrawFreehandLine,
325
        modeDrawTable,
326
        modePanning,
327
        modeMeasurementTool,
328
        modeEditGradientVectors,
329
        modeEyeDropper,
330
        modeCopyProperties
1065 cbradney 331
};
844 fschmid 332
 
2355 cbradney 333
struct AlignObjs
334
{
335
        int ObjNr;
336
        int Group;
337
        double x1;
338
        double y1;
339
        double x2;
340
        double y2;
2380 cbradney 341
        double width;
342
        double height;
2355 cbradney 343
        QPtrList<PageItem> Objects;
344
};
1641 cbradney 345
 
5087 subik 346
/*! \brief Human readable orientations */
3071 subik 347
enum PageOrientation
348
{
349
        portraitPage = 0,
350
        landscapePage = 1,
351
        customPage = 30
352
};
353
 
5087 subik 354
//! \brief Common type for guides list
355
typedef QValueList<double> Guides;
356
 
5642 cbradney 357
//! \brief from ols scribusXml
358
struct Linked
359
{
360
        int Start;
361
        int StPag;
362
};
363
 
364
// this is a quick hack to combine runs until I've thought of something better -- AV
365
class LastStyles {
366
public:
367
        CharStyle Style;
368
        int StyleStart;
369
        int ParaStyle;
370
        LastStyles() {
371
                StyleStart = 0;
372
                ParaStyle = -1;
373
        }
374
};
375
 
838 cbradney 376
#endif