Foxit PDF SDK
foxit::addon::accessibility::AlternateTextFigureData Class Reference

Data structure for alternate text information of a figure. More...

Inherits Object.

Public Member Functions

 AlternateTextFigureData ()
 Default constructor: creates an empty, non-decorative figure entry.
 
 AlternateTextFigureData (bool is_decorative_figure, const wchar_t *alternate_text, const wchar_t *alternate_text_changed, int page_index, foxit::RectF rect)
 Construct with explicit values. More...
 
 AlternateTextFigureData (const AlternateTextFigureData &other)
 Copy constructor.
 
AlternateTextFigureData & operator= (const AlternateTextFigureData &other)
 Assignment operator. More...
 
void Set (bool is_decorative_figure, const wchar_t *alternate_text, const wchar_t *alternate_text_changed, int page_index, foxit::RectF rect)
 Set object values in one call. More...
 

Public Attributes

WString alternate_text
 The alternate text before change (original).
 
WString alternate_text_changed
 The alternate text after change (modified in fix mode).
 
bool is_decorative_figure
 Whether the figure is decorative (no alternate text).
 
int page_index
 The page index where the figure is located. Valid range: from 0 to (count-1). count is returned by function pdf::PDFDoc::GetPageCount.
 
foxit::RectF rect
 Bounding rectangle of the figure on the page.
 

Detailed Description

Data structure for alternate text information of a figure.

Stores information about a single figure used by accessibility tagging and fix workflows.

  • is_decorative_figure: whether the figure is decorative and should not have alternate text.
  • alternate_text: the original alternate text (before edit).
  • alternate_text_changed: the alternate text after user modification (used in fix mode).
  • page_index: the zero-based page index where the figure is located.
  • rect: the bounding rectangle of the figure on the page.

Typical usage:

  1. Iterate with TaggedPDF::GetNextFigureData() / GetPrevFigureData().
  2. Modify using SetCurrentFigureDataInfo() and persist via TaggedPDF::SaveFigureData().

Constructor & Destructor Documentation

◆ AlternateTextFigureData()

foxit::addon::accessibility::AlternateTextFigureData::AlternateTextFigureData ( bool  is_decorative_figure,
const wchar_t *  alternate_text,
const wchar_t *  alternate_text_changed,
int  page_index,
foxit::RectF  rect 
)
inline

Construct with explicit values.

Parameters
[in]is_decorative_figuretrue if figure is decorative (no alt text).
[in]alternate_textoriginal alternate text (may be null/empty).
[in]alternate_text_changedalternate text after change (may be null/empty).
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function pdf::PDFDoc::GetPageCount.
[in]rectbounding rectangle of the figure on the page.

Member Function Documentation

◆ operator=()

AlternateTextFigureData& foxit::addon::accessibility::AlternateTextFigureData::operator= ( const AlternateTextFigureData &  other)
inline

Assignment operator.

Returns
reference to this object.

◆ Set()

void foxit::addon::accessibility::AlternateTextFigureData::Set ( bool  is_decorative_figure,
const wchar_t *  alternate_text,
const wchar_t *  alternate_text_changed,
int  page_index,
foxit::RectF  rect 
)
inline

Set object values in one call.

Parameters
[in]is_decorative_figurewhether the figure is decorative.
[in]alternate_textoriginal alternate text.
[in]alternate_text_changedalternate text after change.
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function pdf::PDFDoc::GetPageCount.
[in]rectbounding rectangle of the figure.