Subversion Repositories Scribus

Rev

Rev 7189 | Rev 7226 | 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;
6454 jghali 44
        int FillRule;
844 fschmid 45
        QString GrColor;
46
        QString GrColor2;
47
        int GrShade;
48
        int GrShade2;
49
        VGradient fill_gradient;
50
        int GrType;
6369 fschmid 51
        QString pattern;
6414 fschmid 52
        double patternScaleX;
53
        double patternScaleY;
54
        double patternOffsetX;
55
        double patternOffsetY;
56
        double patternRotation;
844 fschmid 57
        double GrStartX;
58
        double GrStartY;
59
        double GrEndX;
60
        double GrEndY;
61
        QString TxtStroke;
62
        QString TxtFill;
63
        int ShTxtStroke;
64
        int ShTxtFill;
65
        int TxtScale;
2230 fschmid 66
        int TxtScaleV;
844 fschmid 67
        int TxTStyle;
2234 fschmid 68
        int TxTBase;
2247 fschmid 69
        int TxtShadowX;
70
        int TxtShadowY;
2257 fschmid 71
        int TxtOutline;
2262 fschmid 72
        int TxtUnderPos;
73
        int TxtUnderWidth;
2272 fschmid 74
        int TxtStrikePos;
75
        int TxtStrikeWidth;
844 fschmid 76
        double Rot;
77
        int PLineArt;
78
        int PLineJoin;
79
        int PLineEnd;
80
        double LineSp;
2309 fschmid 81
        int LineSpMode;
2382 fschmid 82
        int ExtraV;
844 fschmid 83
        double LocalScX;
84
        double LocalScY;
85
        double LocalX;
86
        double LocalY;
87
        bool PicArt;
1392 cbradney 88
        bool flippedH;
89
        bool flippedV;
844 fschmid 90
        bool isPrintable;
91
        bool isBookmark;
4084 cbradney 92
        bool m_isAnnotation;
93
        Annotation m_annotation;
94
        QString AnName;
844 fschmid 95
        double Extra;
96
        double TExtra;
97
        double BExtra;
98
        double RExtra;
99
        QString Pfile;
100
        QString Pfile2;
101
        QString Pfile3;
102
        QString IProfile;
103
        QString EmProfile;
104
        int IRender;
105
        bool UseEmbedded;
1065 cbradney 106
        QString itemText;
844 fschmid 107
        QPointArray Clip;
108
        FPointArray PoLine;
109
        FPointArray ContourLine;
110
        bool PoShow;
111
        double BaseOffs;
5620 jghali 112
        int TextflowMode;
1065 cbradney 113
        int textAlignment;
844 fschmid 114
        QString IFont;
115
        int ISize;
116
        QValueStack<int> Groups;
117
        int LayerNr;
118
        bool ScaleType;
119
        bool AspectRatio;
120
        bool Locked;
121
        bool LockRes;
122
        double Transparency;
123
        double TranspStroke;
5746 fschmid 124
        int TransBlend;
125
        int TransBlendS;
844 fschmid 126
        bool Reverse;
127
        QString NamedLStyle;
128
        QString Language;
129
        QString guiLanguage;
130
        int Cols;
131
        double ColGap;
5184 avox 132
        QValueList<ParagraphStyle::TabRecord> TabValues;
844 fschmid 133
        QValueList<double> DashValues;
134
        double DashOffset;
135
        bool isTableItem;
136
        bool TopLine;
137
        bool LeftLine;
138
        bool RightLine;
139
        bool BottomLine;
140
        int LeftLinkID;
141
        int RightLinkID;
142
        int TopLinkID;
143
        int BottomLinkID;
144
        int startArrowIndex;
145
        int endArrowIndex;
1655 cbradney 146
        ObjAttrVector pageItemAttributes;
844 fschmid 147
};
838 cbradney 148
 
4579 cbradney 149
struct CopyContentsBuffer
150
{
151
        PageItem::ItemType sourceType;
152
        QString contentsFileName;
153
        double LocalScX;
154
        double LocalScY;
155
        double LocalX;
156
        double LocalY;
4831 cbradney 157
        double ItemX;
158
        double ItemY;
4581 cbradney 159
        QString inputProfile;
160
        bool useEmbedded;
161
        int renderingIntent;
4579 cbradney 162
};
163
 
