PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
PDF::TextEdit::Layout Class Reference

The Layout class represents a text layout in a PDF document. More...

#include <pdfsdk/cxx/text_edit.h>

Inheritance diagram for PDF::TextEdit::Layout:

Public Member Functions

TextBlock NewTextBlock (size_t index)
 Creates a new TextBlock at the specified index.
 
void InsertTextBlock (size_t index, const TextBlock &text_block)
 Inserts a TextBlock at the specified index.
 
void RemoveTextBlock (size_t index)
 Removes the TextBlock at the specified index.
 
size_t GetNumTextBlocks () const
 Gets the number of TextBlocks in the Layout.
 
TextBlock GetTextBlock (size_t index) const
 Gets the TextBlock at the specified index.
 
size_t FindTextBlockIndex (const TextBlock &text_block) const
 Finds the index of the specified TextBlock in the Layout.
 
CharIterator GetCharsBegin () const
 Gets an iterator to the beginning of the characters in the Layout.
 
CharIterator GetCharsEnd () const
 Gets an iterator to the end of the characters in the Layout.
 
CharIterator GetCharIterAtPoint (const PointF &point) const
 Gets an iterator to the character at the specified point in the Layout.
 
CharIterator GetCharIterForItem (const TextRun &text_run, size_t char_index) const
 Gets an iterator to the character at the specified index within a TextRun in the Layout.
 
CharIterator GetCharIterForItemAtPoint (const TextRun &text_run, const PointF &point) const
 Gets an iterator to the character at the specified point within a TextRun in the Layout.
 
 Layout (PDTLayout handle, bool adopt=false) noexcept
 
 Layout (const Layout &rhs) noexcept
 
Layoutoperator= (const Layout &rhs) noexcept
 
 Layout (Layout &&rhs) noexcept
 
Layoutoperator= (Layout &&rhs) noexcept
 

Static Public Member Functions

static Layout BuildForPage (const Page &page)
 Builds a Layout object for a specific page.
 
static Layout BuildForFormXObject (const Document &doc, const XObject &xform)
 Builds a Layout object for a specific form XObject.
 

Detailed Description

The Layout class represents a text layout in a PDF document.

Member Function Documentation

◆ BuildForFormXObject()

Layout PDF::TextEdit::Layout::BuildForFormXObject ( const Document & doc,
const XObject & xform )
inlinestatic

Builds a Layout object for a specific form XObject.

Parameters
docThe Document object that contains the form XObject.
xformThe XObject for which to build the Layout.
Returns
The Layout object for the specified form XObject.

◆ BuildForPage()

Layout PDF::TextEdit::Layout::BuildForPage ( const Page & page)
inlinestatic

Builds a Layout object for a specific page.

Parameters
pageThe Page object for which to build the Layout.
Returns
The Layout object for the specified page.

◆ FindTextBlockIndex()

size_t PDF::TextEdit::Layout::FindTextBlockIndex ( const TextBlock & text_block) const
inline

Finds the index of the specified TextBlock in the Layout.

Parameters
text_blockThe TextBlock to find.
Returns
The index of the TextBlock in the Layout, or kPDPageIndexNull if not found.

◆ GetCharIterAtPoint()

CharIterator PDF::TextEdit::Layout::GetCharIterAtPoint ( const PointF & point) const
inline

Gets an iterator to the character at the specified point in the Layout.

Parameters
pointThe point at which to find the character.
Returns
The iterator to the character at the specified point.

◆ GetCharIterForItem()

CharIterator PDF::TextEdit::Layout::GetCharIterForItem ( const TextRun & text_run,
size_t char_index ) const
inline

Gets an iterator to the character at the specified index within a TextRun in the Layout.

Parameters
text_runThe TextRun containing the character.
char_indexThe index of the character within the TextRun.
Returns
The iterator to the character at the specified index.

◆ GetCharIterForItemAtPoint()

CharIterator PDF::TextEdit::Layout::GetCharIterForItemAtPoint ( const TextRun & text_run,
const PointF & point ) const
inline

Gets an iterator to the character at the specified point within a TextRun in the Layout.

Parameters
text_runThe TextRun containing the character.
pointThe point at which to find the character.
Returns
The iterator to the character at the specified point.

◆ GetCharsBegin()

CharIterator PDF::TextEdit::Layout::GetCharsBegin ( ) const
inline

Gets an iterator to the beginning of the characters in the Layout.

Returns
The iterator to the beginning of the characters in the Layout.

◆ GetCharsEnd()

CharIterator PDF::TextEdit::Layout::GetCharsEnd ( ) const
inline

Gets an iterator to the end of the characters in the Layout.

Returns
The iterator to the end of the characters in the Layout.

◆ GetNumTextBlocks()

size_t PDF::TextEdit::Layout::GetNumTextBlocks ( ) const
inline

Gets the number of TextBlocks in the Layout.

Returns
The number of TextBlocks in the Layout.

◆ GetTextBlock()

TextBlock PDF::TextEdit::Layout::GetTextBlock ( size_t index) const
inline

Gets the TextBlock at the specified index.

Parameters
indexThe index of the TextBlock to retrieve.
Returns
The TextBlock at the specified index.

◆ InsertTextBlock()

void PDF::TextEdit::Layout::InsertTextBlock ( size_t index,
const TextBlock & text_block )
inline

Inserts a TextBlock at the specified index.

Parameters
indexThe index at which to insert the TextBlock.
text_blockThe TextBlock to insert.

◆ NewTextBlock()

TextBlock PDF::TextEdit::Layout::NewTextBlock ( size_t index)
inline

Creates a new TextBlock at the specified index.

Parameters
indexThe index at which to create the new TextBlock.
Returns
The newly created TextBlock.

◆ RemoveTextBlock()

void PDF::TextEdit::Layout::RemoveTextBlock ( size_t index)
inline

Removes the TextBlock at the specified index.

Parameters
indexThe index of the TextBlock to remove.

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