Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MacWrtProStructuresListenerState Class Reference

an interface to transmit the info of MacWrtProStructures to a listener More...

`#include <MacWrtProStructures.hxx>`

## Public Member Functions
| MacWrtProStructuresListenerState (std::shared_ptr< MacWrtProStructures > const &structures, bool mainZone)
| the constructor More...
| ~MacWrtProStructuresListenerState ()
| the destructor More...
bool | isSent (int blockId)
| returns true if the block is already sent ( or does not exists) More...
bool | send (int blockId)
| try to send a block which corresponds to blockid More...
void | sendSection (int numSection)
| try to send the i^th section More...
bool | sendFont (int id)
| try to send a character style More...
bool | sendParagraph (int id)
| try to send a paragraph More...
void | sendChar (char c)
| send a character More...
bool | resendAll ()
| force resent data : font + paragraph More...
int | numSection () const
| returns the actual section More...
std::vector< int > | getPageBreaksPos () const
| return a list of page break position ( as some page break are soft ) More...
void | insertSoftPageBreak ()
| insert a page break ( if we are not on a new page ) More...
std::string | getFontDebugString (int fontId)
| debug function which returns a string corresponding to a fontId More...
std::string | getParagraphDebugString (int paraId)
| debug function which returns a string corresponding to a paragrapId More...

## Protected Member Functions
bool | newPage (bool softBreak=false)
| create a new page More...
void | sendFont (MacWrtProStructuresInternal::Font const &font)
| sends the font properties to the listener More...
void | sendParagraph (MacWrtProStructuresInternal::Paragraph const &para)
| sends the paragraph properties to the listener More...

## Protected Attributes
bool | m_isMainZone
int | m_actPage
int | m_actTab
int | m_numTab
int | m_section
int | m_numCols
bool | m_newPageDone
std::shared_ptr< MacWrtProStructures > | m_structures
std::shared_ptr< MacWrtProStructuresInternal::Font > | m_font
std::shared_ptr< MacWrtProStructuresInternal::Paragraph > | m_paragraph

## Detailed Description

an interface to transmit the info of MacWrtProStructures to a listener

## Constructor & Destructor Documentation

## ◆ MacWrtProStructuresListenerState()

MacWrtProStructuresListenerState::MacWrtProStructuresListenerState | ( | std::shared_ptr< MacWrtProStructures > const & | structures,
|  | bool | mainZone
| ) |  |

the constructor

## ◆ ~MacWrtProStructuresListenerState()

MacWrtProStructuresListenerState::~MacWrtProStructuresListenerState | ( |  | ) |

the destructor

## Member Function Documentation

## ◆ getFontDebugString()

std::string MacWrtProStructuresListenerState::getFontDebugString | ( | int | fontId | ) |

debug function which returns a string corresponding to a fontId

Referenced by MacWrtProParser::sendText().

## ◆ getPageBreaksPos()

std::vector< int > MacWrtProStructuresListenerState::getPageBreaksPos | ( |  | ) | const

return a list of page break position ( as some page break are soft )

Referenced by MacWrtProParser::sendText().

## ◆ getParagraphDebugString()

std::string MacWrtProStructuresListenerState::getParagraphDebugString | ( | int | paraId | ) |

debug function which returns a string corresponding to a paragrapId

Referenced by MacWrtProParser::sendText().

## ◆ insertSoftPageBreak()

void MacWrtProStructuresListenerState::insertSoftPageBreak | ( |  | ) |

insert a page break ( if we are not on a new page )

Referenced by MacWrtProParser::sendText().

## ◆ isSent()

bool MacWrtProStructuresListenerState::isSent | ( | int | blockId | ) |

returns true if the block is already sent ( or does not exists)

Referenced by MacWrtProParser::sendText(), and MacWrtProStructures::setAsciiName().

## ◆ newPage()

bool MacWrtProStructuresListenerState::newPage | ( | bool | softBreak = `false` | ) |
| protected

