Subversion Repositories Scribus

Rev

Rev 5746 | Rev 6369 | 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;
5746 fschmid 117
        int TransBlend;
118
        int TransBlendS;
844 fschmid 119
        bool Reverse;
120
        QString NamedLStyle;
121
        QString Language;
122
        QString guiLanguage;
123
        int Cols;
124
        double ColGap;
5184 avox 125
        QValueList<ParagraphStyle::TabRecord> TabValues;
844 fschmid 126
        QValueList<double> DashValues;
127
        double DashOffset;
128
        bool isTableItem;
129
        bool TopLine;
130
        bool LeftLine;
131
        bool RightLine;
132
        bool BottomLine;
133
        int LeftLinkID;
134
        int RightLinkID;
135
        int TopLinkID;
136
        int BottomLinkID;
137
        int startArrowIndex;
138
        int endArrowIndex;
1655 cbradney 139
        ObjAttrVector pageItemAttributes;
844 fschmid 140
};
838 cbradney 141
 
4579 cbradney 142
struct CopyContentsBuffer
143
{
144
        PageItem::ItemType sourceType;
145
        QString contentsFileName;
146
        double LocalScX;
147
        double LocalScY;
148
        double LocalX;
149
        double LocalY;
4831 cbradney 150
        double ItemX;
151
        double ItemY;
4581 cbradney 152
        QString inputProfile;
153
        bool useEmbedded;
154
        int renderingIntent;
4579 cbradney 155
};
156
 
5087 subik 157
/** \brief Pagemargins */
1065 cbradney 158
struct MarginStruct
1429 subik 159
{
3987 craig 160
        MarginStruct() : Top(0), Left(0), Bottom(0), Right(0) {}
161
        MarginStruct(double top, double left, double bottom, double right) :
162
                Top(top), Left(left), Bottom(bottom), Right(right) {}
844 fschmid 163
        double Top;
164
        double Left;
3987 craig 165
        double Bottom;
844 fschmid 166
        double Right;
167
};
838 cbradney 168
 
5789 cbradney 169
struct DocPagesSetup
170
{
171
        DocPagesSetup() : pageArrangement(0), firstPageLocation(0), firstPageNumber(0), orientation(0), autoTextFrames(false), columnDistance(0), columnCount(1) {}
172
        DocPagesSetup(int pa, int fpl, int fpn, int o, bool atf, double cd, double cc) :
173
                pageArrangement(pa), firstPageLocation(fpl), firstPageNumber(fpn), orientation(o), autoTextFrames(atf),
174
                columnDistance(cd), columnCount(cc) {}
175
        int pageArrangement;
176
        int firstPageLocation;
177
        int firstPageNumber;
178
        int orientation;
179
        bool autoTextFrames;
180
        double columnDistance;
181
        double columnCount;
182
};
183
 
3016 fschmid 184
struct PageSet
185
{
186
        QString Name;
187
        int FirstPage;
188
        int Rows;
189
        int Columns;
190
        double GapHorizontal;
191
        double GapVertical;
192
        double GapBelow;
3026 fschmid 193
        QStringList pageNames;
3016 fschmid 194
};
195
 
1065 cbradney 196
struct CMSData
844 fschmid 197
{
198
        QString DefaultMonitorProfile;
199
        QString DefaultPrinterProfile;
2984 fschmid 200
        QString DefaultImageRGBProfile;
201
        QString DefaultImageCMYKProfile;
5345 mrdocs 202
        QString DefaultSolidColorRGBProfile;
203
        QString DefaultSolidColorCMYKProfile;
844 fschmid 204
        int ComponentsInput2;
5345 mrdocs 205
        int ComponentsInput3;
844 fschmid 206
        int ComponentsPrinter;
2984 fschmid 207
        int DefaultIntentImages;
5345 mrdocs 208
        int DefaultIntentColors;
844 fschmid 209
        bool CMSinUse;
210
        bool SoftProofOn;
5345 mrdocs 211
        bool SoftProofFullOn;
844 fschmid 212
        bool GamutCheck;
213
        bool BlackPoint;
214
} ;
838 cbradney 215
 
1065 cbradney 216
struct SingleLine
1429 subik 217
{
844 fschmid 218
        double Width;
219
        int Dash;
220
        int LineEnd;
221
        int LineJoin;
222
        QString Color;
223
        int Shade;
224
};
838 cbradney 225
 
1065 cbradney 226
struct ArrowDesc
844 fschmid 227
{
228
        QString name;
229
        bool userArrow;
230
        FPointArray points;
231
};
838 cbradney 232
 
844 fschmid 233
struct Layer
1429 subik 234
{
844 fschmid 235
        int LNr;
236
        int Level;
5572 fschmid 237
        int blendMode;
1065 cbradney 238
        bool isPrintable;
239
        bool isViewable;
4832 fschmid 240
        bool isEditable;
5359 fschmid 241
        bool flowControl;
5572 fschmid 242
        bool outlineMode;
5373 fschmid 243
        double transparency;
5572 fschmid 244
        QColor markerColor;
245
        QString Name;
844 fschmid 246
};
838 cbradney 247
 
