Subversion Repositories Scribus

Rev

Rev 5642 | Rev 5746 | 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,
5674 fschmid 297
        ImageIsGIF=10,
298
        BlendMode=11
4512 cbradney 299
} PreflightError;
300
 
301
typedef QMap<PreflightError, int> errorCodes;
302
 
1065 cbradney 303
enum AppMode
304
{
2603 cbradney 305
        modeNormal,
306
        modeDrawShapes,
307
        modeStoryEditor,
308
        modeDrawPicture,
309
        modeDrawText,
310
        modeMagnifier,
311
        modeEdit,
312
        modeDrawLine,
313
        modeRotation,
314
        modeLinkFrames,
315
        modeUnlinkFrames,
316
        modeDrawRegularPolygon,
317
        modeDrawBezierLine,
318
        modeInsertPDFButton,
319
        modeInsertPDFTextfield,
320
        modeInsertPDFCheckbox,
321
        modeInsertPDFCombobox,
322
        modeInsertPDFListbox,
323
        modeInsertPDFTextAnnotation,
324
        modeInsertPDFLinkAnnotation,
325
        modeDrawFreehandLine,
326
        modeDrawTable,
327
        modePanning,
328
        modeMeasurementTool,
329
        modeEditGradientVectors,
330
        modeEyeDropper,
331
        modeCopyProperties
1065 cbradney 332
};
844 fschmid 333
 
2355 cbradney 334
struct AlignObjs
335
{
336
        int ObjNr;
337
        int Group;
338
        double x1;
339
        double y1;
340
        double x2;
341
        double y2;
2380 cbradney 342
        double width;
343
        double height;
2355 cbradney 344
        QPtrList<PageItem> Objects;
345
};
1641 cbradney 346
 
5087 subik 347
/*! \brief Human readable orientations */
3071 subik 348
enum PageOrientation
349
{
350
        portraitPage = 0,
351
        landscapePage = 1,
352
        customPage = 30
353
};
354
 
5087 subik 355
//! \brief Common type for guides list
356
typedef QValueList<double> Guides;
357
 
5642 cbradney 358
//! \brief from ols scribusXml
359
struct Linked
360
{
361
        int Start;
362
        int StPag;
363
};
364
 
365
// this is a quick hack to combine runs until I've thought of something better -- AV
366
class LastStyles {
367
public:
368
        CharStyle Style;
369
        int StyleStart;
370
        int ParaStyle;
371
        LastStyles() {
372
                StyleStart = 0;
373
                ParaStyle = -1;
374
        }
375
};
376
 
838 cbradney 377
#endif