MacDrawProStyleManager Class Reference

the main class to read a MacDraw II file More...

`#include <MacDrawProStyleManager.hxx>`

## Public Member Functions

| MacDrawProStyleManager (MacDrawProParser &parser)
| constructor
virtual | ~MacDrawProStyleManager ()
| destructor

## Protected Member Functions

bool | readRSRCZones ()
| tries to read the RSRC zones
bool | readHeaderInfoStylePart (std::string &extra)
| tries to read the header info part which corresponds to style data
bool | readStyles (long const(&sizeZones)[6])
| tries to read the style zone knowings the size and the number of data in each zones
bool | getColor (int cId, MWAWColor &color) const
| tries to return the color corresponding to an id
bool | getDash (int dId, std::vector< float > &dash) const
| tries to return the dash definition corresponding to an id
bool | getFont (int fId, MWAWFont &font) const
| tries to return the font corresponding to an id
bool | getParagraph (int pId, MWAWParagraph &para) const
| tries to return the paragraph corresponding to an id
bool | getPattern (int pId, MWAWGraphicStyle::Pattern &pattern) const
| tries to return the pattern corresponding to an id
bool | getPenSize (int pId, float &penSize) const
| tries to return the pen size corresponding to an id
bool | updateGradient (int gId, MWAWGraphicStyle &style) const
| tries to update the style gradient
bool | readFontStyles (MWAWEntry const &entry)
| tries to read the font style ( last style in v0 data fork )
bool | readParagraphStyles (MWAWEntry const &entry)
| tries to read the paragraph style ( last style in v1 data fork )
bool | readArrows (MWAWEntry const &entry, bool inRsrc=false)
| tries to read the Arrow styles or the resource Aset:256
bool | readDashs (MWAWEntry const &entry, bool inRsrc=false)
| tries to read the dash settings or the resource Dset:256
bool | readPens (MWAWEntry const &entry, bool inRsrc=false)
| tries to read the Pen styles or the resource PSet:256
bool | readRulers (MWAWEntry const &entry, bool inRsrc=false)
| tries to read the Ruler styles or the resource Drul:256
bool | readDocumentInfo (MWAWEntry const &entry)
| tries to read the Document Information resource Dinf:256
bool | readPreferences (MWAWEntry const &entry)
| tries to read the main Preferences resource Pref:256
bool | readFontNames ()
| tries to read the font name resources Fmtx:256 and Fnms:256
bool | readColors (MWAWEntry const &entry)
| tries to read colors map Ctbl:256
bool | readBWPatterns (MWAWEntry const &entry)
| tries to read the BW pattern bawP:256
bool | readColorPatterns (MWAWEntry const &entry)
| tries to read the color pattern colP:256
bool | readPatternsToolList (MWAWEntry const &entry)
| tries to read the list of pattern patR:256: list of BW/Color patterns list which appear in the patterns tools
bool | readRulerSettings (MWAWEntry const &entry)
| tries to read the Ruler settings resource Rset:256 or Rst2:256
bool | readViews (MWAWEntry const &entry)
| reads the view positions resource Dvws:256
bool | readRSRCDstl (MWAWEntry const &entry)
| reads the Dstl:256 resource (unknown content)
bool | readPaletteDef (MWAWEntry const &entry)
| try to read a palette definition PaDB:[0-3]
bool | readPaletteMap (MWAWEntry const &entry, int N, int dataSz)
| try to read a palette map
bool | readPaletteData (MWAWEntry const &entry, int dataSz)
| try to read a palette data
bool | readColorMap (MWAWEntry const &entry, int N, int fSz)
| try to read the display color map DPCo:0
bool | readPatternMap (MWAWEntry const &entry, int N, int fSz)
| try to read the display pattern DPPa:1
bool | readGradientMap (MWAWEntry const &entry, int N, int fSz)
| try to read the gradian map DPRa:2
bool | readFAMap (MWAWEntry const &entry, int N, int fSz)
| try to read the FA map DPFa:3
bool | readColorPalette (MWAWEntry const &entry, int fSz)
| try to read the color palette resource CoEL:128
bool | readFAPalette (MWAWEntry const &entry, int fSz)
| try to read the FA palette resource FaEL:128
bool | readGradientPalette (MWAWEntry const &entry, int fSz)
| try to read the gradient palette resource RaEL:128
bool | readPatternPalette (MWAWEntry const &entry, int fSz)
| try to read the pattern palette resource PaEL:128
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...
bool | readListNames (char const *type)
| try to read a splitted list of names
bool | readPreferencesListBool (MWAWEntry const &entry, int num)
| try to read the first pref resource Prf[23459]:256
bool | readPreferences1 (MWAWEntry const &entry)
| try to read the first pref resource Prf1:256
bool | readPreferences6 (MWAWEntry const &entry)
| try to read the spelling pref resource Prf6:256
bool | readPreferences8 (MWAWEntry const &entry)
| try to read the 8 pref resource Prf8:256
bool | readUPDL (MWAWEntry const &entry)
| try to read the UPDL resource, maybe U? Palette Display Layer
bool | readGrid (MWAWEntry const &entry)
| try to read the Grid: resource, grid of palette position

