- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Friends | List of all members
pdftron::Layout::TableCell Class Reference

`#include <ContentTree.h>`

Inheritance diagram for pdftron::Layout::TableCell:

## Public Types
enum | CellAlignmentVertical { e_alignment_top = 1, e_alignment_center = 2, e_alignment_bottom = 3 }
enum | CellAlignmentHorizontal { e_alignment_left = 1, e_alignment_middle = 2, e_alignment_right = 3 }

## Public Member Functions
| ~TableCell ()
void | Destroy ()
Paragraph | AddParagraph ()
Paragraph | AddParagraph (const UString &text)
Table | AddTable ()
TableCell | MergeCellsRight (UInt32 num)
TableCell | MergeCellsDown (UInt32 num)
void | SetBackgroundColor (UInt8 red, UInt8 green, UInt8 blue)
void | SetBorder (double thickness, UInt8 red, UInt8 green, UInt8 blue)
double | GetBorderThickness ()
void | SetVerticalAlignment (CellAlignmentVertical val)
CellAlignmentVertical | GetVerticalAlignment ()
void | SetHorizontalAlignment (CellAlignmentHorizontal val)
CellAlignmentHorizontal | GetHorizontalAlignment ()
void | SetHeight (double val)
double | GetHeight ()
void | SetWidth (double val)
double | GetWidth ()
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< Paragraph > | AsParagraph () const
ElementRef< Table > | AsTable () const
ElementRef< TableRow > | AsTableRow () const
ElementRef< TableCell > | AsTableCell () const
TextStyledElement | GetTextStyledElement ()

## Friends
class | Table
class | TableRow
class | ElementRef< TableCell >

## Additional Inherited Members
Public Attributes inherited from pdftron::Layout::ContentElement
TRN_ContentElement | m_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 class representing a table cell, which can be used during document creation.

Definition at line 575 of file ContentTree.h.

## Member Enumeration Documentation

enum pdftron::Layout::TableCell::CellAlignmentHorizontal

Enumerator
e_alignment_left | Cell content is left-aligned
e_alignment_middle | Cell content is horizontally centered
e_alignment_right | Cell content is right-aligned

Definition at line 603 of file ContentTree.h.

enum pdftron::Layout::TableCell::CellAlignmentVertical

Enumerator
e_alignment_top | Cell content is top-aligned
e_alignment_center | Cell content is vertically centered
e_alignment_bottom | Cell content is bottom-aligned

Definition at line 587 of file ContentTree.h.

## Constructor & Destructor Documentation

pdftron::Layout::TableCell::~TableCell | ( |  | ) |

## Member Function Documentation

Paragraph pdftron::Layout::TableCell::AddParagraph | ( |  | ) |

Add an empty paragraph to the cell

Returns
  The paragraph that was added

Paragraph pdftron::Layout::TableCell::AddParagraph | ( | const UString & | text | ) |

Add a paragraph with text to the cell

Returns
  The paragraph that was added

Table pdftron::Layout::TableCell::AddTable | ( |  | ) |

Add a nested table to the cell

Returns
  The table that was added

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

double pdftron::Layout::TableCell::GetBorderThickness | ( |  | ) |

Get the border thickness of the table cell

Returns
  border thickness

double pdftron::Layout::TableCell::GetHeight | ( |  | ) |

Get the height of the cell

Returns
  the height of the cell

CellAlignmentHorizontal pdftron::Layout::TableCell::GetHorizontalAlignment | ( |  | ) |

Get the horizontal alignment of the cell

Returns
  the horizontal Alignment of the cell

CellAlignmentVertical pdftron::Layout::TableCell::GetVerticalAlignment | ( |  | ) |

Get the vertical alignment of the cell

Returns
  the vertical alignment of the cell

double pdftron::Layout::TableCell::GetWidth | ( |  | ) |

Get the width of the cell

Returns
  the width of the cell

TableCell pdftron::Layout::TableCell::MergeCellsDown | ( | UInt32 | num | ) |

Merge the cell with the specified number of cells downwards

Returns
  The merged cell

TableCell pdftron::Layout::TableCell::MergeCellsRight | ( | UInt32 | num | ) |

Merge the cell with the specified number of cells to the right

Returns
  The merged cell

void pdftron::Layout::TableCell::SetBackgroundColor | ( | UInt8 | red,
|  | UInt8 | green,
|  | UInt8 | blue
| ) |  |

Set the background color of the cell

Parameters

  red | The red component of the border color
  green | The green component of the border color
  blue | The blue component of the border color

void pdftron::Layout::TableCell::SetBorder | ( | double | thickness,
|  | UInt8 | red,
|  | UInt8 | green,
|  | UInt8 | blue
| ) |  |

Set the cell's border thickness and color

Parameters

  thickness | The thickness of the border
  red | The red component of the border color
  green | The green component of the border color
  blue | The blue component of the border color

void pdftron::Layout::TableCell::SetHeight | ( | double | val | ) |

Set the height of the cell

Parameters

  val | The height of the cell

void pdftron::Layout::TableCell::SetHorizontalAlignment | ( | CellAlignmentHorizontal | val | ) |

Set horizontal alignment of the cell

Parameters

  val | The horizontal alignment of the cell

void pdftron::Layout::TableCell::SetVerticalAlignment | ( | CellAlignmentVertical | val | ) |

Set the vertical alignment of the cell

Parameters

  val | The vertical alignment of the cell

void pdftron::Layout::TableCell::SetWidth | ( | double | val | ) |

Set the width of the cell

Parameters

  val | The width of the cell

## Friends And Related Function Documentation

friend class ElementRef< TableCell >
| friend

Definition at line 579 of file ContentTree.h.

friend class Table
| friend

Definition at line 577 of file ContentTree.h.

friend class TableRow
| friend

Definition at line 578 of file ContentTree.h.

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

- Layout/ContentTree.h