an interface to transmit the info of MacWrtProStructures to a listener More...
#include <MacWrtProStructures.hxx>
Public Member Functions | |
| MacWrtProStructuresListenerState (shared_ptr< MacWrtProStructures > structures, bool mainZone) | |
| the constructor | |
| ~MacWrtProStructuresListenerState () | |
| the destructor | |
| bool | isSent (int blockId) |
| returns true if the block is already sent ( or does not exists) | |
| bool | send (int blockId) |
| try to send a block which corresponds to blockid | |
| void | sendSection (int numSection) |
| try to send the i^th section | |
| bool | sendFont (int id) |
| try to send a character style | |
| bool | sendParagraph (int id) |
| try to send a paragraph | |
| void | sendChar (char c) |
| send a character | |
| bool | resendAll () |
| force resent data : font + paragraph | |
| int | numSection () const |
| returns the actual section | |
| std::vector< int > | getPageBreaksPos () const |
| return a list of page break position ( as some page break are soft ) | |
| void | insertSoftPageBreak () |
| insert a page break ( if we are not on a new page ) | |
| std::string | getFontDebugString (int fontId) |
| debug function which returns a string corresponding to a fontId | |
| std::string | getParagraphDebugString (int paraId) |
| debug function which returns a string corresponding to a paragrapId | |
Protected Member Functions | |
| bool | newPage (bool softBreak=false) |
| create a new page | |
| void | sendFont (MacWrtProStructuresInternal::Font const &font) |
| sends the font properties to the listener | |
| void | sendParagraph (MacWrtProStructuresInternal::Paragraph const ¶) |
| sends the paragraph properties to the listener | |
Protected Attributes | |
| bool | m_isMainZone |
| int | m_actPage |
| int | m_actTab |
| int | m_numTab |
| int | m_section |
| int | m_numCols |
| bool | m_newPageDone |
| shared_ptr< MacWrtProStructures > | m_structures |
| shared_ptr < MacWrtProStructuresInternal::Font > | m_font |
| shared_ptr < MacWrtProStructuresInternal::Paragraph > | m_paragraph |
an interface to transmit the info of MacWrtProStructures to a listener
| MacWrtProStructuresListenerState::MacWrtProStructuresListenerState | ( | shared_ptr< MacWrtProStructures > | structures, |
| bool | mainZone | ||
| ) |
the constructor
the destructor
| std::string MacWrtProStructuresListenerState::getFontDebugString | ( | int | fontId | ) |
debug function which returns a string corresponding to a fontId
Referenced by MacWrtProParser::sendText().
| std::vector< int > MacWrtProStructuresListenerState::getPageBreaksPos | ( | ) | const |
return a list of page break position ( as some page break are soft )
Referenced by MacWrtProParser::sendText().
| std::string MacWrtProStructuresListenerState::getParagraphDebugString | ( | int | paraId | ) |
debug function which returns a string corresponding to a paragrapId
Referenced by MacWrtProParser::sendText().
insert a page break ( if we are not on a new page )
Referenced by MacWrtProParser::sendText().
| bool MacWrtProStructuresListenerState::isSent | ( | int | blockId | ) |
returns true if the block is already sent ( or does not exists)
Referenced by MacWrtProParser::sendText().
| bool MacWrtProStructuresListenerState::newPage | ( | bool | softBreak = false | ) | [protected] |
create a new page
Referenced by insertSoftPageBreak(), MacWrtProStructuresListenerState(), sendChar(), and sendSection().
| int MacWrtProStructuresListenerState::numSection | ( | ) | const [inline] |
returns the actual section
Referenced by MacWrtProParser::sendText().
force resent data : font + paragraph
Referenced by MacWrtProParser::sendText().
| bool MacWrtProStructuresListenerState::send | ( | int | blockId | ) |
try to send a block which corresponds to blockid
Referenced by MacWrtProParser::sendText().
| void MacWrtProStructuresListenerState::sendChar | ( | char | c | ) |
send a character
Referenced by MacWrtProParser::sendText().
| bool MacWrtProStructuresListenerState::sendFont | ( | int | id | ) |
try to send a character style
Referenced by resendAll(), and MacWrtProParser::sendText().
| void MacWrtProStructuresListenerState::sendFont | ( | MacWrtProStructuresInternal::Font const & | font | ) | [protected] |
sends the font properties to the listener
| bool MacWrtProStructuresListenerState::sendParagraph | ( | int | id | ) |
try to send a paragraph
Referenced by resendAll(), sendChar(), and MacWrtProParser::sendText().
| void MacWrtProStructuresListenerState::sendParagraph | ( | MacWrtProStructuresInternal::Paragraph const & | para | ) | [protected] |
sends the paragraph properties to the listener
| void MacWrtProStructuresListenerState::sendSection | ( | int | numSection | ) |
try to send the i^th section
Referenced by MacWrtProStructuresListenerState(), and sendChar().
int MacWrtProStructuresListenerState::m_actPage [protected] |
Referenced by newPage().
int MacWrtProStructuresListenerState::m_actTab [protected] |
Referenced by newPage(), and sendChar().
shared_ptr<MacWrtProStructuresInternal::Font> MacWrtProStructuresListenerState::m_font [protected] |
Referenced by getFontDebugString(), resendAll(), and sendFont().
bool MacWrtProStructuresListenerState::m_isMainZone [protected] |
Referenced by getPageBreaksPos(), newPage(), numSection(), and sendChar().
bool MacWrtProStructuresListenerState::m_newPageDone [protected] |
Referenced by insertSoftPageBreak(), newPage(), send(), and sendChar().
int MacWrtProStructuresListenerState::m_numCols [protected] |
Referenced by sendChar(), and sendSection().
int MacWrtProStructuresListenerState::m_numTab [protected] |
Referenced by sendChar(), and sendParagraph().
shared_ptr<MacWrtProStructuresInternal::Paragraph> MacWrtProStructuresListenerState::m_paragraph [protected] |
Referenced by resendAll(), sendChar(), and sendParagraph().
int MacWrtProStructuresListenerState::m_section [protected] |
Referenced by numSection(), and sendChar().
shared_ptr<MacWrtProStructures> MacWrtProStructuresListenerState::m_structures [protected] |