Loading...
Searching...
No Matches
pdftron::Layout::ContentElement Class Reference

`#include <ContentTree.h>`

Inheritance diagram for pdftron::Layout::ContentElement:

## Public Member Functions
| ~ContentElement ()
void | Destroy ()
ElementRef< List > | AsList () const
ElementRef< ListItem > | AsListItem () const
ElementRef< ContentNode > | AsContentNode () const
ElementRef< TextRun > | AsTextRun () const
ElementRef< Paragraph > | AsParagraph () const
ElementRef< Table > | AsTable () const
ElementRef< TableRow > | AsTableRow () const
ElementRef< TableCell > | AsTableCell () 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

## ◆ ContentElement()

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

Create a new ContentElement object, internal use only.

## ◆ ~ContentElement()

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

## Member Function Documentation

## ◆ AsContentNode()

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

## ◆ AsList()

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

## ◆ AsListItem()

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

## ◆ AsParagraph()

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

## ◆ AsTable()

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

## ◆ AsTableCell()

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

## ◆ AsTableRow()

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

## ◆ AsTextRun()

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

## ◆ Destroy()

void pdftron::Layout::ContentElement::Destroy | ( |  | ) |

## ◆ GetTextStyledElement()

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

## ◆ m_impl

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:

- Layout/ContentTree.h