GWGraph Class Reference

the main class to read the graphic part of a HanMac Word-J file More...

`#include <GWGraph.hxx>`

## Public Member Functions

| GWGraph (GWParser &parser)
| constructor More...
virtual | ~GWGraph ()
| destructor More...
int | version () const
| returns the file version More...
int | numPages () const
| returns the number of pages More...

## Protected Member Functions

bool | sendPageGraphics ()
| try to send the page graphic More...
void | flushExtra ()
| sends the data which have not yet been sent to the listener More...
bool | readPatterns (MWAWEntry const &entry)
| read a pattern list block ( PAT# resource block ) More...
bool | readPalettes (MWAWEntry const &entry)
| read a list of color and maybe patterns ( PlTT resource block: v2 ) More...
bool | sendPageFrames (GWGraphInternal::Zone const &zone)
| try to send all data corresponding to a zone More...
bool | sendFrame (shared_ptr< GWGraphInternal::Frame > frame, GWGraphInternal::Zone const &zone, int order)
| try to send a frame More...
bool | sendTextbox (MWAWEntry const &entry)
| try to send the textbox text More...
bool | sendPicture (MWAWEntry const &entry, MWAWPosition pos)
| try to send a picture More...
bool | sendBasic (GWGraphInternal::FrameBasic const &graph, GWGraphInternal::Zone const &zone, MWAWPosition pos)
| try to send a basic picture More...
bool | readGraphicZone ()
| try to read the graphic zone ( draw file or end of v2 text file) More...
bool | isGraphicZone ()
| return true if this corresponds to a graphic zone More...
bool | findGraphicZone ()
| try to find the beginning of the next graphic zone More...
bool | isPageFrames ()
| check if a zone is or not a page frame zone More...
bool | readPageFrames ()
| try to read a list of page frame ( picture, texture or basic ) More...
shared_ptr < GWGraphInternal::Frame > | readFrameHeader ()
| try to read a basic frame header More...
bool | readStyle (GWGraphInternal::Style &style)
| try to read a zone style More...
bool | readLineFormat (std::string &extra)
| try to read a line format style? in v1 More...

## Static Protected Member Functions

static void | buildFrameDataReadOrderFromTree (std::vector< std::vector< int > > const &tree, int id, std::vector< int > &order, std::set< int > &seen)
| reconstruct the order to used for reading the frame data More...

## Protected Attributes

MWAWParserStatePtr | m_parserState
| the parser state More...
shared_ptr < GWGraphInternal::State > | m_state
| the state More...
GWParser * | m_mainParser
| the main parser; More...

## Private Member Functions

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

## Friends

class | GWParser
class | GWGraphInternal::SubDocument

## Detailed Description

the main class to read the graphic part of a HanMac Word-J file

## Constructor & Destructor Documentation

GWGraph::GWGraph | ( | GWParser & | parser | ) |

constructor

GWGraph::~GWGraph | ( |  | ) |

virtual

destructor

GWGraph::GWGraph | ( | GWGraph const & | orig | ) |

private

## Member Function Documentation

void GWGraph::buildFrameDataReadOrderFromTree | ( | std::vector< std::vector< int > > const & | tree,
|  | int | id,
|  | std::vector< int > & | order,
|  | std::set< int > & | seen
| ) |  |

static protected

reconstruct the order to used for reading the frame data

Referenced by readPageFrames().

bool GWGraph::findGraphicZone | ( |  | ) |

protected

try to find the beginning of the next graphic zone

Referenced by readGraphicZone().

void GWGraph::flushExtra | ( |  | ) |

protected

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

bool GWGraph::isGraphicZone | ( |  | ) |

protected

return true if this corresponds to a graphic zone

Referenced by findGraphicZone(), and readGraphicZone().

bool GWGraph::isPageFrames | ( |  | ) |

protected

check if a zone is or not a page frame zone

Referenced by isGraphicZone(), and readPageFrames().

int GWGraph::numPages | ( |  | ) | const

returns the number of pages

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

private

shared_ptr< GWGraphInternal::Frame > GWGraph::readFrameHeader | ( |  | ) |

protected

try to read a basic frame header

Referenced by readPageFrames().

bool GWGraph::readGraphicZone | ( |  | ) |

protected

try to read the graphic zone ( draw file or end of v2 text file)

bool GWGraph::readLineFormat | ( | std::string & | extra | ) |

protected

try to read a line format style? in v1

Referenced by readGraphicZone(), readPageFrames(), and readStyle().

bool GWGraph::readPageFrames | ( |  | ) |

protected

try to read a list of page frame ( picture, texture or basic )

Referenced by readGraphicZone().

bool GWGraph::readPalettes | ( | MWAWEntry const & | entry | ) |

protected

read a list of color and maybe patterns ( PlTT resource block: v2 )

bool GWGraph::readPatterns | ( | MWAWEntry const & | entry | ) |

protected

read a pattern list block ( PAT# resource block )

bool GWGraph::readStyle | ( | GWGraphInternal::Style & | style | ) |

protected

try to read a zone style

Referenced by readGraphicZone(), and readPageFrames().

bool GWGraph::sendBasic | ( | GWGraphInternal::FrameBasic const & | graph,
|  | GWGraphInternal::Zone const & | zone,
|  | MWAWPosition | pos
| ) |  |

protected

try to send a basic picture

Referenced by sendFrame().

bool GWGraph::sendFrame | ( | shared_ptr< GWGraphInternal::Frame > | frame,
|  | GWGraphInternal::Zone const & | zone,
|  | int | order
| ) |  |

protected

try to send a frame

Referenced by sendPageFrames().

bool GWGraph::sendPageFrames | ( | GWGraphInternal::Zone const & | zone | ) |

protected

try to send all data corresponding to a zone

Referenced by flushExtra(), and sendPageGraphics().

bool GWGraph::sendPageGraphics | ( |  | ) |

protected

try to send the page graphic

bool GWGraph::sendPicture | ( | MWAWEntry const & | entry,
|  | MWAWPosition | pos
| ) |  |

protected

try to send a picture

Referenced by sendFrame().

bool GWGraph::sendTextbox | ( | MWAWEntry const & | entry | ) |

protected

try to send the textbox text

Referenced by GWGraphInternal::SubDocument::parse().

int GWGraph::version | ( |  | ) | const

returns the file version

Referenced by findGraphicZone(), isGraphicZone(), isPageFrames(), readFrameHeader(), readGraphicZone(), readPageFrames(), and readStyle().

## Friends And Related Function Documentation

friend class GWGraphInternal::SubDocument

friend

friend class GWParser

friend

## Member Data Documentation

GWParser* GWGraph::m_mainParser

protected

the main parser;

Referenced by findGraphicZone(), isGraphicZone(), isPageFrames(), readGraphicZone(), readPageFrames(), readPalettes(), readPatterns(), sendFrame(), sendPageFrames(), and sendTextbox().

MWAWParserStatePtr GWGraph::m_parserState

protected

the parser state

Referenced by findGraphicZone(), flushExtra(), isGraphicZone(), isPageFrames(), readFrameHeader(), readGraphicZone(), readLineFormat(), readPageFrames(), readStyle(), sendBasic(), sendFrame(), sendPageFrames(), sendPageGraphics(), sendPicture(), and version().

shared_ptr<GWGraphInternal::State> GWGraph::m_state

protected

the state

Referenced by flushExtra(), numPages(), readPageFrames(), and sendPageGraphics().

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

- GWGraph.hxx
- GWGraph.cxx