Foxit PDF SDK
<FSDocProviderCallback> Protocol Reference

Inherits <NSObject>.

Instance Methods

(void) - displayCaret:is_visible:rect:
 A callback function used to display or hide caret. More...
 
(void) - exportData:file_path:
 A callback function used to export data to file. More...
 
(int) - getCurrentPage:
 A callback function used to get index of current page. More...
 
(int) - getHighlightColor:
 A callback function get the highlight color. More...
 
(BOOL) - getPopupPos:min_popup:max_popup:rect_widget:inout_rect_popup:
 A callback function used to get the pop-up position. More...
 
(NSString *) - getTitle:
 A callback function used to get title of current XFA document. More...
 
(void) - gotoURL:url:
 A callback function used to go to a specified URL. More...
 
(void) - importData:file_path:
 A callback function used to import data from file. More...
 
(void) - invalidateRect:rect:flag:
 A callback function used to invalidate rectangle according the flag. More...
 
(void) - pageViewEvent:page_view_event_type:
 A callback function to execute page view event. More...
 
(BOOL) - popupMenu:rect_popup:
 A callback function used to pop up the context menu. More...
 
(void) - print:start_page_index:end_page_index:options:
 A callback function used to print. More...
 
(void) - setChangeMark:
 A callback function used to set change mark flag to current XFA document. More...
 
(void) - setCurrentPage:current_page_index:
 A callback function used to set index of current page. More...
 
(void) - setFocus:
 A callback function used to set focus widget. More...
 
(BOOL) - submitData:target:format:text_encoding:content:
 A callback function to submit data. More...
 
(void) - widgetEvent:widget_event_type:
 A callback function to execute XFA widget event. More...
 

Detailed Description

This class represents a callback object as an XFA document provider. All the functions in this class are used as callback functions. Pure virtual functions should be implemented by user.

Method Documentation

◆ displayCaret:is_visible:rect:()

- (void) displayCaret: (int)  page_index
is_visible: (BOOL)  is_visible
rect: (FSRectF *)  rect 
required

A callback function used to display or hide caret.

Parameters
[in]page_indexThe index of page.
[in]is_visibleUsed to decide whether the caret is visible or not: YES means visible, while NO means invisible.
[in]rectA rectangle.
Returns
None.

◆ exportData:file_path:()

- (void) exportData: (FSPDFDoc *)  doc
file_path: (NSString *)  file_path 
required

A callback function used to export data to file.

Parameters
[in]docCurrent XFA document.
[in]file_pathA file path, to which the data should be exported. If this is an empty string, user should specify a path as the exported file path. In this case, application can show a dialog to user to let user select the file manually.
Returns
None.

◆ getCurrentPage:()

- (int) getCurrentPage: (FSPDFDoc *)  doc
required

A callback function used to get index of current page.

Parameters
[in]docCurrent XFA document.
Returns
The index of current page.

◆ getHighlightColor:()

- (int) getHighlightColor: (FSPDFDoc *)  doc
required

A callback function get the highlight color.

Parameters
[in]docCurrent XFA document.
Returns
The highlight color.

◆ getPopupPos:min_popup:max_popup:rect_widget:inout_rect_popup:()

- (BOOL) getPopupPos: (int)  page_index
min_popup: (float)  min_popup
max_popup: (float)  max_popup
rect_widget: (FSRectF *)  rect_widget
inout_rect_popup: (FSRectF *)  inout_rect_popup 
required

A callback function used to get the pop-up position.

Parameters
[in]page_indexThe index of page.
[in]min_popupThe minimum height of drop-down box.
[in]max_popupThe maximum height of drop-down box.
[in]rect_widgetThe rectangle of current widget.
[in,out]inout_rect_popupA rectangle. When this function calls, this is used as an input parameter that specifies the width of drop-down box. When this function returns, this is used as an output parameter that receives the height of drop-down box.
Returns
YES means success, while NO means failure.

◆ getTitle:()

- (NSString*) getTitle: (FSPDFDoc *)  doc
required

A callback function used to get title of current XFA document.

Parameters
[in]docCurrent XFA document.
Returns
The title.

◆ gotoURL:url:()

- (void) gotoURL: (FSPDFDoc *)  doc
url: (NSString *)  url 
required

A callback function used to go to a specified URL.

Parameters
[in]docCurrent XFA document.
[in]urlA URL string.
Returns
None.

