MacDraft5StyleManager Class Reference

class to read/store MacDraft5 v4-v5 styles More...

`#include <MacDraft5StyleManager.hxx>`

## Public Member Functions

| MacDraft5StyleManager (MacDraft5Parser &parser)
| constructor
virtual | ~MacDraft5StyleManager ()
| destructor

## Protected Member Functions

bool | readResources ()
| try to read the resource block: either the resource fork(v4) or last file's part (v5)
bool | readBitmapZones ()
| try to read the bitmap zones: end file(v4) or the zone before the rsrc part (v5)
long | getEndDataPosition () const
| returns the end of data position (before the bitmap zones) if known or -1
std::string | updateLineStyle (int type, int id, int dashId, MWAWGraphicStyle &style)
| update the line style ( using line type and col/pat id and the dashId).
std::string | updateSurfaceStyle (int type, int id, MWAWGraphicStyle &style)
| update the surface graphic style ( using surface type and id ).
std::string | updateArrows (int startId, int endId, MWAWGraphicStyle &style)
| update the arrow style
bool | getColor (int cId, MWAWColor &color) const
| tries to return the color corresponding to an id
bool | getBitmap (int bId, MWAWEmbeddedObject &picture) const
| try to get a bitmap
bool | getPixmap (int pId, MWAWEmbeddedObject &picture, MWAWVec2i &pictSize, MWAWColor &avColor) const
| try to get a pixpat pattern
void | updatePatterns ()
| try to update the pattern list
bool | readResource (MWAWEntry &entry, bool inRsrc)
| try to read a resource
bool | readBitmap (MWAWEntry const &entry)
| try to a bitmap
bool | readColors (MWAWEntry const &entry, bool inRsrc)
| try to read a list of colors : pltt 128
bool | readDashes (MWAWEntry const &entry, bool inRsrc)
| try to read a list of dashs : DASH 128
bool | readFonts (MWAWEntry const &entry, bool inRsrc)
| try to read FNUS:1 resource
bool | readPatterns (MWAWEntry const &entry, bool inRsrc)
| try to read a list of patterns/gradient? : PLDT 128
bool | readPixPat (MWAWEntry const &entry, bool inRsrc)
| try to read a ppat resource
bool | readVersion (MWAWEntry &entry)
| try to read a version (in data fork)
bool | readRSRCList (MWAWEntry const &entry, bool inRsrc)
| try to read a resource list: PATL:128 or Opac:128+xxx
bool | readBitmapList (MWAWEntry const &entry, bool inRsrc)
| try to read BITList:0 resource
bool | readOpcd (MWAWEntry const &entry, bool inRsrc)
| try to read Opcd:131 resource (unknown)

## Protected Attributes

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

## Friends

class | MacDraft5Parser

## Detailed Description

class to read/store MacDraft5 v4-v5 styles

## Constructor & Destructor Documentation

## MacDraft5StyleManager()

MacDraft5StyleManager::MacDraft5StyleManager | ( | MacDraft5Parser & | parser | ) |

explicit

constructor

## ~MacDraft5StyleManager()

MacDraft5StyleManager::~MacDraft5StyleManager | ( |  | ) |

virtual

destructor

## Member Function Documentation

## getBitmap()

bool MacDraft5StyleManager::getBitmap | ( | int | bId,
|  | MWAWEmbeddedObject & | picture ) const

protected

try to get a bitmap

## getColor()

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

protected

tries to return the color corresponding to an id

## getEndDataPosition()

long MacDraft5StyleManager::getEndDataPosition | ( |  | ) | const

protected

returns the end of data position (before the bitmap zones) if known or -1

## getPixmap()

bool MacDraft5StyleManager::getPixmap | ( | int | pId,
|  | MWAWEmbeddedObject & | picture,
|  | MWAWVec2i & | pictSize,
|  | MWAWColor & | avColor ) const

protected

try to get a pixpat pattern

Referenced by updatePatterns().

## readBitmap()

bool MacDraft5StyleManager::readBitmap | ( | MWAWEntry const & | entry | ) |

protected

try to a bitmap

Referenced by readBitmapZones().

## readBitmapList()

bool MacDraft5StyleManager::readBitmapList | ( | MWAWEntry const & | entry,
|  | bool | inRsrc )

protected

try to read BITList:0 resource

Referenced by readResource().

## readBitmapZones()

bool MacDraft5StyleManager::readBitmapZones | ( |  | ) |