7225 cbradney 164
/** \brief Pagemargins and bleeds*/
1065 cbradney 165
struct MarginStruct
1429 subik 166
{
3987 craig 167
        MarginStruct() : Top(0), Left(0), Bottom(0), Right(0) {}
168
        MarginStruct(double top, double left, double bottom, double right) :
169
                Top(top), Left(left), Bottom(bottom), Right(right) {}
844 fschmid 170
        double Top;
171
        double Left;
3987 craig 172
        double Bottom;
844 fschmid 173
        double Right;
174
};
838 cbradney 175
 
5789 cbradney 176
struct DocPagesSetup
177
{
178
        DocPagesSetup() : pageArrangement(0), firstPageLocation(0), firstPageNumber(0), orientation(0), autoTextFrames(false), columnDistance(0), columnCount(1) {}
179
        DocPagesSetup(int pa, int fpl, int fpn, int o, bool atf, double cd, double cc) :
180
                pageArrangement(pa), firstPageLocation(fpl), firstPageNumber(fpn), orientation(o), autoTextFrames(atf),
181
                columnDistance(cd), columnCount(cc) {}
182
        int pageArrangement;
183
        int firstPageLocation;
184
        int firstPageNumber;
185
        int orientation;
186
        bool autoTextFrames;
187
        double columnDistance;
188
        double columnCount;
189
};
190
 
3016 fschmid 191
struct PageSet
192
{
193
        QString Name;
194
        int FirstPage;
195
        int Rows;
196
        int Columns;
197
        double GapHorizontal;
198
        double GapVertical;
199
        double GapBelow;
3026 fschmid 200
        QStringList pageNames;
3016 fschmid 201
};
202
 
1065 cbradney 203
struct CMSData
844 fschmid 204
{
205
        QString DefaultMonitorProfile;
206
        QString DefaultPrinterProfile;
2984 fschmid 207
        QString DefaultImageRGBProfile;
208
        QString DefaultImageCMYKProfile;
5345 mrdocs 209
        QString DefaultSolidColorRGBProfile;
210
        QString DefaultSolidColorCMYKProfile;
844 fschmid 211
        int ComponentsInput2;
5345 mrdocs 212
        int ComponentsInput3;
844 fschmid 213
        int ComponentsPrinter;
2984 fschmid 214
        int DefaultIntentImages;
5345 mrdocs 215
        int DefaultIntentColors;
844 fschmid 216
        bool CMSinUse;
217
        bool SoftProofOn;
5345 mrdocs 218
        bool SoftProofFullOn;
844 fschmid 219
        bool GamutCheck;
220
        bool BlackPoint;
221
} ;
838 cbradney 222
 
1065 cbradney 223
struct SingleLine
1429 subik 224
{
844 fschmid 225
        double Width;
226
        int Dash;
227
        int LineEnd;
228
        int LineJoin;
229
        QString Color;
230
        int Shade;
231
};
838 cbradney 232
 
1065 cbradney 233
struct ArrowDesc
844 fschmid 234
{
235
        QString name;
236
        bool userArrow;
237
        FPointArray points;
238
};
838 cbradney 239
 
844 fschmid 240
struct Layer
1429 subik 241
{
844 fschmid 242
        int LNr;
243
        int Level;
5572 fschmid 244
        int blendMode;
1065 cbradney 245
        bool isPrintable;
246
        bool isViewable;
4832 fschmid 247
        bool isEditable;
5359 fschmid 248
        bool flowControl;
5572 fschmid 249
        bool outlineMode;
5373 fschmid 250
        double transparency;
5572 fschmid 251
        QColor markerColor;
252
        QString Name;
844 fschmid 253
};
838 cbradney 254
 
1065 cbradney 255
struct PDFPresentationData
1429 subik 256
{
1065 cbradney 257
        int pageEffectDuration;
258
        int pageViewDuration;
259
        int effectType;
844 fschmid 260
        int Dm;
261
        int M;
262
        int Di;
263
};
838 cbradney 264
 
1065 cbradney 265
struct LPIData
1429 subik 266
{
844 fschmid 267
        int Frequency;
268
        int Angle;
269
        int SpotFunc;
270
};
838 cbradney 271
 
844 fschmid 272
struct Keys
1429 subik 273
{
1230 cbradney 274
        QString actionName;
1392 cbradney 275
        QString cleanMenuText;
3933 avox 276
        QKeySequence keySequence;
1392 cbradney 277
        int tableRow;
5352 cbradney 278
        QString menuName;
279
        int menuPos;
844 fschmid 280
};
838 cbradney 281
 