create a new page

Referenced by insertSoftPageBreak(), MacWrtProStructuresListenerState(), sendChar(), and sendSection().

## ◆ numSection()

int MacWrtProStructuresListenerState::numSection | ( |  | ) | const
| inline

returns the actual section

Referenced by MacWrtProParser::sendText().

## ◆ resendAll()

bool MacWrtProStructuresListenerState::resendAll | ( |  | ) |

force resent data : font + paragraph

Referenced by MacWrtProParser::sendText().

## ◆ send()

bool MacWrtProStructuresListenerState::send | ( | int | blockId | ) |

try to send a block which corresponds to blockid

Referenced by MacWrtProParser::sendText(), and MacWrtProStructures::setAsciiName().

## ◆ sendChar()

void MacWrtProStructuresListenerState::sendChar | ( | char | c | ) |

send a character

Referenced by MacWrtProParser::sendText().

## ◆ sendFont() [1/2]

bool MacWrtProStructuresListenerState::sendFont | ( | int | id | ) |

try to send a character style

Referenced by resendAll(), and MacWrtProParser::sendText().

## ◆ sendFont() [2/2]

void MacWrtProStructuresListenerState::sendFont | ( | MacWrtProStructuresInternal::Font const & | font | ) |
| protected

sends the font properties to the listener

## ◆ sendParagraph() [1/2]

bool MacWrtProStructuresListenerState::sendParagraph | ( | int | id | ) |

try to send a paragraph

Referenced by resendAll(), sendChar(), and MacWrtProParser::sendText().

## ◆ sendParagraph() [2/2]

void MacWrtProStructuresListenerState::sendParagraph | ( | MacWrtProStructuresInternal::Paragraph const & | para | ) |
| protected

sends the paragraph properties to the listener

## ◆ sendSection()

void MacWrtProStructuresListenerState::sendSection | ( | int | numSection | ) |

try to send the i^th section

Referenced by MacWrtProStructuresListenerState(), and sendChar().

## Member Data Documentation

## ◆ m_actPage

int MacWrtProStructuresListenerState::m_actPage
| protected

Referenced by newPage().

## ◆ m_actTab

int MacWrtProStructuresListenerState::m_actTab
| protected

Referenced by newPage(), and sendChar().

## ◆ m_font

std::shared_ptr<MacWrtProStructuresInternal::Font> MacWrtProStructuresListenerState::m_font
| protected

Referenced by resendAll(), and sendFont().

## ◆ m_isMainZone

bool MacWrtProStructuresListenerState::m_isMainZone
| protected

Referenced by getPageBreaksPos(), newPage(), and sendChar().

## ◆ m_newPageDone

bool MacWrtProStructuresListenerState::m_newPageDone
| protected

Referenced by insertSoftPageBreak(), newPage(), send(), and sendChar().

## ◆ m_numCols

int MacWrtProStructuresListenerState::m_numCols
| protected

Referenced by sendChar(), and sendSection().

## ◆ m_numTab

int MacWrtProStructuresListenerState::m_numTab
| protected

Referenced by sendChar(), and sendParagraph().

## ◆ m_paragraph

std::shared_ptr<MacWrtProStructuresInternal::Paragraph> MacWrtProStructuresListenerState::m_paragraph
| protected

Referenced by resendAll(), sendChar(), and sendParagraph().

## ◆ m_section

int MacWrtProStructuresListenerState::m_section
| protected

Referenced by sendChar().

## ◆ m_structures

std::shared_ptr<MacWrtProStructures> MacWrtProStructuresListenerState::m_structures
| protected

Referenced by getFontDebugString(), getPageBreaksPos(), getParagraphDebugString(), isSent(), MacWrtProStructuresListenerState(), newPage(), send(), sendChar(), sendFont(), sendParagraph(), and sendSection().

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

- MacWrtProStructures.hxx
- MacWrtProStructures.cxx