## Protected Attributes

MacDrawProParser & | m_parser
| the main parser
MWAWParserStatePtr | m_parserState
| the parser state
std::shared_ptr< MacDrawProStyleManagerInternal::State > | m_state
| the state

## Friends

class | MacDrawProParser

## Detailed Description

the main class to read a MacDraw II file

## Constructor & Destructor Documentation

## MacDrawProStyleManager()

MacDrawProStyleManager::MacDrawProStyleManager | ( | MacDrawProParser & | parser | ) |

explicit

constructor

## ~MacDrawProStyleManager()

MacDrawProStyleManager::~MacDrawProStyleManager | ( |  | ) |

virtual

destructor

## Member Function Documentation

## getColor()

bool MacDrawProStyleManager::getColor | ( | int | cId,
|  | MWAWColor & | color ) const

protected

tries to return the color corresponding to an id

Referenced by readFontStyles().

## getDash()

bool MacDrawProStyleManager::getDash | ( | int | dId,
|  | std::vector< float > & | dash ) const

protected

tries to return the dash definition corresponding to an id

## getFont()

bool MacDrawProStyleManager::getFont | ( | int | fId,
|  | MWAWFont & | font ) const

protected

tries to return the font corresponding to an id

## getParagraph()

bool MacDrawProStyleManager::getParagraph | ( | int | pId,
|  | MWAWParagraph & | para ) const

protected

tries to return the paragraph corresponding to an id

## getPattern()

bool MacDrawProStyleManager::getPattern | ( | int | pId,
|  | MWAWGraphicStyle::Pattern & | pattern ) const

protected

tries to return the pattern corresponding to an id

## getPenSize()

bool MacDrawProStyleManager::getPenSize | ( | int | pId,
|  | float & | penSize ) const

protected

tries to return the pen size corresponding to an id

## readArrows()

bool MacDrawProStyleManager::readArrows | ( | MWAWEntry const & | entry,
|  | bool | inRsrc = false )

protected

tries to read the Arrow styles or the resource Aset:256

Referenced by readRSRCZones(), and readStyles().

## readBWPatterns()

bool MacDrawProStyleManager::readBWPatterns | ( | MWAWEntry const & | entry | ) |

protected

tries to read the BW pattern bawP:256

Referenced by readRSRCZones().

## readColorMap()

bool MacDrawProStyleManager::readColorMap | ( | MWAWEntry const & | entry,
|  | int | N,
|  | int | fSz )

protected

try to read the display color map DPCo:0

Referenced by readPaletteMap().

## readColorPalette()

bool MacDrawProStyleManager::readColorPalette | ( | MWAWEntry const & | entry,
|  | int | fSz )

protected

try to read the color palette resource CoEL:128

Referenced by readPaletteData().

## readColorPatterns()

bool MacDrawProStyleManager::readColorPatterns | ( | MWAWEntry const & | entry | ) |

protected

tries to read the color pattern colP:256

Referenced by readRSRCZones().

## readColors()

bool MacDrawProStyleManager::readColors | ( | MWAWEntry const & | entry | ) |

protected

tries to read colors map Ctbl:256

Referenced by readRSRCZones().

## readDashs()

bool MacDrawProStyleManager::readDashs | ( | MWAWEntry const & | entry,
|  | bool | inRsrc = false )

protected

tries to read the dash settings or the resource Dset:256

Referenced by readRSRCZones(), and readStyles().

## readDocumentInfo()

bool MacDrawProStyleManager::readDocumentInfo | ( | MWAWEntry const & | entry | ) |

protected

tries to read the Document Information resource Dinf:256

Referenced by readRSRCZones().

## readFAMap()

