Foxit PDF SDK

构造函数 | 所有成员列表
<FSDocProviderCallback>协议 参考

继承自 <NSObject> .

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

## 详细描述

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.

## 函数文档

## ◆ 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.

参数

  [in] | page_index | The index of page.
  [in] | is_visible | Used to decide whether the caret is visible or not: YES means visible, while NO means invisible.
  [in] | rect | A rectangle.

返回
  None.

## ◆ exportData:file_path:()

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

A callback function used to export data to file.

参数

  [in] | doc | Current XFA document.
  [in] | file_path | A 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.

返回
  None.

## ◆ getCurrentPage:()

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

A callback function used to get index of current page.

参数

  [in] | doc | Current XFA document.

返回
  The index of current page.

## ◆ getHighlightColor:()

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

A callback function get the highlight color.

参数

  [in] | doc | Current XFA document.

返回
  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.

参数

  [in] | page_index | The index of page.
  [in] | min_popup | The minimum height of drop-down box.
  [in] | max_popup | The maximum height of drop-down box.
  [in] | rect_widget | The rectangle of current widget.
  [in,out] | inout_rect_popup | A 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.

返回
  YES means success, while NO means failure.

## ◆ getTitle:()

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

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

参数

  [in] | doc | Current XFA document.

返回
  The title.

## ◆ gotoURL:url:()

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

A callback function used to go to a specified URL.

参数

  [in] | doc | Current XFA document.
  [in] | url | A URL string.

返回
  None.

## ◆ importData:file_path:()

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

A callback function used to import data from file.

参数

  [in] | doc | Current XFA document.
  [in] | file_path | A 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.

返回
  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.

参数

  [in] | page_index | The index of page.
  [in] | rect | A rectangle to be invalidate.
  [in] | flag | Invalidate flag. Please refer to values starting from FSDocProviderCallbackInvalidateFlagAllPages and this would be one of these values.

返回
  None.

## ◆ notifyWidgetChangeInfo:change_info:()

- (void) notifyWidgetChangeInfo: |  | (FSXFADoc *) | doc
change_info: |  | (FSXFAWidgetModifyInfo *) | change_info
| required

A callback function to notify XFA widget change information.

参数

  [in] | doc | Current XFA document.
  [in] | change_info | The xfa widget change information.

返回
  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.

参数

  [in] | page_index | The page index.
  [in] | page_view_event_type | Page view event type. Please refer to values starting from FSDocProviderCallbackPageViewEventTypeAdded and this would be one of these values.

返回
  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.

参数

  [in] | page_index | The index of page.
  [in] | rect_popup | The rectangle where to pop up menu.

返回
  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.

参数

  [in] | doc | Current XFA document.
  [in] | start_page_index | The index of start page.
  [in] | end_page_index | The index of end page.
  [in] | options | Print options. Please refer to values starting from FSDocProviderCallbackPrintOptionShowDialog and this would be one or a combination of these values.

返回
  None.

## ◆ setChangeMark:()

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

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

参数

  [in] | doc | Current XFA document.

返回
  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.

参数

  [in] | doc | Current XFA document.
  [in] | current_page_index | The index would be set.

返回
  None.

## ◆ setFocus:is_relayout:()

- (void) setFocus: |  | (FSXFAWidget *) | xfa_widget
is_relayout: |  | (BOOL) | is_relayout
| required

A callback function used to set focus widget.

参数

  [in] | xfa_widget | An XFA widget to be set focus on.
  [in] | is_relayout | true means the layout has changed, while false means the layout has not changed.

返回
  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.

参数

  [in] | doc | Current XFA document.
  [in] | target | A string that represents the target of data to be submit.
  [in] | format | The format of data to be submit. Please refer to values starting from FSDocProviderCallbackSubmitInXDP and this would be one of these values.
  [in] | text_encoding | The text encoding of data to be submit. Please refer to values starting from FSDocProviderCallbackTextEncodingNone and this would be one of these values.
  [in] | content | The content of data to be submit.

返回
  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.

参数

  [in] | xfa_widget | An XFA widget which sends the event.
  [in] | widget_event_type | Widget event type. Please refer to values starting from FSDocProviderCallbackWidgetEventTypeAdded and this would be one of these values.

返回
  None.