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, int version)
 the constructor More...
 
 ~MacWrtProStructuresListenerState ()
 the destructor More...
 
bool isSent (int graphicId)
 returns true if the graphic is already sent ( or does not exists) More...
 
bool send (int graphicId)
 try to send a graphic which corresponds to graphicid 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...
 
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...
 

Protected Member Functions

bool newPage (bool softBreak=false)
 create a new page More...
 

Protected Attributes

bool m_isMainZone
 
int m_version
 
int m_actPage
 
int m_actTab
 
int m_numTab
 
int m_section
 
int m_numCols
 
bool m_newPageDone
 
std::shared_ptr< MacWrtProStructuresm_structures
 

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,
int  version 
)

the constructor

◆ ~MacWrtProStructuresListenerState()

MacWrtProStructuresListenerState::~MacWrtProStructuresListenerState ( )

the destructor

Member Function Documentation

◆ getPageBreaksPos()

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

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

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  graphicId)

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

Referenced by MacWrtProParser::sendText().

◆ newPage()

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

◆ numSection()

int MacWrtProStructuresListenerState::numSection ( ) const
inline

returns the actual section

Referenced by MacWrtProParser::sendText().

◆ send()

bool MacWrtProStructuresListenerState::send ( int  graphicId)

try to send a graphic which corresponds to graphicid

Referenced by MacWrtProParser::sendText().

◆ sendChar()

void MacWrtProStructuresListenerState::sendChar ( char  c)

send a character

Referenced by MacWrtProParser::sendText().

◆ sendFont()

bool MacWrtProStructuresListenerState::sendFont ( int  id)

try to send a character style

Referenced by MacWrtProParser::sendText().

◆ sendParagraph()

bool MacWrtProStructuresListenerState::sendParagraph ( int  id)

try to send a paragraph

Referenced by MacWrtProParser::sendText().

◆ sendSection()

void MacWrtProStructuresListenerState::sendSection ( int  numSection)

try to send the i^th section

Referenced by MacWrtProStructuresListenerState(), newPage(), 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_isMainZone

bool MacWrtProStructuresListenerState::m_isMainZone
protected

◆ m_newPageDone

bool MacWrtProStructuresListenerState::m_newPageDone
protected

◆ m_numCols

int MacWrtProStructuresListenerState::m_numCols
protected

Referenced by sendChar(), and sendSection().

◆ m_numTab

int MacWrtProStructuresListenerState::m_numTab
protected

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

◆ m_section

int MacWrtProStructuresListenerState::m_section
protected

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

◆ m_structures

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

◆ m_version

int MacWrtProStructuresListenerState::m_version
protected

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

Generated for libmwaw by doxygen 1.8.14