bool MacDrawProStyleManager::readFAMap | ( | MWAWEntry const & | entry,
|  | int | N,
|  | int | fSz )

protected

try to read the FA map DPFa:3

Referenced by readPaletteMap().

## readFAPalette()

bool MacDrawProStyleManager::readFAPalette | ( | MWAWEntry const & | entry,
|  | int | fSz )

protected

try to read the FA palette resource FaEL:128

Referenced by readPaletteData().

## readFontNames()

bool MacDrawProStyleManager::readFontNames | ( |  | ) |

protected

tries to read the font name resources Fmtx:256 and Fnms:256

Referenced by readRSRCZones().

## readFontStyles()

bool MacDrawProStyleManager::readFontStyles | ( | MWAWEntry const & | entry | ) |

protected

tries to read the font style ( last style in v0 data fork )

Referenced by readStyles().

## readGradientMap()

bool MacDrawProStyleManager::readGradientMap | ( | MWAWEntry const & | entry,
|  | int | N,
|  | int | fSz )

protected

try to read the gradian map DPRa:2

Referenced by readPaletteMap().

## readGradientPalette()

bool MacDrawProStyleManager::readGradientPalette | ( | MWAWEntry const & | entry,
|  | int | fSz )

protected

try to read the gradient palette resource RaEL:128

Referenced by readPaletteData().

## readGrid()

bool MacDrawProStyleManager::readGrid | ( | MWAWEntry const & | entry | ) |

protected

try to read the Grid: resource, grid of palette position

Referenced by readRSRCZones().

## readHeaderInfoStylePart()

bool MacDrawProStyleManager::readHeaderInfoStylePart | ( | std::string & | extra | ) |

protected

tries to read the header info part which corresponds to style data

## readListNames() [1/2]

bool MacDrawProStyleManager::readListNames | ( | char const * | type | ) |

protected

try to read a splitted list of names

## readListNames() [2/2]

bool MacDrawProStyleManager::readListNames | ( | MWAWEntry const & | entry,
|  | int | N = -1 )

protected

try to read a list of names : CoNa:128 color name, FaNa:128 font color name, PaNa:128...

Referenced by readListNames(), readPaletteDef(), and readRSRCZones().

## readPaletteData()

bool MacDrawProStyleManager::readPaletteData | ( | MWAWEntry const & | entry,
|  | int | dataSz )

protected

try to read a palette data

Referenced by readPaletteDef().

## readPaletteDef()

bool MacDrawProStyleManager::readPaletteDef | ( | MWAWEntry const & | entry | ) |

protected

try to read a palette definition PaDB:[0-3]

Referenced by readRSRCZones().

## readPaletteMap()

bool MacDrawProStyleManager::readPaletteMap | ( | MWAWEntry const & | entry,
|  | int | N,
|  | int | dataSz )

protected

try to read a palette map

Referenced by readPaletteDef().

## readParagraphStyles()

bool MacDrawProStyleManager::readParagraphStyles | ( | MWAWEntry const & | entry | ) |

protected

tries to read the paragraph style ( last style in v1 data fork )

Referenced by readStyles().

## readPatternMap()

bool MacDrawProStyleManager::readPatternMap | ( | MWAWEntry const & | entry,
|  | int | N,
|  | int | fSz )

protected

try to read the display pattern DPPa:1

Referenced by readPaletteMap().

## readPatternPalette()

bool MacDrawProStyleManager::readPatternPalette | ( | MWAWEntry const & | entry,
|  | int | fSz )

protected

try to read the pattern palette resource PaEL:128

Referenced by readPaletteData().

## readPatternsToolList()

bool MacDrawProStyleManager::readPatternsToolList | ( | MWAWEntry const & | entry | ) |

protected

tries to read the list of pattern patR:256: list of BW/Color patterns list which appear in the patterns tools

Referenced by readRSRCZones().

## readPens()

bool MacDrawProStyleManager::readPens | ( | MWAWEntry const & | entry,
|  | bool | inRsrc = false )

protected

tries to read the Pen styles or the resource PSet:256

Referenced by readRSRCZones(), and readStyles().

## readPreferences()

bool MacDrawProStyleManager::readPreferences | ( | MWAWEntry const & | entry | ) |

protected

tries to read the main Preferences resource Pref:256

Referenced by readRSRCZones().

## readPreferences1()

bool MacDrawProStyleManager::readPreferences1 | ( | MWAWEntry const & | entry | ) |

protected

