Foxit PDF SDK

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

继承自 <NSObject> .

## 构造函数
(BOOL) | - canChangeColor:icon_name:
| A callback function used to check if current icon provider supports to change color for a specified type. 更多...
(NSNumber *) | - getDisplayHeight:icon_name:
| A callback function used to get the height for display of a specified icon, in device size(pixel normally). 更多...
(NSNumber *) | - getDisplayWidth:icon_name:
| A callback function used to get the width for display of a specified icon, in device size(pixel normally). 更多...
(FSPDFPage *) | - getIcon:icon_name:color:annot_dict:
| A callback function used to get the icon as PDF page contents for a specified type. 更多...
(NSString *) | - getProviderID
| A callback function used to get provider ID. 更多...
(NSString *) | - getProviderVersion
| A callback function used to get provider version. 更多...
(FSShadingColor *) | - getShadingColor:icon_name:referenced_color:shading_index:
| A callback function used to get the shading colors if current icon provider supports for a specified type. Currently, only support Type-2 shading settings with two color values. 更多...
(BOOL) | - hasIcon:icon_name:
| A callback function used to check if current icon provider supports icon for a specified type. 更多...

## 详细描述

This class represents a callback object as customized annotation icon provider. All the functions in this class are used as callback functions. Pure virtual functions should be implemented by user and user can also choose to implement some or all the reset virtual functions when necessary. Icon provider can only be used for note, file attachment, stamp annotations.
Icon provider's ID and version are treated as the name of the icon provider, so please offer different "ID + version" for different icon providers by callback functions FSIconProviderCallback::getProviderID and FSIconProviderCallback::getProviderVersion.

## 函数文档

## ◆ canChangeColor:icon_name:()

- (BOOL) canChangeColor: |  | (FSAnnotType) | annot_type
icon_name: |  | (NSString *) | icon_name
| required

A callback function used to check if current icon provider supports to change color for a specified type.

参数

  [in] | annot_type | The annotation type. It should be one of FSActionCallbackMailTypeMsg, FSAnnotFileAttachment and FSAnnotStamp.
  [in] | icon_name | Icon name of the annotation.

返回
  YES means current icon provider supports to change color for a specified icon type, while NO means not support.

## ◆ getDisplayHeight:icon_name:()

- (NSNumber*) getDisplayHeight: |  | (FSAnnotType) | annot_type
icon_name: |  | (NSString *) | icon_name
| required

A callback function used to get the height for display of a specified icon, in device size(pixel normally).

参数

  [in] | annot_type | The annotation type. It should be one of FSActionCallbackMailTypeMsg, FSAnnotFileAttachment and FSAnnotStamp.
  [in] | icon_name | Icon name of the annotation.

返回
  The height for display.

## ◆ getDisplayWidth:icon_name:()

- (NSNumber*) getDisplayWidth: |  | (FSAnnotType) | annot_type
icon_name: |  | (NSString *) | icon_name
| required

A callback function used to get the width for display of a specified icon, in device size(pixel normally).

参数

  [in] | annot_type | The annotation type. It should be one of FSActionCallbackMailTypeMsg, FSAnnotFileAttachment and FSAnnotStamp.
  [in] | icon_name | Icon name of the annotation.

返回
  The width for display.

## ◆ getIcon:icon_name:color:annot_dict:()

- (FSPDFPage*) getIcon: |  | (FSAnnotType) | annot_type
icon_name: |  | (NSString *) | icon_name
color: |  | (unsigned int) | color
annot_dict: |  | (FSPDFDictionary *) | annot_dict
| required

A callback function used to get the icon as PDF page contents for a specified type.

参数

  [in] | annot_type | The annotation type. It should be one of FSActionCallbackMailTypeMsg, FSAnnotFileAttachment and FSAnnotStamp.
  [in] | icon_name | Icon name of the annotation.
  [in] | color | The icon color of the annotation. Format: 0xAARRGGBB.
  [in] | annot_dict | The annotation dict.

返回
  A PDF page object whose content would be used as the icon.

## ◆ getProviderID()

- (NSString*) getProviderID |  |  |
| required

A callback function used to get provider ID.

Icon provider's ID and version are treated as the name of the icon provider, so please offer different "ID + version" for different icon providers.

返回
  The provider ID.

## ◆ getProviderVersion()

- (NSString*) getProviderVersion |  |  |
| required

A callback function used to get provider version.

Icon provider's ID and version are treated as the name of the icon provider, so please offer different "ID + version" for different icon providers.

返回
  Version string.

## ◆ getShadingColor:icon_name:referenced_color:shading_index:()

- (FSShadingColor*) getShadingColor: |  | (FSAnnotType) | annot_type
icon_name: |  | (NSString *) | icon_name
referenced_color: |  | (unsigned int) | referenced_color
shading_index: |  | (int) | shading_index
| required

A callback function used to get the shading colors if current icon provider supports for a specified type. Currently, only support Type-2 shading settings with two color values.

参数

  [in] | annot_type | The annotation type. It should be one of FSActionCallbackMailTypeMsg, FSAnnotFileAttachment and FSAnnotStamp.
  [in] | icon_name | Icon name of the annotation.
  [in] | referenced_color | Referenced color. Format: 0xRRGGBB.
  [in] | shading_index | Index color of shading, starting from 0. If shading colors are more than one, this function will be called multiple times.

返回
  The shading color.

## ◆ hasIcon:icon_name:()

- (BOOL) hasIcon: |  | (FSAnnotType) | annot_type
icon_name: |  | (NSString *) | icon_name
| required

A callback function used to check if current icon provider supports icon for a specified type.

参数

  [in] | annot_type | The annotation type. It should be one of FSActionCallbackMailTypeMsg, FSAnnotFileAttachment and FSAnnotStamp.
  [in] | icon_name | Icon name of the annotation.

返回
  YES means current icon provider supports the specified icon, while NO means not support.