Foxit PDF SDK
FSWidget Class Reference
Inheritance diagram for FSWidget:
FSAnnot FSBase

Instance Methods

(NSString *) - getAppearanceOnStateName
 Get the name of the annotation's appearance "ON" state.
More...
 
(FSControl *) - getControl
 Get associated form control.
More...
 
(FSField *) - getField
 Get associated form field.
More...
 
(BOOL) - hasMKEntry:
 Check if a specified entry exists in the MK dictionary.
More...
 
(id) - init
 Constructor.

 
(id) - initWithAnnot:
 Constructor, with parent class object.
More...
 
(void) - removeAction
 Remove action.
More...
 
(void) - removeMKEntry:
 Remove a specified entry from the MK dictionary.
More...
 
(void) - setMKDownIconImage:frame_index:
 Set an image with specified frame index as down icon in the MK dictionary.
More...
 
(void) - setMKNormalIconImage:frame_index:
 Set an image with specified frame index as normal icon in the MK dictionary.
More...
 
(void) - setMKRolloverIconImage:frame_index:
 Set an image with specified frame index as rollover icon in the MK dictionary.
More...
 
- Instance Methods inherited from FSAnnot
(FSPDFStream *) - getAppearanceStream:appearance_state:
 Get annotation's appearance stream with specified type and state.
More...
 
(FSRectI *) - getDeviceRect:
 Get annotation rectangle in device coordinate system.
More...
 
(FSPDFDictionary *) - getDict
 Get annotation's dictionary object.
More...
 
(FSMatrix2D *) - getDisplayMatrix:
 Get the display matrix, from PDF coordinate system to targeted device coordinate system.
More...
 
(int) - getIndex
 Get the index of current annotation in the page which current annotation belongs to.
More...
 
(FSPDFDictionary *) - getOptionalContent
 Get the PDF dictionary of annotation's optional content.
More...
 
(FSPDFPage *) - getPage
 Get the related PDF page.
More...
 
(FSRectF *) - getRect
 Get rectangle, in PDF coordinate system.
More...
 
(FSAnnotType- getType
 Get actual annotation type of current annotation.
More...
 
(BOOL) - hasProperty:
 Whether current annotation has the specified annotation's property.
More...
 
(id) - initWithPage:annot_dict:
 Constructor, with PDF page and annotation's PDF dictionary.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(BOOL) - isMarkup
 Check if current annotation is a markup annotation.
More...
 
(BOOL) - move:
 Move current annotation to a new position, specified by a new rectangle in PDF coordinate system.
More...
 
(BOOL) - removeProperty:
 Remove a specified annotation's property.
More...
 
(BOOL) - resetAppearanceStream
 Reset appearance stream.
More...
 

Properties

FSActionaction
 Get or Set action.
More...
 
NSString * appearanceState
 Get or Set the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.

 
FSAnnotHighlightingMode highlightingMode
 Get or Set highlighting mode.
More...
 
unsigned int mKBackgroundColor
 Get or Set the background color in the MK dictionary.
More...
 
unsigned int mKBorderColor
 Get or Set the border color in the MK dictionary.
More...
 
NSString * mKDownCaption
 Get or Set the down caption string in the MK dictionary.
More...
 
FSBitmapmKDownIconBitmap
 Get or Set the down icon bitmap in the MK dictionary.
More...
 
FSAnnotMKIconCaptionRelation mKIconCaptionRelation
 Get or Set the relation of icon and caption in the MK dictionary.
More...
 
FSIconFitmKIconFit
 Get or Set the icon fit information in the MK dictionary.
More...
 
NSString * mKNormalCaption
 Get or Set the normal caption string in the MK dictionary.
More...
 
FSBitmapmKNormalIconBitmap
 Get or Set the normal icon bitmap in the MK dictionary.
More...
 
NSString * mKRolloverCaption
 Get or Set the rollover caption string in the MK dictionary.
More...
 
FSBitmapmKRolloverIconBitmap
 Get or Set the rollover icon bitmap in the MK dictionary.
More...
 
FSRotation mKRotation
 Get or Set the rotation value in the MK dictionary.
More...
 
- Properties inherited from FSAnnot
unsigned int borderColor
 Get or Set border color.
More...
 
FSBorderInfoborderInfo
 Get or Set border information.
More...
 
NSString * content
 Get or Set content.

 
unsigned int flags
 Get or Set annotation flags.

 
FSDateTimemodifiedDateTime
 Get or Set last modified date time.

 
NSString * uniqueID
 Get or Set unique ID.

 

Detailed Description

A widget annotation is used to represent the appearance of form fields.
Class FSWidget is derived from class FSAnnot and also offers functions to get/set widget annotation's properties. Functions FSWidget::getField and FSWidget::getControl can be used to get the associated form field and form control object. If a widget annotation is not associated with any form field or is associated with a signature field, this widget can still get/set properties, but cannot be reset appearance. For these cases, FSAnnot::resetAppearanceStream (inherited from Widget's parent class) will return NO directly.

See also
FSAnnot
FSField
FSControl

Method Documentation

◆ getAppearanceOnStateName()

- (NSString *) getAppearanceOnStateName

Get the name of the annotation's appearance "ON" state.

Returns
The name of the annotation's appearance "ON" state.

◆ getControl()

- (FSControl *) getControl

Get associated form control.

Returns
The associated form control object.

◆ getField()

- (FSField *) getField

Get associated form field.

Returns
The associated form field object.

◆ hasMKEntry:()