1429 subik 282
struct PrintOptions
844 fschmid 283
{
7104 fschmid 284
        bool firstUse;
838 cbradney 285
        bool toFile;
286
        bool useAltPrintCommand;
287
        bool outputSeparations;
3068 fschmid 288
        bool useSpotColors;
838 cbradney 289
        bool useColor;
290
        bool mirrorH;
291
        bool mirrorV;
292
        bool useICC;
293
        bool doGCR;
4649 fschmid 294
        bool doClip;
1861 fschmid 295
        bool setDevParam;
5308 fschmid 296
        bool doOverprint;
6954 fschmid 297
        bool cropMarks;
298
        bool bleedMarks;
299
        bool registrationMarks;
300
        bool colorMarks;
838 cbradney 301
        int copies;
6954 fschmid 302
        int PSLevel;
303
        double markOffset;
7225 cbradney 304
        MarginStruct bleeds;
838 cbradney 305
        std::vector<int> pageNumbers;
306
        QString printerOptions;
6954 fschmid 307
        QString printer;
308
        QString filename;
309
        QString separationName;
310
        QStringList allSeparations;
311
        QString printerCommand;
838 cbradney 312
};
313
 
844 fschmid 314
typedef QMap<QString,QString> ProfilesL;
6951 tsoots 315
// typedef QValueVector<SingleLine> multiLine;
1460 cbradney 316
 
6951 tsoots 317
struct multiLine : public QValueVector<SingleLine> {
318
        QString shortcut;
319
};
4512 cbradney 320
 
321
typedef enum {
322
        MissingGlyph=1,
323
        TextOverflow=2,
324
        ObjectNotOnPage=3,
325
        MissingImage=4,
326
        ImageDPITooLow=5,
327
        Transparency=6,
328
        PDFAnnotField=7,
5239 fschmid 329
        PlacedPDF=8,
5269 subik 330
        ImageDPITooHigh=9,
5674 fschmid 331
        ImageIsGIF=10,
332
        BlendMode=11
4512 cbradney 333
} PreflightError;
334
 
335
typedef QMap<PreflightError, int> errorCodes;
336
 
1065 cbradney 337
enum AppMode
338
{
2603 cbradney 339
        modeNormal,
340
        modeDrawShapes,
341
        modeStoryEditor,
342
        modeDrawPicture,
343
        modeDrawText,
344
        modeMagnifier,
345
        modeEdit,
346
        modeDrawLine,
347
        modeRotation,
348
        modeLinkFrames,
349
        modeUnlinkFrames,
350
        modeDrawRegularPolygon,
351
        modeDrawBezierLine,
352
        modeInsertPDFButton,
353
        modeInsertPDFTextfield,
354
        modeInsertPDFCheckbox,
355
        modeInsertPDFCombobox,
356
        modeInsertPDFListbox,
357
        modeInsertPDFTextAnnotation,
358
        modeInsertPDFLinkAnnotation,
359
        modeDrawFreehandLine,
360
        modeDrawTable,
361
        modePanning,
362
        modeMeasurementTool,
363
        modeEditGradientVectors,
364
        modeEyeDropper,
365
        modeCopyProperties
1065 cbradney 366
};
844 fschmid 367
 
2355 cbradney 368
struct AlignObjs
369
{
370
        int ObjNr;
371
        int Group;
372
        double x1;
373
        double y1;
374
        double x2;
375
        double y2;
2380 cbradney 376
        double width;
377
        double height;
2355 cbradney 378
        QPtrList<PageItem> Objects;
379
};
1641 cbradney 380
 
5087 subik 381
/*! \brief Human readable orientations */
3071 subik 382
enum PageOrientation
383
{
384
        portraitPage = 0,
385
        landscapePage = 1,
386
        customPage = 30
387
};
388
 
5087 subik 389
//! \brief Common type for guides list
390
typedef QValueList<double> Guides;
391
 
5642 cbradney 392
//! \brief from ols scribusXml
393
struct Linked
394
{
395
        int Start;
396
        int StPag;
397
};
398
 
399
// this is a quick hack to combine runs until I've thought of something better -- AV
400
class LastStyles {
401
public:
402
        CharStyle Style;
403
        int StyleStart;
7189 avox 404
        QString ParaStyle;
5642 cbradney 405
        LastStyles() {
406
                StyleStart = 0;
7189 avox 407
                ParaStyle = "";
5642 cbradney 408
        }
409
};
5789 cbradney 410
 
838 cbradney 411
#endif