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 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:161
bool readColors(MWAWEntry const &entry)
tries to read colors map Ctbl:256
Definition: MacDrawProStyleManager.cxx:1421
MacDrawProParser & m_parser
the main parser
Definition: MacDrawProStyleManager.hxx:186
void initBWPatterns()
init the black and white patterns list
Definition: MacDrawProStyleManager.cxx:232
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
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:184
uint16_t m_leaderCharacter
the leader char
Definition: MWAWParagraph.hxx:75
bool readGradientPalette(MWAWEntry const &entry, int fSz)
try to read the gradient palette resource RaEL:128
Definition: MacDrawProStyleManager.cxx:2512
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
std::vector< MWAWColor > m_colorList
the color list
Definition: MacDrawProStyleManager.cxx:165
int m_numBWPatterns
the number of BW pattern
Definition: MacDrawProStyleManager.cxx:158
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
void setColors(std::vector< MWAWColor > const &cols)
sets the array of indexed colors
Definition: MWAWPictBitmap.hxx:432
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:2061
MWAWVec2f m_percentCenter
the gradient center
Definition: MacDrawProStyleManager.cxx:84
bool readUPDL(MWAWEntry const &entry)
try to read the UPDL resource, maybe U? Palette Display Layer
Definition: MacDrawProStyleManager.cxx:2716
float m_angle
the gradient angle
Definition: MacDrawProStyleManager.cxx:82
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:156
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:2656
bool readRulerSettings(MWAWEntry const &entry)
tries to read the Ruler settings resource Rset:256 or Rst2:256
Definition: MacDrawProStyleManager.cxx:1674
virtual bool getBinary(MWAWEmbeddedObject &picture) const
returns the final picture
Definition: MWAWPictBitmap.hxx:220
GradientType m_gradientType
the gradient type
Definition: MWAWGraphicStyle.hxx:396
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:117
@ boldBit
Definition: MWAWFont.hxx:182
bool readFontNames()
tries to read the font name resources Fmtx:256 and Fnms:256
Definition: MacDrawProStyleManager.cxx:1352
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:231
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
@ CENTER
Definition: MWAWParagraph.hxx:48
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:123
MWAWVec2f m_documentSize
the document size (in point)
Definition: MacDrawProStyleManager.cxx:152
int id() const
returns the id
Definition: MWAWEntry.hxx:153
the class to store a color
Definition: libmwaw_internal.hxx:182
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
bool readFontStyles(MWAWEntry const &entry)
tries to read the font style ( last style in v0 data fork )
Definition: MacDrawProStyleManager.cxx:546
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:150
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:126
std::vector< float > m_penSizeList
the list of pen size
Definition: MacDrawProStyleManager.cxx:175
@ G_Rectangular
Definition: MWAWGraphicStyle.hxx:55
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
MWAWParserStatePtr m_parserState
the parser state
Definition: MacDrawProStyleManager.hxx:188
@ G_None
Definition: MWAWGraphicStyle.hxx:55
virtual ~MacDrawProStyleManager()
destructor
Definition: MacDrawProStyleManager.cxx:293
@ Simple
Definition: MWAWFont.hxx:49
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:509
bool readFAMap(MWAWEntry const &entry, int N, int fSz)
try to read the FA map DPFa:3
Definition: MacDrawProStyleManager.cxx:2304
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:115
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:142
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:247
bool readFAPalette(MWAWEntry const &entry, int fSz)
try to read the FA palette resource FaEL:128
Definition: MacDrawProStyleManager.cxx:2347
bool readColorPalette(MWAWEntry const &entry, int fSz)
try to read the color palette resource CoEL:128
Definition: MacDrawProStyleManager.cxx:2132
@ DECIMAL
Definition: MWAWParagraph.hxx:48
bool readPreferences1(MWAWEntry const &entry)
try to read the first pref resource Prf1:256
Definition: MacDrawProStyleManager.cxx:2855
std::vector< MWAWFont > m_fontList
the list of font
Definition: MacDrawProStyleManager.cxx:171
bool readGradientMap(MWAWEntry const &entry, int N, int fSz)
try to read the gradian map DPRa:2
Definition: MacDrawProStyleManager.cxx:2392
std::vector< GradientStop > m_gradientStopList
the list of gradient limits
Definition: MWAWGraphicStyle.hxx:402
std::vector< Gradient > m_gradientList
the gradient list
Definition: MacDrawProStyleManager.cxx:182
@ G_Ellipsoid
Definition: MWAWGraphicStyle.hxx:55
void initColors()
init the colors list
Definition: MacDrawProStyleManager.cxx:185
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:127
@ embossBit
Definition: MWAWFont.hxx:182
bool readRSRCZones()
tries to read the RSRC zones
Definition: MacDrawProStyleManager.cxx:1063
bool readRulers(MWAWEntry const &entry, bool inRsrc=false)
tries to read the Ruler styles or the resource Drul:256
Definition: MacDrawProStyleManager.cxx:868
MWAWGraphicStyle::GradientType m_type
the gradient type
Definition: MacDrawProStyleManager.cxx:78
shared_ptr< MacDrawProStyleManagerInternal::State > m_state
the state
Definition: MacDrawProStyleManager.hxx:190
bool readDocumentInfo(MWAWEntry const &entry)
tries to read the Document Information resource Dinf:256
Definition: MacDrawProStyleManager.cxx:1261
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:169
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:171
bool readPens(MWAWEntry const &entry, bool inRsrc=false)
tries to read the Pen styles or the resource PSet:256
Definition: MacDrawProStyleManager.cxx:798
bool readPatternPalette(MWAWEntry const &entry, int fSz)
try to read the pattern palette resource PaEL:128
Definition: MacDrawProStyleManager.cxx:2254
@ AtLeast
Definition: MWAWParagraph.hxx:91
std::string m_extra
extra data
Definition: MWAWFont.hxx:552
bool readParagraphStyles(MWAWEntry const &entry)
tries to read the paragraph style ( last style in v1 data fork )
Definition: MacDrawProStyleManager.cxx:927
@ JustificationCenter
Definition: MWAWParagraph.hxx:87
@ shadowBit
Definition: MWAWFont.hxx:183
bool getPattern(int pId, MWAWGraphicStyle::Pattern &pattern) const
tries to return the pattern corresponding to an id
Definition: MacDrawProStyleManager.cxx:382
bool getPenSize(int pId, float &penSize) const
tries to return the pen size corresponding to an id
Definition: MacDrawProStyleManager.cxx:371
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
std::ostream & operator<<(std::ostream &o, Gradient const &grad)
Definition: MacDrawProStyleManager.cxx:89
bool readPaletteDef(MWAWEntry const &entry)
try to read a palette definition PaDB:[0-3]
Definition: MacDrawProStyleManager.cxx:1830
bool readPreferencesListBool(MWAWEntry const &entry, int num)
try to read the first pref resource Prf[23459]:256
Definition: MacDrawProStyleManager.cxx:2820
friend std::ostream & operator<<(std::ostream &o, Gradient const &grad)
a print operator
Definition: MacDrawProStyleManager.cxx:89
bool readViews(MWAWEntry const &entry)
reads the view positions resource Dvws:256
Definition: MacDrawProStyleManager.cxx:1728
std::vector< MWAWParagraph > m_paragraphList
the list of paragraph
Definition: MacDrawProStyleManager.cxx:173
unsigned char getBlue() const
returns the green value
Definition: libmwaw_internal.hxx:250
@ G_Radial
Definition: MWAWGraphicStyle.hxx:55
int m_numStyleZones[6]
the number of zones
Definition: MacDrawProStyleManager.cxx:154
bool hasGradient() const
returns true if the gradient is defined
Definition: MacDrawProStyleManager.cxx:70
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:1626
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:242
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
bool readColorPatterns(MWAWEntry const &entry)
tries to read the color pattern colP:256
Definition: MacDrawProStyleManager.cxx:1530
State()
constructor
Definition: MacDrawProStyleManager.cxx:135
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:73
void setRow(int j, U const *val)
sets all cell contents of a row
Definition: MWAWPictBitmap.hxx:416
the main class to read a MacDraw II file
Definition: MacDrawProStyleManager.hxx:60
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
std::vector< MWAWGraphicStyle::GradientStop > m_stopList
the list of gradient limits
Definition: MacDrawProStyleManager.cxx:80
std::vector< MWAWGraphicStyle::Pattern > m_BWPatternList
the patterns list
Definition: MacDrawProStyleManager.cxx:178
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:226
void initPens()
init the pens list
Definition: MacDrawProStyleManager.cxx:225
double m_position
the tab position
Definition: MWAWParagraph.hxx:71
bool readPaletteMap(MWAWEntry const &entry, int N, int dataSz)
try to read a palette map
Definition: MacDrawProStyleManager.cxx:2007
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:494
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
bool getColor(int cId, MWAWColor &color) const
tries to return the color corresponding to an id
Definition: MacDrawProStyleManager.cxx:302
@ G_Linear
Definition: MWAWGraphicStyle.hxx:55
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:134
bool readPaletteData(MWAWEntry const &entry, int dataSz)
try to read a palette data
Definition: MacDrawProStyleManager.cxx:1957
uint16_t m_decimalCharacter
the decimal char
Definition: MWAWParagraph.hxx:77
Gradient()
constructor
Definition: MacDrawProStyleManager.cxx:66
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:245
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1132
@ italicBit
Definition: MWAWFont.hxx:182
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:144
@ G_Square
Definition: MWAWGraphicStyle.hxx:55
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:348
std::string m_extra
extra data
Definition: MacDrawProStyleManager.cxx:86
bool getFont(int fId, MWAWFont &font) const
tries to return the font corresponding to an id
Definition: MacDrawProStyleManager.cxx:339
unsigned char getRed() const
returns the red value
Definition: libmwaw_internal.hxx:255
@ JustificationFull
Definition: MWAWParagraph.hxx:87
@ JustificationRight
Definition: MWAWParagraph.hxx:88
std::vector< MWAWColor > m_displayColorList
the display color list
Definition: MacDrawProStyleManager.cxx:167
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:88
MWAWVec2f m_gradientPercentCenter
the gradient center
Definition: MWAWGraphicStyle.hxx:408
int m_numPatternsInTool
the number of pattern in tool list
Definition: MacDrawProStyleManager.cxx:162
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
bool readPreferences(MWAWEntry const &entry)
tries to read the main Preferences resource Pref:256
Definition: MacDrawProStyleManager.cxx:1210
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:160
std::vector< MWAWGraphicStyle::Pattern > m_colorPatternList
the color patterns list
Definition: MacDrawProStyleManager.cxx:180
void initDashs()
init the dashs list
Definition: MacDrawProStyleManager.cxx:198
int m_numColors
the number of color
Definition: MacDrawProStyleManager.cxx:156
bool updateGradient(int gId, MWAWGraphicStyle &style) const
tries to update the style gradient
Definition: MacDrawProStyleManager.cxx:423
MacDrawProStyleManager(MacDrawProParser &parser)
constructor
Definition: MacDrawProStyleManager.cxx:288
float m_gradientAngle
the gradient angle
Definition: MWAWGraphicStyle.hxx:404
bool readRSRCDstl(MWAWEntry const &entry)
reads the Dstl:256 resource (unknown content)
Definition: MacDrawProStyleManager.cxx:1783
GradientType
an enum used to define the gradient type
Definition: MWAWGraphicStyle.hxx:55
bool readHeaderInfoStylePart(std::string &extra)
tries to read the header info part which corresponds to style data
Definition: MacDrawProStyleManager.cxx:442
bool getDash(int dId, std::vector< float > &dash) const
tries to return the dash definition corresponding to an id
Definition: MacDrawProStyleManager.cxx:360
@ 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:260
bool readPatternMap(MWAWEntry const &entry, int N, int fSz)
try to read the display pattern DPPa:1
Definition: MacDrawProStyleManager.cxx:2199
bool getParagraph(int pId, MWAWParagraph ¶) const
tries to return the paragraph corresponding to an id
Definition: MacDrawProStyleManager.cxx:350
static MWAWColor colorFromHSL(unsigned char H, unsigned char S, unsigned char L)
return a color from a hsl color (basic)
Definition: libmwaw_internal.hxx:209
bool readPreferences8(MWAWEntry const &entry)
try to read the 8 pref resource Prf8:256
Definition: MacDrawProStyleManager.cxx:2955
bool readPreferences6(MWAWEntry const &entry)
try to read the spelling pref resource Prf6:256
Definition: MacDrawProStyleManager.cxx:2901
bool readBWPatterns(MWAWEntry const &entry)
tries to read the BW pattern bawP:256
Definition: MacDrawProStyleManager.cxx:1475
bool readDashs(MWAWEntry const &entry, bool inRsrc=false)
tries to read the dash settings or the resource Dset:256
Definition: MacDrawProStyleManager.cxx:724
bool readArrows(MWAWEntry const &entry, bool inRsrc=false)
tries to read the Arrow styles or the resource Aset:256
Definition: MacDrawProStyleManager.cxx:660
Internal: the state of a MacDrawProStyleManager.
Definition: MacDrawProStyleManager.cxx:133
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
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:445
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:199
@ G_Axial
Definition: MWAWGraphicStyle.hxx:55
bool readGrid(MWAWEntry const &entry)
try to read the Grid: resource, grid of palette position
Definition: MacDrawProStyleManager.cxx:2766
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
Generated on Wed Jun 17 2020 06:30:10 for libmwaw by
doxygen 1.8.18