◆ importData:file_path:()

- (void) importData: (FSPDFDoc *)  doc
file_path: (NSString *)  file_path 
required

A callback function used to import data from file.

Parameters
[in]docCurrent XFA document.
[in]file_pathA file path, from which the data would be imported. If this is an empty string, user should specify a path as the imported file path. In this case, application can show a dialog to user to let user select the file manually.
Returns
None.

◆ invalidateRect:rect:flag:()

- (void) invalidateRect: (int)  page_index
rect: (FSRectF *)  rect
flag: (FSDocProviderCallbackInvalidateFlag flag 
required

A callback function used to invalidate rectangle according the flag.

This callback function would be used in dynamic XFA document.

Parameters
[in]page_indexThe index of page.
[in]rectA rectangle to be invalidate.
[in]flagInvalidate flag. Please refer to values starting from FSDocProviderCallbackInvalidateFlagAllPages and this would be one of these values.
Returns
None.

◆ pageViewEvent:page_view_event_type:()

- (void) pageViewEvent: (int)  page_index
page_view_event_type: (FSDocProviderCallbackPageViewEventType page_view_event_type 
required

A callback function to execute page view event.

Parameters
[in]page_indexThe page index.
[in]page_view_event_typePage view event type. Please refer to values starting from FSDocProviderCallbackPageViewEventTypeAdded and this would be one of these values.
Returns
None.

◆ popupMenu:rect_popup:()

- (BOOL) popupMenu: (int)  page_index
rect_popup: (FSPointF *)  rect_popup 
required

A callback function used to pop up the context menu.

Parameters
[in]page_indexThe index of page.
[in]rect_popupThe rectangle where to pop up menu.
Returns
YES means success, otherwise NO means failure.

◆ print:start_page_index:end_page_index:options:()

- (void) print: (FSPDFDoc *)  doc
start_page_index: (int)  start_page_index
end_page_index: (int)  end_page_index
options: (int)  options 
required

A callback function used to print.

Parameters
[in]docCurrent XFA document.
[in]start_page_indexThe index of start page.
[in]end_page_indexThe index of end page.
[in]optionsPrint options. Please refer to values starting from FSDocProviderCallbackPrintOptionShowDialog and this would be one or a combination of these values.
Returns
None.

◆ setChangeMark:()

- (void) setChangeMark: (FSXFADoc *)  doc
required

A callback function used to set change mark flag to current XFA document.

Parameters
[in]docCurrent XFA document.
Returns
None.

◆ setCurrentPage:current_page_index:()

- (void) setCurrentPage: (FSPDFDoc *)  doc
current_page_index: (int)  current_page_index 
required

A callback function used to set index of current page.

Parameters
[in]docCurrent XFA document.
[in]current_page_indexThe index would be set.
Returns
None.

◆ setFocus:()

- (void) setFocus: (FSXFAWidget *)  xfa_widget
required

A callback function used to set focus widget.

Parameters
[in]xfa_widgetAn XFA widget to be set focus on.
Returns
None.

◆ submitData:target:format:text_encoding:content:()

- (BOOL) submitData: (FSPDFDoc *)  doc
target: (NSString *)  target
format: (FSDocProviderCallbackSubmitFormat format
text_encoding: (FSDocProviderCallbackTextEncoding text_encoding
content: (NSString *)  content 
required

A callback function to submit data.

Parameters
[in]docCurrent XFA document.
[in]targetA string that represents the target of data to be submit.
[in]formatThe format of data to be submit. Please refer to values starting from FSDocProviderCallbackSubmitInXDP and this would be one of these values.
[in]text_encodingThe text encoding of data to be submit. Please refer to values starting from FSDocProviderCallbackTextEncodingNone and this would be one of these values.
[in]contentThe content of data to be submit.
Returns
YES means success, otherwise NO means failure.

◆ widgetEvent:widget_event_type:()

- (void) widgetEvent: (FSXFAWidget *)  xfa_widget
widget_event_type: (FSDocProviderCallbackWidgetEventType widget_event_type 
required

A callback function to execute XFA widget event.

Parameters
[in]xfa_widgetAn XFA widget which sends the event.
[in]widget_event_typeWidget event type. Please refer to values starting from FSDocProviderCallbackWidgetEventTypeAdded and this would be one of these values.
Returns
None.