protected

try to read the bitmap zones: end file(v4) or the zone before the rsrc part (v5)

## readColors()

bool MacDraft5StyleManager::readColors | ( | MWAWEntry const & | entry,
|  | bool | inRsrc )

protected

try to read a list of colors : pltt 128

Referenced by readResource().

## readDashes()

bool MacDraft5StyleManager::readDashes | ( | MWAWEntry const & | entry,
|  | bool | inRsrc )

protected

try to read a list of dashs : DASH 128

Referenced by readResource().

## readFonts()

bool MacDraft5StyleManager::readFonts | ( | MWAWEntry const & | entry,
|  | bool | inRsrc )

protected

try to read FNUS:1 resource

Referenced by readResource().

## readOpcd()

bool MacDraft5StyleManager::readOpcd | ( | MWAWEntry const & | entry,
|  | bool | inRsrc )

protected

try to read Opcd:131 resource (unknown)

Referenced by readResource().

## readPatterns()

bool MacDraft5StyleManager::readPatterns | ( | MWAWEntry const & | entry,
|  | bool | inRsrc )

protected

try to read a list of patterns/gradient? : PLDT 128

Referenced by readResource().

## readPixPat()

bool MacDraft5StyleManager::readPixPat | ( | MWAWEntry const & | entry,
|  | bool | inRsrc )

protected

try to read a ppat resource

Referenced by readResource().

## readResource()

bool MacDraft5StyleManager::readResource | ( | MWAWEntry & | entry,
|  | bool | inRsrc )

protected

try to read a resource

Referenced by readResources().

## readResources()

bool MacDraft5StyleManager::readResources | ( |  | ) |

protected

try to read the resource block: either the resource fork(v4) or last file's part (v5)

## readRSRCList()

bool MacDraft5StyleManager::readRSRCList | ( | MWAWEntry const & | entry,
|  | bool | inRsrc )

protected

try to read a resource list: PATL:128 or Opac:128+xxx

Referenced by readResource().

## readVersion()

bool MacDraft5StyleManager::readVersion | ( | MWAWEntry & | entry | ) |

protected

try to read a version (in data fork)

Referenced by readResource().

## updateArrows()

std::string MacDraft5StyleManager::updateArrows | ( | int | startId,
|  | int | endId,
|  | MWAWGraphicStyle & | style )

protected

update the arrow style

## updateLineStyle()

std::string MacDraft5StyleManager::updateLineStyle | ( | int | type,
|  | int | id,
|  | int | dashId,
|  | MWAWGraphicStyle & | style )

protected

update the line style ( using line type and col/pat id and the dashId).

Returns
  a string which can be use as debug message

## updatePatterns()

void MacDraft5StyleManager::updatePatterns | ( |  | ) |

protected

try to update the pattern list

Referenced by readResources().

## updateSurfaceStyle()

std::string MacDraft5StyleManager::updateSurfaceStyle | ( | int | type,
|  | int | id,
|  | MWAWGraphicStyle & | style )

protected

update the surface graphic style ( using surface type and id ).

Returns
  a string which can be use as debug message

## Friends And Related Symbol Documentation

## MacDraft5Parser

friend class MacDraft5Parser

friend

Referenced by MacDraft5Parser, and MacDraft5StyleManager().

## Member Data Documentation

## m_parser

MacDraft5Parser& MacDraft5StyleManager::m_parser

protected

the main parser

Referenced by MacDraft5StyleManager(), and readResource().

## m_parserState

MWAWParserStatePtr MacDraft5StyleManager::m_parserState

protected

the parser state

Referenced by MacDraft5StyleManager(), readBitmap(), readBitmapList(), readBitmapZones(), readColors(), readDashes(), readFonts(), readOpcd(), readPatterns(), readPixPat(), readResource(), readResources(), readRSRCList(), and readVersion().

## m_state

std::shared_ptr<MacDraft5StyleManagerInternal::State> MacDraft5StyleManager::m_state

protected

the state

Referenced by getBitmap(), getColor(), getEndDataPosition(), getPixmap(), MacDraft5StyleManager(), readBitmap(), readBitmapList(), readBitmapZones(), readColors(), readDashes(), readPatterns(), readPixPat(), readResources(), updateArrows(), updateLineStyle(), updatePatterns(), and updateSurfaceStyle().

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

- MacDraft5StyleManager.hxx
- MacDraft5StyleManager.cxx