/usr/include/scribus/sctextstruct.h is in scribus-dev 1.4.6+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | /*
For general Scribus (>=1.3.2) copyright and licensing information please refer
to the COPYING file provided with the program. Following this notice may exist
a copyright and/or license notice that predates the release of Scribus 1.3.2
for which a new license (GPL+exception) is in place.
*/
#ifndef SCTEXTSTRUCT_H
#define SCTEXTSTRUCT_H
#ifdef HAVE_CONFIG_H
#include "scconfig.h"
#endif
#include "scribusapi.h"
#include "text/nlsconfig.h"
#ifdef NLS_CONFORMANCE
#define NLS_PRIVATE private
#else
#define NLS_PRIVATE public
#endif
#include <QString>
#include "scfonts.h"
#include "style.h"
#include "styles/charstyle.h"
#include "styles/paragraphstyle.h"
class PageItem;
/* Struktur fuer Pageitem Text */
/*
* sctext.h
* Scribus
*
* Created by Andreas Vox on 29.07.05.
* Copyright 2005 under GPL2. All rights reserved.
*
*/
/**
* This struct stores a positioned glyph. This is the result of the layout process.
* If a char gets translated to more than one glyph, a linked list is built.
*/
struct SCRIBUS_API GlyphLayout {
float xadvance;
float yadvance;
float xoffset;
float yoffset;
double scaleV;
double scaleH;
uint glyph;
GlyphLayout* more;
GlyphLayout() : xadvance(0.0f), yadvance(0.0f), xoffset(0.0f), yoffset(0.0f),
scaleV(1.0), scaleH(1.0), glyph(0), more(NULL)
{ }
virtual ~GlyphLayout()
{ }
double wide() const
{
double ret = 0;
for(const GlyphLayout* p=this; p; p=p->more)
ret += p->xadvance;
return ret;
}
GlyphLayout* last()
{
if (more)
return more->last();
else
return this;
}
void shrink()
{
if (more) {
more->shrink();
delete more;
more = NULL;
}
}
void grow()
{
if (!more) {
more = new GlyphLayout();
}
}
virtual void growWithTabLayout();
};
struct SCRIBUS_API TabLayout : public GlyphLayout
{
QChar fillChar;
};
struct InlineFrameData;
class SCRIBUS_API InlineFrame
{
public:
InlineFrame(PageItem* item);
InlineFrame(const InlineFrame& other);
InlineFrame& operator= (const InlineFrame& other);
virtual ~InlineFrame();
bool hasItem() const;
bool isShared() const;
PageItem* getItem();
QList<PageItem*> getGroupedItems();
private:
InlineFrameData* d;
};
#ifndef NLS_PROTO
class SCRIBUS_API ScText : public CharStyle
{
public:
ParagraphStyle* parstyle; // only for parseps
GlyphLayout glyph;
float PtransX;
float PtransY;
float PRot;
float PDx;
InlineFrame embedded;
QChar ch;
ScText() :
CharStyle(),
parstyle(NULL), glyph(),
PtransX(0.0f), PtransY(0.0f), PRot(0.0f), PDx(0.0f), embedded(NULL), ch() {}
ScText(const ScText& other) :
CharStyle(other),
parstyle(NULL), glyph(other.glyph),
PtransX(other.PtransX), PtransY(other.PtransY), PRot(other.PRot), PDx(other.PDx),
embedded(other.embedded), ch(other.ch)
{
glyph.more = NULL;
GlyphLayout *layout = &glyph;
const GlyphLayout *otherLayout = &other.glyph;
while (otherLayout->more)
{
layout->more = new GlyphLayout(*otherLayout->more);
layout = layout->more;
otherLayout = otherLayout->more;
}
if (other.parstyle)
parstyle = new ParagraphStyle(*other.parstyle);
}
~ScText();
bool hasObject() const;
};
#endif
/** @brief First Line Offset Policy
* Set wether the first line offset is based on max glyph height
* or some of predefined height.
* I put a prefix because it could easily conflict
*/
enum FirstLineOffsetPolicy
{
FLOPRealGlyphHeight = 0, // Historical
FLOPFontAscent = 1,
FLOPLineSpacing = 2
};
#endif // SCTEXTSTRUCT_H
|