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

Protected Member Functions

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

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

◆ m_actTab

int MacWrtProStructuresListenerState::m_actTab
protected

◆ m_isMainZone

bool MacWrtProStructuresListenerState::m_isMainZone
protected

◆ m_newPageDone

bool MacWrtProStructuresListenerState::m_newPageDone
protected

◆ m_numCols

int MacWrtProStructuresListenerState::m_numCols
protected

◆ m_numTab

int MacWrtProStructuresListenerState::m_numTab
protected

◆ m_section

int MacWrtProStructuresListenerState::m_section
protected

◆ 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 on Mon Jan 20 2025 00:00:00 for libmwaw by doxygen 1.14.0