All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::Layout::Section Class Reference

#include <ContentTree.h>

+ Inheritance diagram for pdftron::Layout::Section:

Public Types

enum  PageGroup { e_first_page = 1, e_even_pages = 2, e_odd_pages = 3 }
 

Public Member Functions

ElementRef< ContentContainer > GetHeader (PageGroup pages) const
 
ContentContainer GetOrCreateHeader (PageGroup pages)
 
void RemoveHeader (PageGroup pages)
 
ElementRef< ContentContainer > GetFooter (PageGroup pages) const
 
ContentContainer GetOrCreateFooter (PageGroup pages)
 
void RemoveFooter (PageGroup pages)
 
void SetPageSize (double width, double height)
 
double GetPageWidth ()
 
double GetPageHeight ()
 
void SetMargins (double left, double top, double right, double bottom)
 
double GetLeftMargin ()
 
double GetTopMargin ()
 
double GetRightMargin ()
 
double GetBottomMargin ()
 
- Public Member Functions inherited from pdftron::Layout::ContentContainer
Paragraph AddParagraph ()
 
Paragraph AddParagraph (const UString &text)
 
List AddList ()
 
Table AddTable ()
 
- Public Member Functions inherited from pdftron::Layout::ContentNode
 ~ContentNode ()
 
void Destroy ()
 
ContentNodeIterator GetContentNodeIterator ()
 
- Public Member Functions inherited from pdftron::Layout::ContentElement
 ~ContentElement ()
 
void Destroy ()
 
ElementRef< List > AsList () const
 
ElementRef< ListItem > AsListItem () const
 
ElementRef< ContentNode > AsContentNode () const
 
ElementRef< TextRun > AsTextRun () const
 
ElementRef< PageNumber > AsPageNumber () const
 
ElementRef< Shape > AsShape () const
 
ElementRef< Float > AsFloat () const
 
ElementRef< Chart > AsChart () const
 
ElementRef< Paragraph > AsParagraph () const
 
ElementRef< Table > AsTable () const
 
ElementRef< TableRow > AsTableRow () const
 
ElementRef< TableCell > AsTableCell () const
 
TextStyledElement GetTextStyledElement ()
 

Friends

class FlowDocument
 

Additional Inherited Members

- Public Attributes inherited from pdftron::Layout::ContentElement
TRN_ContentElement m_impl
 
- Protected Member Functions inherited from pdftron::Layout::ContentContainer
 ContentContainer (TRN_ContentContainer impl)
 
- Protected Member Functions inherited from pdftron::Layout::ContentNode
 ContentNode (TRN_ContentNode impl)
 
- Protected Member Functions inherited from pdftron::Layout::ContentElement
 ContentElement (TRN_ContentElement impl)
 

Detailed Description

A Section is a content container representing a group of consecutive pages of a FlowDocument that share the same headers and footers.

A FlowDocument always contains at least one section. Content added directly to the FlowDocument is added to the current (last) section.

Definition at line 497 of file ContentTree.h.

Member Enumeration Documentation

Selects the group of pages a header or footer applies to.

Enumerator
e_first_page 

The first page of the section.

e_even_pages 

The even numbered pages of the section.

e_odd_pages 

The odd numbered pages of the section.

Definition at line 510 of file ContentTree.h.

Member Function Documentation

double pdftron::Layout::Section::GetBottomMargin ( )

Get the bottom margin used by this section.

Returns
The bottom margin in points.
ElementRef<ContentContainer> pdftron::Layout::Section::GetFooter ( PageGroup  pages) const

Retrieve the existing footer of the section for the given page group.

Parameters
pagesThe group of pages the footer applies to.
Returns
An ElementRef holding the footer content container, or an invalid ElementRef if no such footer exists.
ElementRef<ContentContainer> pdftron::Layout::Section::GetHeader ( PageGroup  pages) const

Retrieve the existing header of the section for the given page group.

Parameters
pagesThe group of pages the header applies to.
Returns
An ElementRef holding the header content container, or an invalid ElementRef if no such header exists.
double pdftron::Layout::Section::GetLeftMargin ( )

Get the left margin used by this section.

Returns
The left margin in points.
ContentContainer pdftron::Layout::Section::GetOrCreateFooter ( PageGroup  pages)

Retrieve the footer of the section for the given page group, creating an empty one if it does not exist yet.

The content of an already existing footer is preserved.

Parameters
pagesThe group of pages the footer applies to.
Returns
The footer content container.
ContentContainer pdftron::Layout::Section::GetOrCreateHeader ( PageGroup  pages)

Retrieve the header of the section for the given page group, creating an empty one if it does not exist yet.

The content of an already existing header is preserved.

Parameters
pagesThe group of pages the header applies to.
Returns
The header content container.
double pdftron::Layout::Section::GetPageHeight ( )

Get the page height used by this section.

Returns
The page height in points.
double pdftron::Layout::Section::GetPageWidth ( )

Get the page width used by this section.

Returns
The page width in points.
double pdftron::Layout::Section::GetRightMargin ( )

Get the right margin used by this section.

Returns
The right margin in points.
double pdftron::Layout::Section::GetTopMargin ( )

Get the top margin used by this section.

Returns
The top margin in points.
void pdftron::Layout::Section::RemoveFooter ( PageGroup  pages)

Remove the footer of the section for the given page group.

Does nothing if no such footer exists.

Parameters
pagesThe group of pages the footer applies to.
void pdftron::Layout::Section::RemoveHeader ( PageGroup  pages)

Remove the header of the section for the given page group.

Does nothing if no such header exists.

Parameters
pagesThe group of pages the header applies to.
void pdftron::Layout::Section::SetMargins ( double  left,
double  top,
double  right,
double  bottom 
)

Set the margins for the pages of this section, overriding the document default margins.

Parameters
leftThe left margin in points
topThe top margin in points
rightThe right margin in points
bottomThe bottom margin in points
void pdftron::Layout::Section::SetPageSize ( double  width,
double  height 
)

Set the page size for the pages of this section, overriding the document default page size.

Parameters
widthThe width in points
heightThe height in points

Friends And Related Function Documentation

friend class FlowDocument
friend

Definition at line 499 of file ContentTree.h.


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