MWAWPageSpan Class Reference

A class which defines the page properties. More...

#include <MWAWPageSpan.hxx>

List of all members.

Public Types

enum  FormOrientation { PORTRAIT, LANDSCAPE }
 the page orientation More...
enum  PageNumberPosition {
  None = 0, TopLeft, TopCenter, TopRight,
  BottomLeft, BottomCenter, BottomRight
}
 a fixed page number position More...

Public Member Functions

 MWAWPageSpan ()
 constructor
virtual ~MWAWPageSpan ()
 destructor
double getFormLength () const
 returns the page length
double getFormWidth () const
 returns the page width
FormOrientation getFormOrientation () const
 returns the page orientation
double getMarginLeft () const
 returns the left margin
double getMarginRight () const
 returns the right margin
double getMarginTop () const
 returns the top margin
double getMarginBottom () const
 returns the bottom margin
double getPageLength () const
 returns the page length (form width without margin )
double getPageWidth () const
 returns the page width (form width without margin )
MWAWColor backgroundColor () const
 returns the background color
int getPageNumber () const
int getPageSpan () const
void setHeaderFooter (MWAWHeaderFooter const &headerFooter)
 add a header/footer on some page
void setFormLength (const double formLength)
 set the total page length
void setFormWidth (const double formWidth)
 set the total page width
void setFormOrientation (const FormOrientation formOrientation)
 set the form orientation
void setMarginLeft (const double marginLeft)
 set the page left margin
void setMarginRight (const double marginRight)
 set the page right margin
void setMarginTop (const double marginTop)
 set the page top margin
void setMarginBottom (const double marginBottom)
 set the page bottom margin
void setMargins (double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
 set all the margins
void checkMargins ()
 check if the page margins are consistent with the page dimension, if not update them
void setBackgroundColor (MWAWColor color=MWAWColor::white())
 set the background color
void setPageNumber (const int pageNumber)
 set the page number
void setPageSpan (const int pageSpan)
 set the page span ( default 1)
bool operator== (shared_ptr< MWAWPageSpan > const &pageSpan) const
 operator==
bool operator!= (shared_ptr< MWAWPageSpan > const &pageSpan) const
 operator!=

Protected Member Functions

void getPageProperty (WPXPropertyList &pList) const
 add the page properties in pList
void sendHeaderFooters (MWAWContentListener *listener) const
 send the page's headers/footers if some exists
int getHeaderFooterPosition (MWAWHeaderFooter::Type type, MWAWHeaderFooter::Occurence occurence)
 return the header footer positions in m_headerFooterList
void removeHeaderFooter (MWAWHeaderFooter::Type type, MWAWHeaderFooter::Occurence occurence)
 remove a header footer
bool containsHeaderFooter (MWAWHeaderFooter::Type type, MWAWHeaderFooter::Occurence occurence)
 return true if we have a header footer in this position

Private Attributes

double m_formLength
 the form length
double m_formWidth
 the form width
FormOrientation m_formOrientation
 the form orientation
double m_margins [4]
 the margins: libmwaw::Left, ...
MWAWColor m_backgroundColor
 the page background color: default white
int m_pageNumber
 the page number ( or -1)
std::vector< MWAWHeaderFooterm_headerFooterList
 the list of header
int m_pageSpan
 the number of page

Friends

class MWAWContentListener

Detailed Description

A class which defines the page properties.


Member Enumeration Documentation

the page orientation

Enumerator:
PORTRAIT 
LANDSCAPE 

a fixed page number position

Enumerator:
None 
TopLeft 
TopCenter 
TopRight 
BottomLeft 
BottomCenter 
BottomRight 

Constructor & Destructor Documentation

constructor

destructor


Member Function Documentation

returns the background color

Referenced by operator==().

check if the page margins are consistent with the page dimension, if not update them

Referenced by MRWParser::readPrintInfo().

return true if we have a header footer in this position

Referenced by setHeaderFooter().

double MWAWPageSpan::getFormLength ( ) const [inline]

returns the page length

Referenced by MWAWParser::getFormLength(), and getPageProperty().

returns the page orientation

Referenced by getPageProperty().

double MWAWPageSpan::getFormWidth ( ) const [inline]

returns the page width

Referenced by MWAWParser::getFormWidth(), and getPageProperty().

return the header footer positions in m_headerFooterList

Referenced by containsHeaderFooter(), removeHeaderFooter(), and setHeaderFooter().

double MWAWPageSpan::getMarginBottom ( ) const [inline]

returns the bottom margin

Referenced by CWParser::createDocument(), getPageProperty(), and operator==().

double MWAWPageSpan::getMarginLeft ( ) const [inline]

returns the left margin

Referenced by getPageProperty(), WPParser::getParagraph(), and operator==().

double MWAWPageSpan::getMarginRight ( ) const [inline]

returns the right margin

Referenced by CWParser::createDocument(), getPageProperty(), and operator==().

double MWAWPageSpan::getMarginTop ( ) const [inline]

returns the top margin

Referenced by getPageProperty(), and operator==().

double MWAWPageSpan::getPageLength ( ) const [inline]
int MWAWPageSpan::getPageNumber ( ) const [inline]

Referenced by operator==().

void MWAWPageSpan::getPageProperty ( WPXPropertyList &  pList) const [protected]

add the page properties in pList

Referenced by MWAWContentListener::_openPageSpan().

double MWAWPageSpan::getPageWidth ( ) const [inline]

returns the page width (form width without margin )

Referenced by MWAWParser::getPageWidth().

bool MWAWPageSpan::operator!= ( shared_ptr< MWAWPageSpan > const &  pageSpan) const [inline]

operator!=

bool MWAWPageSpan::operator== ( shared_ptr< MWAWPageSpan > const &  pageSpan) const

operator==

Referenced by operator!=().

remove a header footer

Referenced by setHeaderFooter().

void MWAWPageSpan::sendHeaderFooters ( MWAWContentListener listener) const [protected]

send the page's headers/footers if some exists

Referenced by MWAWContentListener::_openPageSpan().

void MWAWPageSpan::setPageNumber ( const int  pageNumber) [inline]

set the page number

Referenced by DMText::updatePageSpanList().


Friends And Related Function Documentation

friend class MWAWContentListener [friend]

Member Data Documentation

the page background color: default white

Referenced by backgroundColor(), getPageProperty(), and setBackgroundColor().

double MWAWPageSpan::m_formWidth [private]

the page number ( or -1)

Referenced by getPageNumber(), and setPageNumber().

int MWAWPageSpan::m_pageSpan [private]

the number of page

Referenced by getPageSpan(), and setPageSpan().


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