CWGraph Class Reference

the main class to read the graphic part of Claris Works file More...

`#include <CWGraph.hxx>`

## Public Member Functions

| CWGraph (CWParser &parser)
| constructor More...
virtual | ~CWGraph ()
| destructor More...
int | version () const
| returns the file version More...
int | numPages () const
| returns the number of pages More...
shared_ptr< CWStruct::DSET > | readGroupZone (CWStruct::DSET const &zone, MWAWEntry const &entry, bool &complete)
| reads the zone Group DSET More...
shared_ptr< CWStruct::DSET > | readBitmapZone (CWStruct::DSET const &zone, MWAWEntry const &entry, bool &complete)
| reads the zone Bitmap DSET More...
bool | readColorList (MWAWEntry const &entry)
| reads a color map zone ( v4-v6) More...
bool | getColor (int id, MWAWColor &col) const
| return the color which corresponds to an id (if possible) More...
float | getPatternPercent (int id) const
| return the pattern percent which corresponds to an id (or -1) More...
bool | getWallPaperColor (int id, MWAWColor &col) const
| return the wall paper color which corresponds to an id (if possible) More...
bool | getLineColor (CWGraphInternal::Style const style, MWAWColor &col) const
| return the line color which corresponds to some ids (if possible) More...
bool | getSurfaceColor (CWGraphInternal::Style const style, MWAWColor &col) const
| return the surface color which corresponds to some ids (if possible) More...

## Protected Member Functions

bool | sendZone (int number, MWAWPosition pos=MWAWPosition())
| sends the zone data to the listener (if it exists ) More...
void | flushExtra ()
| sends the data which have not yet been sent to the listener More...
void | updateInformation (CWGraphInternal::Group &group) const
| update the group information to choose how to send the group data More...
shared_ptr< CWGraphInternal::Zone > | readGroupDef (MWAWEntry const &entry)
bool | readBasicGraphic (MWAWEntry const &entry, CWGraphInternal::ZoneBasic &zone)
bool | readGroupData (CWGraphInternal::Group &group, long beginGroupPos)
bool | readPolygonData (shared_ptr< CWGraphInternal::Zone > zone)
bool | readPictData (shared_ptr< CWGraphInternal::Zone > zone)
bool | readPICT (CWGraphInternal::ZonePict &zone)
bool | readPS (CWGraphInternal::ZonePict &zone)
bool | readOLE (CWGraphInternal::ZonePict &zone)
bool | readQTimeData (shared_ptr< CWGraphInternal::Zone > zone)
bool | readNamedPict (CWGraphInternal::ZonePict &zone)
bool | readBitmapColorMap (std::vector< MWAWColor > &cMap)
bool | readBitmapData (CWGraphInternal::ZoneBitmap &zone)
bool | readGroupHeader (CWGraphInternal::Group &group)
bool | readGroupUnknown (CWGraphInternal::Group &group, int zoneSz, int id)
bool | sendPicture (CWGraphInternal::ZonePict &pict, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList())
| sends a picture zone More...
bool | sendBasicPicture (CWGraphInternal::ZoneBasic &pict, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList())
| sends a basic graphic zone More...
bool | sendBitmap (CWGraphInternal::ZoneBitmap &pict, MWAWPosition pos, WPXPropertyList extras=WPXPropertyList())
| sends a bitmap graphic zone More...

## Protected Attributes

MWAWParserStatePtr | m_parserState
| the parser state More...
shared_ptr < CWGraphInternal::State > | m_state
| the state More...
CWParser * | m_mainParser
| the main parser; More...
shared_ptr< CWStyleManager > | m_styleManager
| the style manager More...

## Private Member Functions

| CWGraph (CWGraph const &orig)
CWGraph & | operator= (CWGraph const &orig)

## Friends

class | CWParser

## Detailed Description

the main class to read the graphic part of Claris Works file

## Constructor & Destructor Documentation

CWGraph::CWGraph | ( | CWParser & | parser | ) |

constructor

CWGraph::~CWGraph | ( |  | ) |

virtual

destructor

CWGraph::CWGraph | ( | CWGraph const & | orig | ) |

private

## Member Function Documentation

void CWGraph::flushExtra | ( |  | ) |

protected

sends the data which have not yet been sent to the listener

bool CWGraph::getColor | ( | int | id,
|  | MWAWColor & | col
| ) |  | const

return the color which corresponds to an id (if possible)

Referenced by getLineColor(), and getSurfaceColor().

bool CWGraph::getLineColor | ( | CWGraphInternal::Style const | style,
|  | MWAWColor & | col
| ) |  | const

return the line color which corresponds to some ids (if possible)

Referenced by sendBasicPicture(), and sendZone().

float CWGraph::getPatternPercent | ( | int | id | ) | const

return the pattern percent which corresponds to an id (or -1)

Referenced by getLineColor(), and getSurfaceColor().

bool CWGraph::getSurfaceColor | ( | CWGraphInternal::Style const | style,
|  | MWAWColor & | col
| ) |  | const

return the surface color which corresponds to some ids (if possible)

Referenced by sendBasicPicture(), and sendZone().

bool CWGraph::getWallPaperColor | ( | int | id,
|  | MWAWColor & | col
| ) |  | const

return the wall paper color which corresponds to an id (if possible)

Referenced by getSurfaceColor().

int CWGraph::numPages | ( |  | ) | const

returns the number of pages

CWGraph& CWGraph::operator= | ( | CWGraph const & | orig | ) |

private

bool CWGraph::readBasicGraphic | ( | MWAWEntry const & | entry,
|  | CWGraphInternal::ZoneBasic & | zone
| ) |  |

