Foxit PDF SDK
foxit::addon::accessibility::AccessibilityProviderCallback Class Referenceabstract

Public Types

enum  DrawRectType {
  e_DrawRectTypeContent = 0, e_DrawRectTypeTableCell = 1, e_DrawRectTypeTableFigure = 2, e_DrawRectTypeOrderRect = 3,
  e_DrawRectTypeText = 4, e_DrawRectTypeTableLabel = 5, e_DrawRectTypeLine = 6, e_DrawRectTypeLabel = 7,
  e_DrawRectTypeTableCellsType = 8, e_DrawRectTypeTableCellsBorder = 9, e_DrawRectTypeTableCellsSelectedBorder = 10, e_DrawRectTypeTableCellsHeaderBackground = 11,
  e_DrawRectTypeTableCellsDataBackground = 12, e_DrawRectTypeTableCellsHeaderBackgroundMultispan = 13, e_DrawRectTypeTableCellsDataBackgroundMultispan = 14, e_DrawRectTypeTableCellsHeaderBackgroundMissingHeader = 15,
  e_DrawRectTypeTableCellsDataBackgroundMissingHeader = 16
}
 Enumeration for draw rect type. More...
 

Public Member Functions

virtual void DrawLine (const foxit::pdf::PDFDoc &pdf_doc, int page_index, DrawRectType type, const AccessibilityLineInfoArray &line_info_array)=0
 A callback function used to draw lines for accessibility visualization. More...
 
virtual void DrawRect (const foxit::pdf::PDFDoc &pdf_doc, int page_index, DrawRectType type, const AccessibilityRectInfoArray &rect_info_array)=0
 A callback function used to draw rectangles for accessibility visualization. More...
 
virtual void DrawText (const foxit::pdf::PDFDoc &pdf_doc, int page_index, DrawRectType type, const AccessibilityTextInfoArray &text_info_array)=0
 A callback function used to draw text for accessibility visualization. More...
 
virtual bool GenerateContent (const foxit::pdf::PDFDoc &pdf_doc, int page_index)=0
 A callback function used to generate content for a specified page. More...
 
virtual WString GetDocumentFileName (const foxit::pdf::PDFDoc &pdf_doc)=0
 A callback function used to get the document file name. More...
 
virtual WString GetTextStringByStringID (const WString &string_id)=0
 A callback function used to get text string by string ID. More...
 
virtual void OnContentChanged (const foxit::pdf::PDFDoc &pdf_doc, int page_index, bool is_notify_self)=0
 A callback function used to notify that content has changed on a specified page. More...
 
virtual void Release ()=0
 A callback function used to release current callback object itself. More...
 

Detailed Description

This class represents a render provider for accessibility, used to generate content and draw visual elements.

All the pure virtual functions in this class are used as callback functions and should be implemented by user in derived class. The render provider is shared between the accessibility classes and ReadingOrderEditor, providing rendering capabilities for accessibility visual feedback.

Member Enumeration Documentation

◆ DrawRectType

Enumeration for draw rect type.

This enumeration is used by AccessibilityProviderCallback to specify the type of drawing rectangle. Values of this enumeration should be used alone.

Enumerator
e_DrawRectTypeContent 

Draw rect type : content.

e_DrawRectTypeTableCell 

Draw rect type : table cell.

e_DrawRectTypeTableFigure 

Draw rect type : table figure.

e_DrawRectTypeOrderRect 

Draw rect type : order rect.

e_DrawRectTypeText 

Draw rect type : text.

e_DrawRectTypeTableLabel 

Draw rect type : table label.

e_DrawRectTypeLine 

Draw rect type : line.

e_DrawRectTypeLabel 

Draw rect type : label.

e_DrawRectTypeTableCellsType 

Draw rect type : table cells type.

e_DrawRectTypeTableCellsBorder 

Draw rect type : table cells border.

e_DrawRectTypeTableCellsSelectedBorder 

Draw rect type : table cells selected border.

e_DrawRectTypeTableCellsHeaderBackground 

Draw rect type : table cells header background.

e_DrawRectTypeTableCellsDataBackground 

Draw rect type : table cells data background.

e_DrawRectTypeTableCellsHeaderBackgroundMultispan 