- (BOOL) hasMKEntry: (FSAnnotMKEntry mk_entry

Check if a specified entry exists in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.

Parameters
[in]mk_entryAn entry in MK dictionary. Please refer to values starting from FSAnnotMKEntryRotation and this should be one of these values.
Returns
YES means the specified entry exists in the MK dictionary, while NO means not.

◆ initWithAnnot:()

- (id) initWithAnnot: (FSAnnot*)  annot

Constructor, with parent class object.

Parameters
[in]annotParent class object.

Reimplemented from FSAnnot.

◆ removeAction()

- (void) removeAction

Remove action.

This function cannot be used to remove action which is used as additional action. If user wants to remove any additional action, please refer to class FSAdditionalAction for more details.

Returns
None.

◆ removeMKEntry:()

- (void) removeMKEntry: (FSAnnotMKEntry mk_entry

Remove a specified entry from the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.

Parameters
[in]mk_entryAn entry in MK dictionary. Please refer to values starting from FSAnnotMKEntryRotation and this should be one of these values.
Returns
None.

◆ setMKDownIconImage:frame_index:()

- (void) setMKDownIconImage: (FSImage*)  image
frame_index: (int)  frame_index 

Set an image with specified frame index as down icon in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Down icon (or alternate icon) in MK dictionary is used to displayed when the mouse button is pressed within its active area. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.

Parameters
[in]imageAn image. One of its frames will be set as down icon in MK dictionary. This image should contain at least one frame and the image type should not be FSImageUnknown.
[in]frame_indexFrame index. Valid range: from 0 to (count-1). count is returned by function FSImage::getFrameCount.

◆ setMKNormalIconImage:frame_index:()

- (void) setMKNormalIconImage: (FSImage*)  image
frame_index: (int)  frame_index 

Set an image with specified frame index as normal icon in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Normal icon in MK dictionary is used to displayed when the widget is not interacting with the user. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.

Parameters
[in]imageAn image. One of its frames will be set as normal icon in MK dictionary. This image should contain at least one frame and the image type should not be FSImageUnknown.
[in]frame_indexFrame index. Valid range: from 0 to (count-1). count is returned by function FSImage::getFrameCount.

◆ setMKRolloverIconImage:frame_index:()

- (void) setMKRolloverIconImage: (FSImage*)  image
frame_index: (int)  frame_index 

Set an image with specified frame index as rollover icon in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Rollover icon in MK dictionary is used to displayed when the user rolls the cursor into its active area without pressing the mouse button. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.

Parameters
[in]imageAn image. One of its frames will be set as rollover icon in MK dictionary. This image should contain at least one frame and the image type should not be FSImageUnknown.
[in]frame_indexFrame index. Valid range: from 0 to (count-1). count is returned by function FSImage::getFrameCount.

Property Documentation

◆ action

- (FSAction *) action
readwritenonatomicweak

Get or Set action.

This function cannot be used to get action which is used as additional action. If user wants to get any additional action, please refer to class FSAdditionalAction for more details.

◆ highlightingMode

- (FSAnnotHighlightingMode) highlightingMode
readwritenonatomicassign

Get or Set highlighting mode.

Highlighting mode is the visual effect to be used when the mouse button is pressed or held down inside its active area

◆ mKBackgroundColor

- (unsigned int) mKBackgroundColor
readwritenonatomicassign

Get or Set the background color in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.

◆ mKBorderColor

- (unsigned int) mKBorderColor
readwritenonatomicassign

Get or Set the border color in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.

◆ mKDownCaption

- (NSString *) mKDownCaption
readwritenonatomicweak

Get or Set the down caption string in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Down caption (or alternate caption) in MK dictionary is used to displayed when the mouse button is pressed within its active area. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.

◆ mKDownIconBitmap

- (FSBitmap *) mKDownIconBitmap
readwritenonatomicweak

Get or Set the down icon bitmap in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Down icon (or alternate icon) in MK dictionary is used to displayed when the mouse button is pressed within its active area. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.

◆ mKIconCaptionRelation

- (FSAnnotMKIconCaptionRelation) mKIconCaptionRelation
readwritenonatomicassign

Get or Set the relation of icon and caption in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. The relation position of caption and icon specifies where to position the text of the widget annotation's caption relative to its icon. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.

◆ mKIconFit

- (FSIconFit *) mKIconFit
readwritenonatomicweak

Get or Set the icon fit information in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. The icon fit information specifies how to display the widget annotation's icon within its annotation rectangle. If present, the icon fit information applies to all of the annotation's icons. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.

◆ mKNormalCaption

- (NSString *) mKNormalCaption
readwritenonatomicweak

Get or Set the normal caption string in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Normal caption in MK dictionary is used to displayed when the widget is not interacting with the user. This is applicable for widget associated with pushbutton field, check box field or radio button field. For other type of fields, this will be useless.

◆ mKNormalIconBitmap

- (FSBitmap *) mKNormalIconBitmap
readwritenonatomicweak

Get or Set the normal icon bitmap in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Normal icon in MK dictionary is used to displayed when the widget is not interacting with the user. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.

◆ mKRolloverCaption

- (NSString *) mKRolloverCaption
readwritenonatomicweak

Get or Set the rollover caption string in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Rollover caption in MK dictionary is used to displayed when the user rolls the cursor into its active area without pressing the mouse button. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.

◆ mKRolloverIconBitmap

- (FSBitmap *) mKRolloverIconBitmap
readwritenonatomicweak

Get or Set the rollover icon bitmap in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. Rollover icon in MK dictionary is used to displayed when the user rolls the cursor into its active area without pressing the mouse button. This is applicable for widget associated with pushbutton field. For other type of fields, this will be useless.

◆ mKRotation

- (FSRotation) mKRotation
readwritenonatomicassign

Get or Set the rotation value in the MK dictionary.

MK dictionary is an appearance characteristics dictionary to be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page. The rotation in MK dictionary specifies the degrees by which the widget annotation is rotated counterclockwise relative to the page.