MWProStructuresListenerState Class Reference

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

#include <MWProStructures.hxx>

List of all members.

Public Member Functions

 MWProStructuresListenerState (shared_ptr< MWProStructures > structures, bool mainZone)
 the constructor
 ~MWProStructuresListenerState ()
 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 (MWProStructuresInternal::Font const &font)
 sends the font properties to the listener
void sendParagraph (MWProStructuresInternal::Paragraph const &para)
 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< MWProStructuresm_structures
shared_ptr
< MWProStructuresInternal::Font
m_font
shared_ptr
< MWProStructuresInternal::Paragraph
m_paragraph

Detailed Description

an interface to transmit the info of MWProStructures to a listener


Constructor & Destructor Documentation

MWProStructuresListenerState::MWProStructuresListenerState ( shared_ptr< MWProStructures structures,
bool  mainZone 
)

the constructor


Member Function Documentation

debug function which returns a string corresponding to a fontId

Referenced by MWProParser::sendText().

std::vector< int > MWProStructuresListenerState::getPageBreaksPos ( ) const

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

Referenced by MWProParser::sendText().

debug function which returns a string corresponding to a paragrapId

Referenced by MWProParser::sendText().

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

Referenced by MWProParser::sendText().

bool MWProStructuresListenerState::isSent ( int  blockId)

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

Referenced by MWProParser::sendText().

bool MWProStructuresListenerState::newPage ( bool  softBreak = false) [protected]

returns the actual section

Referenced by MWProParser::sendText().

force resent data : font + paragraph

Referenced by MWProParser::sendText().

bool MWProStructuresListenerState::send ( int  blockId)

try to send a block which corresponds to blockid

Referenced by MWProParser::sendText().

send a character

Referenced by MWProParser::sendText().

try to send a character style

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

sends the font properties to the listener

try to send a paragraph

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

sends the paragraph properties to the listener

try to send the i^th section

Referenced by MWProStructuresListenerState(), and sendChar().


Member Data Documentation

Referenced by newPage().

Referenced by newPage(), and sendChar().


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