try to read the first pref resource Prf1:256

Referenced by readRSRCZones().

## readPreferences6()

bool MacDrawProStyleManager::readPreferences6 | ( | MWAWEntry const & | entry | ) |

protected

try to read the spelling pref resource Prf6:256

Referenced by readRSRCZones().

## readPreferences8()

bool MacDrawProStyleManager::readPreferences8 | ( | MWAWEntry const & | entry | ) |

protected

try to read the 8 pref resource Prf8:256

Referenced by readRSRCZones().

## readPreferencesListBool()

bool MacDrawProStyleManager::readPreferencesListBool | ( | MWAWEntry const & | entry,
|  | int | num )

protected

try to read the first pref resource Prf[23459]:256

Referenced by readRSRCZones().

## readRSRCDstl()

bool MacDrawProStyleManager::readRSRCDstl | ( | MWAWEntry const & | entry | ) |

protected

reads the Dstl:256 resource (unknown content)

Referenced by readRSRCZones().

## readRSRCZones()

bool MacDrawProStyleManager::readRSRCZones | ( |  | ) |

protected

tries to read the RSRC zones

## readRulers()

bool MacDrawProStyleManager::readRulers | ( | MWAWEntry const & | entry,
|  | bool | inRsrc = false )

protected

tries to read the Ruler styles or the resource Drul:256

Referenced by readRSRCZones(), and readStyles().

## readRulerSettings()

bool MacDrawProStyleManager::readRulerSettings | ( | MWAWEntry const & | entry | ) |

protected

tries to read the Ruler settings resource Rset:256 or Rst2:256

Referenced by readRSRCZones().

## readStyles()

bool MacDrawProStyleManager::readStyles | ( | long const(&) | sizeZones[6] | ) |

protected

tries to read the style zone knowings the size and the number of data in each zones

## readUPDL()

bool MacDrawProStyleManager::readUPDL | ( | MWAWEntry const & | entry | ) |

protected

try to read the UPDL resource, maybe U? Palette Display Layer

Referenced by readRSRCZones().

## readViews()

bool MacDrawProStyleManager::readViews | ( | MWAWEntry const & | entry | ) |

protected

reads the view positions resource Dvws:256

Referenced by readRSRCZones().

## updateGradient()

bool MacDrawProStyleManager::updateGradient | ( | int | gId,
|  | MWAWGraphicStyle & | style ) const

protected

tries to update the style gradient

## Friends And Related Symbol Documentation

## MacDrawProParser

friend class MacDrawProParser

friend

Referenced by MacDrawProParser, and MacDrawProStyleManager().

## Member Data Documentation

## m_parser

MacDrawProParser& MacDrawProStyleManager::m_parser

protected

the main parser

Referenced by MacDrawProStyleManager().

## m_parserState

MWAWParserStatePtr MacDrawProStyleManager::m_parserState

protected

the parser state

Referenced by getColor(), getPattern(), MacDrawProStyleManager(), readArrows(), readBWPatterns(), readColorMap(), readColorPalette(), readColorPatterns(), readColors(), readDashs(), readDocumentInfo(), readFAMap(), readFAPalette(), readFontNames(), readFontStyles(), readGradientMap(), readGradientPalette(), readGrid(), readHeaderInfoStylePart(), readListNames(), readListNames(), readPaletteData(), readPaletteDef(), readPaletteMap(), readParagraphStyles(), readPatternMap(), readPatternPalette(), readPatternsToolList(), readPens(), readPreferences(), readPreferences1(), readPreferences6(), readPreferences8(), readPreferencesListBool(), readRSRCDstl(), readRSRCZones(), readRulers(), readRulerSettings(), readStyles(), readUPDL(), and readViews().

## m_state

std::shared_ptr<MacDrawProStyleManagerInternal::State> MacDrawProStyleManager::m_state

protected

the state

Referenced by getColor(), getDash(), getFont(), getParagraph(), getPattern(), getPenSize(), MacDrawProStyleManager(), readArrows(), readBWPatterns(), readColorMap(), readColorPatterns(), readColors(), readDashs(), readDocumentInfo(), readFAMap(), readFontStyles(), readGradientMap(), readHeaderInfoStylePart(), readParagraphStyles(), readPatternMap(), readPatternsToolList(), readPens(), readRulers(), and updateGradient().

The documentation for this class was generated from the following files:

- MacDrawProStyleManager.hxx
- MacDrawProStyleManager.cxx