1065 cbradney 248
struct PDFPresentationData
1429 subik 249
{
1065 cbradney 250
        int pageEffectDuration;
251
        int pageViewDuration;
252
        int effectType;
844 fschmid 253
        int Dm;
254
        int M;
255
        int Di;
256
};
838 cbradney 257
 
1065 cbradney 258
struct LPIData
1429 subik 259
{
844 fschmid 260
        int Frequency;
261
        int Angle;
262
        int SpotFunc;
263
};
838 cbradney 264
 
844 fschmid 265
struct Keys
1429 subik 266
{
1230 cbradney 267
        QString actionName;
1392 cbradney 268
        QString cleanMenuText;
3933 avox 269
        QKeySequence keySequence;
1392 cbradney 270
        int tableRow;
5352 cbradney 271
        QString menuName;
272
        int menuPos;
844 fschmid 273
};
838 cbradney 274
 
1429 subik 275
struct PrintOptions
844 fschmid 276
{
838 cbradney 277
        QString printer;
278
        QString filename;
279
        bool toFile;
280
        bool useAltPrintCommand;
281
        QString printerCommand;
282
        int PSLevel;
283
        bool outputSeparations;
284
        QString separationName;
3068 fschmid 285
        QStringList allSeparations;
286
        bool useSpotColors;
838 cbradney 287
        bool useColor;
288
        bool mirrorH;
289
        bool mirrorV;
290
        bool useICC;
291
        bool doGCR;
4649 fschmid 292
        bool doClip;
1861 fschmid 293
        bool setDevParam;
5308 fschmid 294
        bool doOverprint;
838 cbradney 295
        int copies;
296
        std::vector<int> pageNumbers;
297
        QString printerOptions;
298
};
299
 
844 fschmid 300
typedef QMap<QString,QString> ProfilesL;
1065 cbradney 301
typedef QValueVector<SingleLine> multiLine;
1460 cbradney 302
 
4512 cbradney 303
 
304
typedef enum {
305
        MissingGlyph=1,
306
        TextOverflow=2,
307
        ObjectNotOnPage=3,
308
        MissingImage=4,
309
        ImageDPITooLow=5,
310
        Transparency=6,
311
        PDFAnnotField=7,
5239 fschmid 312
        PlacedPDF=8,
5269 subik 313
        ImageDPITooHigh=9,
5674 fschmid 314
        ImageIsGIF=10,
315
        BlendMode=11
4512 cbradney 316
} PreflightError;
317
 
318
typedef QMap<PreflightError, int> errorCodes;
319
 
1065 cbradney 320
enum AppMode
321
{
2603 cbradney 322
        modeNormal,
323
        modeDrawShapes,
324
        modeStoryEditor,
325
        modeDrawPicture,
326
        modeDrawText,
327
        modeMagnifier,
328
        modeEdit,
329
        modeDrawLine,
330
        modeRotation,
331
        modeLinkFrames,
332
        modeUnlinkFrames,
333
        modeDrawRegularPolygon,
334
        modeDrawBezierLine,
335
        modeInsertPDFButton,
336
        modeInsertPDFTextfield,
337
        modeInsertPDFCheckbox,
338
        modeInsertPDFCombobox,
339
        modeInsertPDFListbox,
340
        modeInsertPDFTextAnnotation,
341
        modeInsertPDFLinkAnnotation,
342
        modeDrawFreehandLine,
343
        modeDrawTable,
344
        modePanning,
345
        modeMeasurementTool,
346
        modeEditGradientVectors,
347
        modeEyeDropper,
348
        modeCopyProperties
1065 cbradney 349
};
844 fschmid 350
 
2355 cbradney 351
struct AlignObjs
352
{
353
        int ObjNr;
354
        int Group;
355
        double x1;
356
        double y1;
357
        double x2;
358
        double y2;
2380 cbradney 359
        double width;
360
        double height;
2355 cbradney 361
        QPtrList<PageItem> Objects;
362
};
1641 cbradney 363
 
5087 subik 364
/*! \brief Human readable orientations */
3071 subik 365
enum PageOrientation
366
{
367
        portraitPage = 0,
368
        landscapePage = 1,
369
        customPage = 30
370
};
371
 
5087 subik 372
//! \brief Common type for guides list
373
typedef QValueList<double> Guides;
374
 
5642 cbradney 375
//! \brief from ols scribusXml
376
struct Linked
377
{
378
        int Start;
379
        int StPag;
380
};
381
 
382
// this is a quick hack to combine runs until I've thought of something better -- AV
383
class LastStyles {
384
public:
385
        CharStyle Style;
386
        int StyleStart;
387
        int ParaStyle;
388
        LastStyles() {
389
                StyleStart = 0;
390
                ParaStyle = -1;
391
        }
392
};
5789 cbradney 393
 
838 cbradney 394
#endif