protected

Referenced by readGroupDef().

bool CWGraph::readBitmapColorMap | ( | std::vector< MWAWColor > & | cMap | ) |

protected

bool CWGraph::readBitmapData | ( | CWGraphInternal::ZoneBitmap & | zone | ) |

protected

shared_ptr< CWStruct::DSET > CWGraph::readBitmapZone | ( | CWStruct::DSET const & | zone,
|  | MWAWEntry const & | entry,
|  | bool & | complete
| ) |  |

reads the zone Bitmap DSET

the end of this block is very simillar to a bitmapdef, excepted maybe the first integer ....

bool CWGraph::readColorList | ( | MWAWEntry const & | entry | ) |

reads a color map zone ( v4-v6)

bool CWGraph::readGroupData | ( | CWGraphInternal::Group & | group,
|  | long | beginGroupPos
| ) |  |

protected

shared_ptr< CWGraphInternal::Zone > CWGraph::readGroupDef | ( | MWAWEntry const & | entry | ) |

protected

bool CWGraph::readGroupHeader | ( | CWGraphInternal::Group & | group | ) |

protected

a list of int16 : find 00320060 00480060 0048ffe9 013a0173 01ba0173 01ea02a0 01f8ffe7 02080295 020c012c 02140218 02ae01c1 02ca02c9-02cc02c6-02400000 03f801e6 8002e3ff e0010000 ee02e6ff

Referenced by readGroupData().

bool CWGraph::readGroupUnknown | ( | CWGraphInternal::Group & | group,
|  | int | zoneSz,
|  | int | id
| ) |  |

protected

find f1=8|9|f|14|15|2a|40|73|e9, f2=0|d4, f5=0|80, f6=0|33

Referenced by readGroupHeader().

shared_ptr< CWStruct::DSET > CWGraph::readGroupZone | ( | CWStruct::DSET const & | zone,
|  | MWAWEntry const & | entry,
|  | bool & | complete
| ) |  |

reads the zone Group DSET

bool CWGraph::readNamedPict | ( | CWGraphInternal::ZonePict & | zone | ) |

protected

Referenced by readQTimeData().

bool CWGraph::readOLE | ( | CWGraphInternal::ZonePict & | zone | ) |

protected

Referenced by readPictData().

bool CWGraph::readPICT | ( | CWGraphInternal::ZonePict & | zone | ) |

protected

Referenced by readPictData().

bool CWGraph::readPictData | ( | shared_ptr< CWGraphInternal::Zone > | zone | ) |

protected

Referenced by readGroupData().

bool CWGraph::readPolygonData | ( | shared_ptr< CWGraphInternal::Zone > | zone | ) |

protected

Referenced by readGroupData().

bool CWGraph::readPS | ( | CWGraphInternal::ZonePict & | zone | ) |

protected

Referenced by readPictData().

bool CWGraph::readQTimeData | ( | shared_ptr< CWGraphInternal::Zone > | zone | ) |

protected

Referenced by readGroupData().

bool CWGraph::sendBasicPicture | ( | CWGraphInternal::ZoneBasic & | pict,
|  | MWAWPosition | pos,
|  | WPXPropertyList | extras = `WPXPropertyList()`
| ) |  |

protected

sends a basic graphic zone

Referenced by sendZone().

bool CWGraph::sendBitmap | ( | CWGraphInternal::ZoneBitmap & | pict,
|  | MWAWPosition | pos,
|  | WPXPropertyList | extras = `WPXPropertyList()`
| ) |  |

protected

sends a bitmap graphic zone

let go

Referenced by sendZone().

bool CWGraph::sendPicture | ( | CWGraphInternal::ZonePict & | pict,
|  | MWAWPosition | pos,
|  | WPXPropertyList | extras = `WPXPropertyList()`
| ) |  |

protected

sends a picture zone

Referenced by sendZone().

bool CWGraph::sendZone | ( | int | number,
|  | MWAWPosition | pos = `MWAWPosition()`
| ) |  |

protected

sends the zone data to the listener (if it exists )

Referenced by flushExtra().

void CWGraph::updateInformation | ( | CWGraphInternal::Group & | group | ) | const

protected

update the group information to choose how to send the group data

Referenced by numPages(), and sendZone().

int CWGraph::version | ( |  | ) | const

returns the file version

Referenced by getColor(), getPatternPercent(), getWallPaperColor(), readGroupData(), and readGroupDef().

## Friends And Related Function Documentation

friend class CWParser

friend

## Member Data Documentation

CWParser* CWGraph::m_mainParser

protected

the main parser;

Referenced by readGroupHeader(), readGroupUnknown(), sendZone(), and updateInformation().

MWAWParserStatePtr CWGraph::m_parserState

protected

the parser state

Referenced by flushExtra(), readBasicGraphic(), readBitmapColorMap(), readBitmapData(), readColorList(), readGroupData(), readGroupDef(), readGroupHeader(), readGroupUnknown(), readNamedPict(), readOLE(), readPICT(), readPictData(), readPolygonData(), readPS(), readQTimeData(), sendBasicPicture(), sendBitmap(), sendPicture(), sendZone(), and version().

shared_ptr<CWGraphInternal::State> CWGraph::m_state

protected

the state

Referenced by flushExtra(), getColor(), getPatternPercent(), getWallPaperColor(), numPages(), readColorList(), sendZone(), and updateInformation().

shared_ptr<CWStyleManager> CWGraph::m_styleManager

protected

the style manager

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

- CWGraph.hxx
- CWGraph.cxx