Subversion Repositories Scribus

Rev

Rev 5375 | Rev 5620 | 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;
105
        bool Textflow;
106
        bool Textflow2;
107
        bool UseContour;
1065 cbradney 108
        int textAlignment;
844 fschmid 109
        QString IFont;
110
        int ISize;
111
        QValueStack<int> Groups;
112
        int LayerNr;
113
        bool ScaleType;
114
        bool AspectRatio;
115
        bool Locked;
116
        bool LockRes;
117
        double Transparency;
118
        double TranspStroke;
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
 
3016 fschmid 169
struct PageSet
170
{
171
        QString Name;
172
        int FirstPage;
173
        int Rows;
174
        int Columns;
175
        double GapHorizontal;
176
        double GapVertical;
177
        double GapBelow;
3026 fschmid 178
        QStringList pageNames;
3016 fschmid 179
};
180
 
1065 cbradney 181
struct CMSData
844 fschmid 182
{
183
        QString DefaultMonitorProfile;
184
        QString DefaultPrinterProfile;
2984 fschmid 185
        QString DefaultImageRGBProfile;
186
        QString DefaultImageCMYKProfile;
5345 mrdocs 187
        QString DefaultSolidColorRGBProfile;
188
        QString DefaultSolidColorCMYKProfile;
844 fschmid 189
        int ComponentsInput2;
5345 mrdocs 190
        int ComponentsInput3;
844 fschmid 191
        int ComponentsPrinter;
2984 fschmid 192
        int DefaultIntentImages;
5345 mrdocs 193
        int DefaultIntentColors;
844 fschmid 194
        bool CMSinUse;
195
        bool SoftProofOn;
5345 mrdocs 196
        bool SoftProofFullOn;
844 fschmid 197
        bool GamutCheck;
198
        bool BlackPoint;
199
} ;
838 cbradney 200
 
1065 cbradney 201
struct SingleLine
1429 subik 202
{
844 fschmid 203
        double Width;
204
        int Dash;
205
        int LineEnd;
206
        int LineJoin;
207
        QString Color;
208
        int Shade;
209
};
838 cbradney 210
 
1065 cbradney 211
struct ArrowDesc
844 fschmid 212
{
213
        QString name;
214
        bool userArrow;
215
        FPointArray points;
216
};
838 cbradney 217
 
844 fschmid 218
struct Layer
1429 subik 219
{
844 fschmid 220
        int LNr;
221
        int Level;
5572 fschmid 222
        int blendMode;
1065 cbradney 223
        bool isPrintable;
224
        bool isViewable;
4832 fschmid 225
        bool isEditable;
5359 fschmid 226
        bool flowControl;
5572 fschmid 227
        bool outlineMode;
5373 fschmid 228
        double transparency;
5572 fschmid 229
        QColor markerColor;
230
        QString Name;
844 fschmid 231
};
838 cbradney 232
 
1065 cbradney 233
struct PDFPresentationData
1429 subik 234
{
1065 cbradney 235
        int pageEffectDuration;
236
        int pageViewDuration;
237
        int effectType;
844 fschmid 238
        int Dm;
239
        int M;
240
        int Di;
241
};
838 cbradney 242
 
1065 cbradney 243
struct LPIData
1429 subik 244
{
844 fschmid 245
        int Frequency;
246
        int Angle;
247
        int SpotFunc;
248
};
838 cbradney 249
 
844 fschmid 250
struct Keys
1429 subik 251
{
1230 cbradney 252
        QString actionName;
1392 cbradney 253
        QString cleanMenuText;
3933 avox 254
        QKeySequence keySequence;
1392 cbradney 255
        int tableRow;
5352 cbradney 256
        QString menuName;
257
        int menuPos;
844 fschmid 258
};
838 cbradney 259
 
1429 subik 260
struct PrintOptions
844 fschmid 261
{
838 cbradney 262
        QString printer;
263
        QString filename;
264
        bool toFile;
265
        bool useAltPrintCommand;
266
        QString printerCommand;
267
        int PSLevel;
268
        bool outputSeparations;
269
        QString separationName;
3068 fschmid 270
        QStringList allSeparations;
271
        bool useSpotColors;
838 cbradney 272
        bool useColor;
273
        bool mirrorH;
274
        bool mirrorV;
275
        bool useICC;
276
        bool doGCR;
4649 fschmid 277
        bool doClip;
1861 fschmid 278
        bool setDevParam;
5308 fschmid 279
        bool doOverprint;
838 cbradney 280
        int copies;
281
        std::vector<int> pageNumbers;
282
        QString printerOptions;
283
};
284
 
844 fschmid 285
typedef QMap<QString,QString> ProfilesL;
1065 cbradney 286
typedef QValueVector<SingleLine> multiLine;
1460 cbradney 287
 
4512 cbradney 288
 
289
typedef enum {
290
        MissingGlyph=1,
291
        TextOverflow=2,
292
        ObjectNotOnPage=3,
293
        MissingImage=4,
294
        ImageDPITooLow=5,
295
        Transparency=6,
296
        PDFAnnotField=7,
5239 fschmid 297
        PlacedPDF=8,
5269 subik 298
        ImageDPITooHigh=9,
299
        ImageIsGIF=10
4512 cbradney 300
} PreflightError;
301
 
302
typedef QMap<PreflightError, int> errorCodes;
303
 
1065 cbradney 304
enum AppMode
305
{
2603 cbradney 306
        modeNormal,
307
        modeDrawShapes,
308
        modeStoryEditor,
309
        modeDrawPicture,
310
        modeDrawText,
311
        modeMagnifier,
312
        modeEdit,
313
        modeDrawLine,
314
        modeRotation,
315
        modeLinkFrames,
316
        modeUnlinkFrames,
317
        modeDrawRegularPolygon,
318
        modeDrawBezierLine,
319
        modeInsertPDFButton,
320
        modeInsertPDFTextfield,
321
        modeInsertPDFCheckbox,
322
        modeInsertPDFCombobox,
323
        modeInsertPDFListbox,
324
        modeInsertPDFTextAnnotation,
325
        modeInsertPDFLinkAnnotation,
326
        modeDrawFreehandLine,
327
        modeDrawTable,
328
        modePanning,
329
        modeMeasurementTool,
330
        modeEditGradientVectors,
331
        modeEyeDropper,
332
        modeCopyProperties
1065 cbradney 333
};
844 fschmid 334
 
2355 cbradney 335
struct AlignObjs
336
{
337
        int ObjNr;
338
        int Group;
339
        double x1;
340
        double y1;
341
        double x2;
342
        double y2;
2380 cbradney 343
        double width;
344
        double height;
2355 cbradney 345
        QPtrList<PageItem> Objects;
346
};
1641 cbradney 347
 
5087 subik 348
/*! \brief Human readable orientations */
3071 subik 349
enum PageOrientation
350
{
351
        portraitPage = 0,
352
        landscapePage = 1,
353
        customPage = 30
354
};
355
 
5087 subik 356
//! \brief Common type for guides list
357
typedef QValueList<double> Guides;
358
 
838 cbradney 359
#endif