Go to the documentation of this file.
34 #ifndef MACDRAWPRO_STYLE_MANAGER
35 # define MACDRAWPRO_STYLE_MANAGER
41 #include <librevenge/librevenge.h>
82 bool getDash(
int dId, std::vector<float> &dash)
const;
90 bool getPenSize(
int pId,
float &penSize)
const;
190 std::shared_ptr<MacDrawProStyleManagerInternal::State>
m_state;
Definition: MacDrawProStyleManager.cxx:64
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
@ G_Square
Definition: MWAWGraphicStyle.hxx:177
bool readColors(MWAWEntry const &entry)
tries to read colors map Ctbl:256
Definition: MacDrawProStyleManager.cxx:1436
MacDrawProParser & m_parser
the main parser
Definition: MacDrawProStyleManager.hxx:186
void initBWPatterns()
init the black and white patterns list
Definition: MacDrawProStyleManager.cxx:247
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
Internal: the structures of a MacDrawProStyleManager.
Definition: MacDrawProStyleManager.cxx:62
the main class to read a MacDraw II file
Definition: MacDrawProParser.hxx:64
@ smallCapsBit
Definition: MWAWFont.hxx:192
uint16_t m_leaderCharacter
the leader char
Definition: MWAWParagraph.hxx:78
bool readGradientPalette(MWAWEntry const &entry, int fSz)
try to read the gradient palette resource RaEL:128
Definition: MacDrawProStyleManager.cxx:2523
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
std::vector< MWAWColor > m_colorList
the color list
Definition: MacDrawProStyleManager.cxx:180
int m_numBWPatterns
the number of BW pattern
Definition: MacDrawProStyleManager.cxx:173
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
void setColors(std::vector< MWAWColor > const &cols)
sets the array of indexed colors
Definition: MWAWPictBitmap.hxx:446
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
bool readColorMap(MWAWEntry const &entry, int N, int fSz)
try to read the display color map DPCo:0
Definition: MacDrawProStyleManager.cxx:2073
MWAWVec2f m_percentCenter
the gradient center
Definition: MacDrawProStyleManager.cxx:89
bool readUPDL(MWAWEntry const &entry)
try to read the UPDL resource, maybe U? Palette Display Layer
Definition: MacDrawProStyleManager.cxx:2727
float m_angle
the gradient angle
Definition: MacDrawProStyleManager.cxx:87
Type m_type
the gradient type
Definition: MWAWGraphicStyle.hxx:260
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
bool readListNames(MWAWEntry const &entry, int N=-1)
try to read a list of names : CoNa:128 color name, FaNa:128 font color name, PaNa:128....
Definition: MacDrawProStyleManager.cxx:2667
bool readRulerSettings(MWAWEntry const &entry)
tries to read the Ruler settings resource Rset:256 or Rst2:256
Definition: MacDrawProStyleManager.cxx:1687
@ G_None
Definition: MWAWGraphicStyle.hxx:177
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
@ boldBit
Definition: MWAWFont.hxx:190
bool readFontNames()
tries to read the font name resources Fmtx:256 and Fnms:256
Definition: MacDrawProStyleManager.cxx:1367
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
@ CENTER
Definition: MWAWParagraph.hxx:48
std::vector< MWAWGraphicStyle::Gradient::Stop > m_stopList
the list of gradient limits
Definition: MacDrawProStyleManager.cxx:85
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
MWAWVec2f m_documentSize
the document size (in point)
Definition: MacDrawProStyleManager.cxx:167
int id() const
returns the id
Definition: MWAWEntry.hxx:164
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
bool readFontStyles(MWAWEntry const &entry)
tries to read the font style ( last style in v0 data fork )
Definition: MacDrawProStyleManager.cxx:564
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
std::vector< float > m_penSizeList
the list of pen size
Definition: MacDrawProStyleManager.cxx:190
@ G_Linear
Definition: MWAWGraphicStyle.hxx:177
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
MWAWParserStatePtr m_parserState
the parser state
Definition: MacDrawProStyleManager.hxx:188
virtual ~MacDrawProStyleManager()
destructor
Definition: MacDrawProStyleManager.cxx:310
@ Simple
Definition: MWAWFont.hxx:49
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
bool readFAMap(MWAWEntry const &entry, int N, int fSz)
try to read the FA map DPFa:3
Definition: MacDrawProStyleManager.cxx:2316
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
bool getBinary(MWAWEmbeddedObject &picture) const override
returns the final picture
Definition: MWAWPictBitmap.hxx:225
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
std::vector< unsigned char > m_data
the pattern data: a sequence of data: p[0..7,0],p[8..15,0]...p[0..7,1],p[8..15,1],...
Definition: MWAWGraphicStyle.hxx:363
bool readFAPalette(MWAWEntry const &entry, int fSz)
try to read the FA palette resource FaEL:128
Definition: MacDrawProStyleManager.cxx:2359
bool readColorPalette(MWAWEntry const &entry, int fSz)
try to read the color palette resource CoEL:128
Definition: MacDrawProStyleManager.cxx:2144
@ DECIMAL
Definition: MWAWParagraph.hxx:48
bool readPreferences1(MWAWEntry const &entry)
try to read the first pref resource Prf1:256
Definition: MacDrawProStyleManager.cxx:2866
std::vector< MWAWFont > m_fontList
the list of font
Definition: MacDrawProStyleManager.cxx:186
bool readGradientMap(MWAWEntry const &entry, int N, int fSz)
try to read the gradian map DPRa:2
Definition: MacDrawProStyleManager.cxx:2404
std::vector< Gradient > m_gradientList
the gradient list
Definition: MacDrawProStyleManager.cxx:197
void initColors()
init the colors list
Definition: MacDrawProStyleManager.cxx:200
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
@ embossBit
Definition: MWAWFont.hxx:190
bool readRSRCZones()
tries to read the RSRC zones
Definition: MacDrawProStyleManager.cxx:1079
std::shared_ptr< MacDrawProStyleManagerInternal::State > m_state
the state
Definition: MacDrawProStyleManager.hxx:190
@ G_Rectangular
Definition: MWAWGraphicStyle.hxx:177
bool readRulers(MWAWEntry const &entry, bool inRsrc=false)
tries to read the Ruler styles or the resource Drul:256
Definition: MacDrawProStyleManager.cxx:885
bool readDocumentInfo(MWAWEntry const &entry)
tries to read the Document Information resource Dinf:256
Definition: MacDrawProStyleManager.cxx:1276
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
std::vector< std::vector< float > > m_dashList
the list of dash
Definition: MacDrawProStyleManager.cxx:184
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:277
bool readPens(MWAWEntry const &entry, bool inRsrc=false)
tries to read the Pen styles or the resource PSet:256
Definition: MacDrawProStyleManager.cxx:815
bool readPatternPalette(MWAWEntry const &entry, int fSz)
try to read the pattern palette resource PaEL:128
Definition: MacDrawProStyleManager.cxx:2266
@ AtLeast
Definition: MWAWParagraph.hxx:94
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
bool readParagraphStyles(MWAWEntry const &entry)
tries to read the paragraph style ( last style in v1 data fork )
Definition: MacDrawProStyleManager.cxx:944
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
@ shadowBit
Definition: MWAWFont.hxx:191
bool getPattern(int pId, MWAWGraphicStyle::Pattern &pattern) const
tries to return the pattern corresponding to an id
Definition: MacDrawProStyleManager.cxx:399
bool getPenSize(int pId, float &penSize) const
tries to return the pen size corresponding to an id
Definition: MacDrawProStyleManager.cxx:388
std::ostream & operator<<(std::ostream &o, Gradient const &grad)
Definition: MacDrawProStyleManager.cxx:94
bool readPaletteDef(MWAWEntry const &entry)
try to read a palette definition PaDB:[0-3]
Definition: MacDrawProStyleManager.cxx:1843
bool readPreferencesListBool(MWAWEntry const &entry, int num)
try to read the first pref resource Prf[23459]:256
Definition: MacDrawProStyleManager.cxx:2831
friend std::ostream & operator<<(std::ostream &o, Gradient const &grad)
a print operator
Definition: MacDrawProStyleManager.cxx:94
bool readViews(MWAWEntry const &entry)
reads the view positions resource Dvws:256
Definition: MacDrawProStyleManager.cxx:1741
std::vector< MWAWParagraph > m_paragraphList
the list of paragraph
Definition: MacDrawProStyleManager.cxx:188
unsigned char getBlue() const
returns the green value
Definition: libmwaw_internal.hxx:269
int m_numStyleZones[6]
the number of zones
Definition: MacDrawProStyleManager.cxx:169
bool hasGradient() const
returns true if the gradient is defined
Definition: MacDrawProStyleManager.cxx:75
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:141
bool readPatternsToolList(MWAWEntry const &entry)
tries to read the list of pattern patR:256: list of BW/Color patterns list which appear in the patter...
Definition: MacDrawProStyleManager.cxx:1639
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:358
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
bool readColorPatterns(MWAWEntry const &entry)
tries to read the color pattern colP:256
Definition: MacDrawProStyleManager.cxx:1543
State()
constructor
Definition: MacDrawProStyleManager.cxx:140
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
void setRow(int j, U const *val)
sets all cell contents of a row
Definition: MWAWPictBitmap.hxx:430
the main class to read a MacDraw II file
Definition: MacDrawProStyleManager.hxx:60
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
std::vector< MWAWGraphicStyle::Pattern > m_BWPatternList
the patterns list
Definition: MacDrawProStyleManager.cxx:193
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
void initPens()
init the pens list
Definition: MacDrawProStyleManager.cxx:240
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
bool readPaletteMap(MWAWEntry const &entry, int N, int dataSz)
try to read a palette map
Definition: MacDrawProStyleManager.cxx:2019
bool readStyles(long const(&sizeZones)[6])
tries to read the style zone knowings the size and the number of data in each zones
Definition: MacDrawProStyleManager.cxx:512
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
bool getColor(int cId, MWAWColor &color) const
tries to return the color corresponding to an id
Definition: MacDrawProStyleManager.cxx:319
bool readPaletteData(MWAWEntry const &entry, int dataSz)
try to read a palette data
Definition: MacDrawProStyleManager.cxx:1969
uint16_t m_decimalCharacter
the decimal char
Definition: MWAWParagraph.hxx:80
Gradient()
constructor
Definition: MacDrawProStyleManager.cxx:66
@ G_Axial
Definition: MWAWGraphicStyle.hxx:177
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:361
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
@ italicBit
Definition: MWAWFont.hxx:190
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:357
Gradient m_gradient
the gradient
Definition: MWAWGraphicStyle.hxx:533
std::string m_extra
extra data
Definition: MacDrawProStyleManager.cxx:91
bool getFont(int fId, MWAWFont &font) const
tries to return the font corresponding to an id
Definition: MacDrawProStyleManager.cxx:356
unsigned char getRed() const
returns the red value
Definition: libmwaw_internal.hxx:274
@ G_Ellipsoid
Definition: MWAWGraphicStyle.hxx:177
@ JustificationFull
Definition: MWAWParagraph.hxx:90
@ JustificationRight
Definition: MWAWParagraph.hxx:91
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
std::vector< MWAWColor > m_displayColorList
the display color list
Definition: MacDrawProStyleManager.cxx:182
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
int m_numPatternsInTool
the number of pattern in tool list
Definition: MacDrawProStyleManager.cxx:177
bool readPreferences(MWAWEntry const &entry)
tries to read the main Preferences resource Pref:256
Definition: MacDrawProStyleManager.cxx:1225
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
int m_numColorPatterns
the number of color pattern
Definition: MacDrawProStyleManager.cxx:175
std::vector< MWAWGraphicStyle::Pattern > m_colorPatternList
the color patterns list
Definition: MacDrawProStyleManager.cxx:195
void initDashs()
init the dashs list
Definition: MacDrawProStyleManager.cxx:213
int m_numColors
the number of color
Definition: MacDrawProStyleManager.cxx:171
bool updateGradient(int gId, MWAWGraphicStyle &style) const
tries to update the style gradient
Definition: MacDrawProStyleManager.cxx:440
MacDrawProStyleManager(MacDrawProParser &parser)
constructor
Definition: MacDrawProStyleManager.cxx:303
bool readRSRCDstl(MWAWEntry const &entry)
reads the Dstl:256 resource (unknown content)
Definition: MacDrawProStyleManager.cxx:1796
bool readHeaderInfoStylePart(std::string &extra)
tries to read the header info part which corresponds to style data
Definition: MacDrawProStyleManager.cxx:460
bool getDash(int dId, std::vector< float > &dash) const
tries to return the dash definition corresponding to an id
Definition: MacDrawProStyleManager.cxx:377
@ RIGHT
Definition: MWAWParagraph.hxx:48
Class to store font.
Definition: MWAWFont.hxx:44
unsigned char getGreen() const
returns the green value
Definition: libmwaw_internal.hxx:279
bool readPatternMap(MWAWEntry const &entry, int N, int fSz)
try to read the display pattern DPPa:1
Definition: MacDrawProStyleManager.cxx:2211
@ G_Radial
Definition: MWAWGraphicStyle.hxx:177
bool getParagraph(int pId, MWAWParagraph ¶) const
tries to return the paragraph corresponding to an id
Definition: MacDrawProStyleManager.cxx:367
static MWAWColor colorFromHSL(unsigned char H, unsigned char S, unsigned char L)
return a color from a hsl color (basic)
Definition: libmwaw_internal.hxx:228
bool readPreferences8(MWAWEntry const &entry)
try to read the 8 pref resource Prf8:256
Definition: MacDrawProStyleManager.cxx:2966
Type
an enum used to define the gradient type
Definition: MWAWGraphicStyle.hxx:177
bool readPreferences6(MWAWEntry const &entry)
try to read the spelling pref resource Prf6:256
Definition: MacDrawProStyleManager.cxx:2912
bool readBWPatterns(MWAWEntry const &entry)
tries to read the BW pattern bawP:256
Definition: MacDrawProStyleManager.cxx:1489
bool readDashs(MWAWEntry const &entry, bool inRsrc=false)
tries to read the dash settings or the resource Dset:256
Definition: MacDrawProStyleManager.cxx:741
bool readArrows(MWAWEntry const &entry, bool inRsrc=false)
tries to read the Arrow styles or the resource Aset:256
Definition: MacDrawProStyleManager.cxx:677
Internal: the state of a MacDrawProStyleManager.
Definition: MacDrawProStyleManager.cxx:138
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
static MWAWColor colorFromCMYK(unsigned char c, unsigned char m, unsigned char y, unsigned char k)
return a color from a cmyk color ( basic)
Definition: libmwaw_internal.hxx:218
MWAWGraphicStyle::Gradient::Type m_type
the gradient type
Definition: MacDrawProStyleManager.cxx:83
bool readGrid(MWAWEntry const &entry)
try to read the Grid: resource, grid of palette position
Definition: MacDrawProStyleManager.cxx:2777
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20