Draw rect type : table cells header background multispan.

e_DrawRectTypeTableCellsDataBackgroundMultispan 

Draw rect type : table cells data background multispan.

e_DrawRectTypeTableCellsHeaderBackgroundMissingHeader 

Draw rect type : table cells header background missing header.

e_DrawRectTypeTableCellsDataBackgroundMissingHeader 

Draw rect type : table cells data background missing header.

Member Function Documentation

◆ DrawLine()

virtual void foxit::addon::accessibility::AccessibilityProviderCallback::DrawLine ( const foxit::pdf::PDFDoc &  pdf_doc,
int  page_index,
DrawRectType  type,
const AccessibilityLineInfoArray &  line_info_array 
)
pure virtual

A callback function used to draw lines for accessibility visualization.

Parameters
[in]pdf_docThe PDF document object.
[in]page_indexThe page index.
[in]typeThe draw rect type. Please refer to values starting from foxit::addon::accessibility::AccessibilityProviderCallback::e_DrawRectTypeContent and this should be one of these values..
[in]line_info_arrayThe array of accessibility line info objects.
Returns
None.

◆ DrawRect()

virtual void foxit::addon::accessibility::AccessibilityProviderCallback::DrawRect ( const foxit::pdf::PDFDoc &  pdf_doc,
int  page_index,
DrawRectType  type,
const AccessibilityRectInfoArray &  rect_info_array 
)
pure virtual

A callback function used to draw rectangles for accessibility visualization.

Parameters
[in]pdf_docThe PDF document object.
[in]page_indexThe page index.
[in]typeThe draw rect type. Please refer to values starting from foxit::addon::accessibility::AccessibilityProviderCallback::e_DrawRectTypeContent and this should be one of these values..
[in]rect_info_arrayThe array of accessibility rect info objects.
Returns
None.

◆ DrawText()

virtual void foxit::addon::accessibility::AccessibilityProviderCallback::DrawText ( const foxit::pdf::PDFDoc &  pdf_doc,
int  page_index,
DrawRectType  type,
const AccessibilityTextInfoArray &  text_info_array 
)
pure virtual

A callback function used to draw text for accessibility visualization.

Parameters
[in]pdf_docThe PDF document object.
[in]page_indexThe page index.
[in]typeThe draw rect type. Please refer to values starting from foxit::addon::accessibility::AccessibilityProviderCallback::e_DrawRectTypeContent and this should be one of these values..
[in]text_info_arrayThe array of accessibility text info objects.
Returns
None.

◆ GenerateContent()

virtual bool foxit::addon::accessibility::AccessibilityProviderCallback::GenerateContent ( const foxit::pdf::PDFDoc &  pdf_doc,
int  page_index 
)
pure virtual

A callback function used to generate content for a specified page.

Parameters
[in]pdf_docThe PDF document object.
[in]page_indexThe page index.
Returns
true means content generated successfully, while false means not.

◆ GetDocumentFileName()

virtual WString foxit::addon::accessibility::AccessibilityProviderCallback::GetDocumentFileName ( const foxit::pdf::PDFDoc &  pdf_doc)
pure virtual

A callback function used to get the document file name.

Parameters
[in]pdf_docThe PDF document object.
Returns
The document file name.

◆ GetTextStringByStringID()

virtual WString foxit::addon::accessibility::AccessibilityProviderCallback::GetTextStringByStringID ( const WString &  string_id)
pure virtual

A callback function used to get text string by string ID.

Parameters
[in]string_idThe string ID.
Returns
The text string.

◆ OnContentChanged()

virtual void foxit::addon::accessibility::AccessibilityProviderCallback::OnContentChanged ( const foxit::pdf::PDFDoc &  pdf_doc,
int  page_index,
bool  is_notify_self 
)
pure virtual

A callback function used to notify that content has changed on a specified page.

Parameters
[in]pdf_docThe PDF document object.
[in]page_indexThe page index.
[in]is_notify_selfWhether to notify self.
Returns
None.

◆ Release()

virtual void foxit::addon::accessibility::AccessibilityProviderCallback::Release ( )
pure virtual

A callback function used to release current callback object itself.

Returns
None.