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

#include <ContentTree.h>

+ Inheritance diagram for pdftron::Layout::ContentElement:

Public Member Functions

 ~ContentElement ()
 
void Destroy ()
 
ElementRef< ListAsList () const
 
ElementRef< ListItemAsListItem () const
 
ElementRef< ContentNodeAsContentNode () const
 
ElementRef< TextRunAsTextRun () const
 
ElementRef< ParagraphAsParagraph () const
 
ElementRef< TableAsTable () const
 
ElementRef< TableRowAsTableRow () const
 
ElementRef< TableCellAsTableCell () const
 
TextStyledElement GetTextStyledElement ()
 

Public Attributes

TRN_ContentElement m_impl
 

Protected Member Functions

 ContentElement (TRN_ContentElement impl)
 

Detailed Description

Base class for all content elements in the document content tree. It contains methods to retrieve instances of derived classes via the AsDerivedClass() methods. The pattern is to retrieve a ElementRef<DerivedClass> object and then check if it is valid via the IsValid() method or casting to void*. If it is valid, the actual derived instance can be accessed through the ElementRef<DerivedClass> object.

Definition at line 200 of file ContentTree.h.

Constructor & Destructor Documentation

pdftron::Layout::ContentElement::ContentElement ( TRN_ContentElement  impl)
protected

Create a new ContentElement object, internal use only.

pdftron::Layout::ContentElement::~ContentElement ( )

Member Function Documentation

ElementRef<ContentNode> pdftron::Layout::ContentElement::AsContentNode ( ) const

Retrieve the ElementRef<ContentNode> object for this content element which can be used to validate if this element is a content node and, if so, to retrieve an associated ContentNode object.

Returns
The ElementRef<ContentNode> object
ElementRef<List> pdftron::Layout::ContentElement::AsList ( ) const

Retrieve the ElementRef<List> object for this content element which can be used to validate if this element is a list and, if so, to retrieve an associated List object.

Returns
The ElementRef<List> object
ElementRef<ListItem> pdftron::Layout::ContentElement::AsListItem ( ) const

Retrieve the ElementRef<List> object for this content element which can be used to validate if this element is a list item and, if so, to retrieve an associated ListItem object.

Returns
The ElementRef<ListItem> object
ElementRef<Paragraph> pdftron::Layout::ContentElement::AsParagraph ( ) const

Retrieve the ElementRef<Paragraph> object for this content element. This can be used to check if this element is a paragraph and, if so, to access the associated Paragraph object.

Returns
The ElementRef<Paragraph> object
ElementRef<Table> pdftron::Layout::ContentElement::AsTable ( ) const

Retrieve the ElementRef<Table> object for this content element. This can be used to check if this element is a table and, if so, to access the associated Table object.

Returns
The ElementRef<Table> object
ElementRef<TableCell> pdftron::Layout::ContentElement::AsTableCell ( ) const

Retrieve the ElementRef<TableCell> object for this content element. This can be used to check if this element is a table cell and, if so, to access the associated TableCell object.

Returns
The ElementRef<TableCell> object
ElementRef<TableRow> pdftron::Layout::ContentElement::AsTableRow ( ) const

Retrieve the ElementRef<TableRow> object for this content element. This can be used to check if this element is a table row and, if so, to access the associated TableRow object.

Returns
The ElementRef<TableRow> object
ElementRef<TextRun> pdftron::Layout::ContentElement::AsTextRun ( ) const

Retrieve the ElementRef<TextRun> object for this content element. This can be used to check if this element is a text run and, if so, to access the associated TextRun object.

Returns
The ElementRef<TextRun> object
void pdftron::Layout::ContentElement::Destroy ( )
TextStyledElement pdftron::Layout::ContentElement::GetTextStyledElement ( )

Retrieve the TextStyledElement object for manipulating the text style of this content element.

Returns
The TextStyledElement object

Member Data Documentation

TRN_ContentElement pdftron::Layout::ContentElement::m_impl

Definition at line 293 of file ContentTree.h.


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