Foxit PDF SDK
foxit.pdf.annots.Widget Class Reference
Inheritance diagram for foxit.pdf.annots.Widget:
foxit.pdf.annots.Annot foxit.common.Base

Public Member Functions

 Widget ()
 Constructor.
 
 Widget (Annot annot)
 Constructor, with parent class object. More...
 
Action GetAction ()
 Get action. More...
 
string GetAppearanceOnStateName ()
 Get the name of the annotation's appearance "ON" state. More...
 
string GetAppearanceState ()
 Get the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary. More...
 
Control GetControl ()
 Get associated form control. More...
 
Field GetField ()
 Get associated form field. More...
 
Annot.HighlightingMode GetHighlightingMode ()
 Get highlighting mode. More...
 
int GetMKBackgroundColor ()
 Get the background color in the MK dictionary. More...
 
int GetMKBorderColor ()
 Get the border color in the MK dictionary. More...
 
string GetMKDownCaption ()
 Get the down caption string in the MK dictionary. More...
 
Bitmap GetMKDownIconBitmap ()
 Get the down icon bitmap in the MK dictionary. More...
 
Annot.MKIconCaptionRelation GetMKIconCaptionRelation ()
 Get the relation of icon and caption in the MK dictionary. More...
 
IconFit GetMKIconFit ()
 Get the icon fit information in the MK dictionary. More...
 
string GetMKNormalCaption ()
 Get the normal caption string in the MK dictionary. More...
 
Bitmap GetMKNormalIconBitmap ()
 Get the normal icon bitmap in the MK dictionary. More...
 
string GetMKRolloverCaption ()
 Get the rollover caption string in the MK dictionary. More...
 
Bitmap GetMKRolloverIconBitmap ()
 Get the rollover icon bitmap in the MK dictionary. More...
 
Rotation GetMKRotation ()
 Get the rotation value in the MK dictionary. More...
 
bool HasMKEntry (Annot.MKEntry mk_entry)
 Check if a specified entry exists in the MK dictionary. More...
 
void RemoveAction ()
 Remove action. More...
 
void RemoveMKEntry (Annot.MKEntry mk_entry)
 Remove a specified entry from the MK dictionary. More...
 
void SetAction (Action action)
 Set action. More...
 
void SetAppearanceState (string appearance_state)
 Set the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary. More...
 
void SetHighlightingMode (Annot.HighlightingMode mode)
 Set highlighting mode. More...
 
void SetMKBackgroundColor (int color)
 Set the background color in the MK dictionary. More...
 
void SetMKBorderColor (int color)
 Set the border color in the MK dictionary. More...
 
void SetMKDownCaption (string caption)
 Set the down caption string in the MK dictionary. More...
 
void SetMKDownIconBitmap (Bitmap bitmap)
 Set the down icon bitmap in the MK dictionary. More...
 
void SetMKDownIconImage (Image image, int frame_index)
 Set an image with specified frame index as down icon in the MK dictionary. More...
 
void SetMKIconCaptionRelation (Annot.MKIconCaptionRelation relation)
 Set the relation of icon and caption in the MK dictionary. More...
 
void SetMKIconFit (IconFit icon_fit)
 Set the icon fit information in the MK dictionary. More...
 
void SetMKNormalCaption (string caption)
 Set the normal caption string in the MK dictionary. More...
 
void SetMKNormalIconBitmap (Bitmap bitmap)
 Set a bitmap as normal icon in the MK dictionary. More...
 
void SetMKNormalIconImage (Image image, int frame_index)
 Set an image with specified frame index as normal icon in the MK dictionary. More...
 
void SetMKRolloverCaption (string caption)
 Set the rollover caption string in the MK dictionary. More...
 
void SetMKRolloverIconBitmap (Bitmap bitmap)
 Set the rollover icon bitmap in the MK dictionary. More...
 
void SetMKRolloverIconImage (Image image, int frame_index)
 Set an image with specified frame index as rollover icon in the MK dictionary. More...
 
void SetMKRotation (Rotation rotation)
 Set the rotation value in the MK dictionary. More...
 
- Public Member Functions inherited from foxit.pdf.annots.Annot
 Annot (PDFPage page, PDFDictionary annot_dict)
 Constructor, with PDF page and annotation's PDF dictionary. More...
 
 Annot (Annot annot)
 Constructor, with another annotation object. More...
 
 Annot ()
 Constructor.
 
PDFStream GetAppearanceStream (Annot.AppearanceType type, string appearance_state)
 Get annotation's appearance stream with specified type and state. More...
 
int GetBorderColor ()
 Get border color. More...
 
BorderInfo GetBorderInfo ()
 Get border information. More...
 
string GetContent ()
 Get content. More...
 
RectI GetDeviceRect (Matrix2D matrix)
 Get annotation rectangle in device coordinate system. More...
 
PDFDictionary GetDict ()
 Get annotation's dictionary object. More...
 
Matrix2D GetDisplayMatrix (Matrix2D page_display_matrix)
 Get the display matrix, from PDF coordinate system to targeted device coordinate system. More...
 
int GetFlags ()
 Get annotation flags. More...
 
int GetIndex ()
 Get the index of current annotation in the page which current annotation belongs to. More...
 
DateTime GetModifiedDateTime ()
 Get last modified date time. More...
 
PDFDictionary GetOptionalContent ()
 Get the PDF dictionary of annotation's optional content. More...
 
PDFPage GetPage ()
 Get the related PDF page. More...
 
RectF GetRect ()
 Get rectangle, in PDF coordinate system. More...
 
Annot.Type GetType ()
 Get actual annotation type of current annotation. More...
 
string GetUniqueID ()
 Get unique ID. 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 (RectF rect)
 Move current annotation to a new position, specified by a new rectangle in [PDF coordinate system] (foxit.pdf.PDFPage). More...
 
bool RemoveProperty (Annot.Property property)
 Remove a specified annotation's property. More...
 
bool ResetAppearanceStream ()
 Reset appearance stream. More...
 
void SetBorderColor (int color)
 Set border color. More...
 
void SetBorderInfo (BorderInfo border)
 Set border information. More...
 
void SetContent (string content)
 Set content. More...
 
void SetFlags (int flags)
 Set annotation flags. More...
 
void SetModifiedDateTime (DateTime date_time)
 Set last modified date time. More...
 
void SetUniqueID (string unique_id)
 Set unique ID. More...
 

Additional Inherited Members

- Public Types inherited from foxit.pdf.annots.Annot
enum  AppearanceType { AppearanceType.e_AppearanceTypeNormal = 0, AppearanceType.e_AppearanceTypeRollover = 1, AppearanceType.e_AppearanceTypeDown = 2 }
 Enumeration for the type of annotation's appearance. More...
 
enum  Flags {
  Flags.e_FlagInvisible = 0x0001, Flags.e_FlagHidden = 0x0002, Flags.e_FlagPrint = 0x0004, Flags.e_FlagNoZoom = 0x0008,
  Flags.e_FlagNoRotate = 0x0010, Flags.e_FlagNoView = 0x0020, Flags.e_FlagReadOnly = 0x0040, Flags.e_FlagLocked = 0x0080,
  Flags.e_FlagToggleNoView = 0x0100, Flags.e_FlagLockedContents = 0x0200
}
 Enumeration for PDF annotation flags. More...
 
enum  HighlightingMode {
  HighlightingMode.e_HighlightingNone = 0, HighlightingMode.e_HighlightingInvert = 1, HighlightingMode.e_HighlightingOutline = 2, HighlightingMode.e_HighlightingPush = 3,
  HighlightingMode.e_HighlightingToggle = 4
}
 Enumeration for PDF annotation highlighting mode. More...
 
enum  MKEntry {
  MKEntry.e_MKEntryRotation = 0, MKEntry.e_MKEntryBorderColor = 1, MKEntry.e_MKEntryBackgroundColor = 2, MKEntry.e_MKEntryNormalCaption = 3,
  MKEntry.e_MKEntryRolloverCaption = 4, MKEntry.e_MKEntryDownCaption = 5, MKEntry.e_MKEntryNormalIcon = 6, MKEntry.e_MKEntryRolloverIcon = 7,
  MKEntry.e_MKEntryDownIcon = 8, MKEntry.e_MKEntryIconFit = 9, MKEntry.e_MKEntryIconCaptionRelation = 10
}
 Enumeration for annotation's MK dictionary (an appearance characteristics) entry. More...
 
enum  MKIconCaptionRelation {
  MKIconCaptionRelation.e_MKRelationNoIcon = 0, MKIconCaptionRelation.e_MKRelationNoCaption = 1, MKIconCaptionRelation.e_MKRelationCaptionBelowIcon = 2, MKIconCaptionRelation.e_MKRelationCaptionAboveIcon = 3,
  MKIconCaptionRelation.e_MKRelationCaptionRight = 4, MKIconCaptionRelation.e_MKRelationCaptionLeft = 5, MKIconCaptionRelation.e_MKRelationCaptionOvrlayOnIcon = 6
}
 Enumeration for icon and caption relative position in annotation's MK dictionary. More...
 
enum  Property { Property.e_PropertyModifiedDate = 0, Property.e_PropertyCreationDate = 1, Property.e_PropertyBorderColor = 2, Property.e_PropertyFillColor = 3 }
 Enumeration for some PDF annotation property. More...
 
enum  Type {
  Type.e_UnknownType = 0, Type.e_Note = 1, Type.e_Link = 2, Type.e_FreeText = 3,
  Type.e_Line = 4, Type.e_Square = 5, Type.e_Circle = 6, Type.e_Polygon = 7,
  Type.e_PolyLine = 8, Type.e_Highlight = 9, Type.e_Underline = 10, Type.e_Squiggly = 11,
  Type.e_StrikeOut = 12, Type.e_Stamp = 13, Type.e_Caret = 14, Type.e_Ink = 15,
  Type.e_PSInk = 16, Type.e_FileAttachment = 17, Type.e_Sound = 18, Type.e_Movie = 19,
  Type.e_Widget = 20, Type.e_Screen = 21, Type.e_PrinterMark = 22, Type.e_TrapNet = 23,
  Type.e_Watermark = 24, Type.e_3D = 25, Type.e_Popup = 26, Type.e_Redact = 27
}
 Enumeration for PDF annotation type. More...
 

Detailed Description

A widget annotation is used to represent the appearance of form fields.
Class foxit.pdf.annots.Widget is derived from class Annot and also offers functions to get/set widget annotation's properties. Functions Widget.GetField and Widget.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, Annot.ResetAppearanceStream (inherited from Widget's parent class) will return false directly.

See also
Annot
foxit.pdf.interform.Field
foxit.pdf.interform.Control

Constructor & Destructor Documentation

◆ Widget()

foxit.pdf.annots.Widget.Widget ( Annot  annot)
inline

Constructor, with parent class object.

Parameters
[in]annotParent class object.

Member Function Documentation

◆ GetAction()

Action foxit.pdf.annots.Widget.GetAction ( )
inline

Get 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 foxit.pdf.actions.AdditionalAction for more details.

Returns
An action object that receives the action data. If the return value of function actions.Action.IsEmpty for the returned action object is true, that means no action.

◆ GetAppearanceOnStateName()

string foxit.pdf.annots.Widget.GetAppearanceOnStateName ( )
inline

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

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

◆ GetAppearanceState()

string foxit.pdf.annots.Widget.GetAppearanceState ( )
inline

Get the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.

Returns
The annotation's appearance state.

◆ GetControl()

Control foxit.pdf.annots.Widget.GetControl ( )
inline

Get associated form control.

Returns
The associated form control object.

◆ GetField()

Field foxit.pdf.annots.Widget.GetField ( )
inline

Get associated form field.

Returns
The associated form field object.

◆ GetHighlightingMode()

Annot.HighlightingMode foxit.pdf.annots.Widget.GetHighlightingMode ( )
inline

Get highlighting mode.

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

Returns
Highlighting mode value. Please refer to values starting from foxit.pdf.annots.Annot.HighlightingMode.e_HighlightingNone and this would be one of these values.

◆ GetMKBackgroundColor()

int foxit.pdf.annots.Widget.GetMKBackgroundColor ( )
inline

Get 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.

Returns
The background color in MK dictionary. Value format: 0xRRGGBB.
0 may means no background color in MK dictionary. In this case, please call function Widget.HasMKEntry with value foxit.pdf.annots.Annot.MKEntry.e_MKEntryBackgroundColor to check.

◆ GetMKBorderColor()

int foxit.pdf.annots.Widget.GetMKBorderColor ( )
inline

Get 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.

Returns
The border color in MK dictionary. Value format: 0xRRGGBB.
0 may means no border color in MK dictionary. In this case, please call function Widget.HasMKEntry with value foxit.pdf.annots.Annot.MKEntry.e_MKEntryBorderColor to check.

◆ GetMKDownCaption()

string foxit.pdf.annots.Widget.GetMKDownCaption ( )
inline

Get 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.

Returns
Down caption string. An empty string may means no down caption in MK dictionary. In this case, please call function Widget.HasMKEntry with value foxit.pdf.annots.Annot.MKEntry.e_MKEntryDownCaption to check.

◆ GetMKDownIconBitmap()

Bitmap foxit.pdf.annots.Widget.GetMKDownIconBitmap ( )
inline

Get 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.

Returns
Down icon bitmap. If function common.Bitmap.IsEmpty for the returned bitmap object returns true, that means current widget annotation does not have down icon bitmap.

◆ GetMKIconCaptionRelation()

Annot.MKIconCaptionRelation foxit.pdf.annots.Widget.GetMKIconCaptionRelation ( )
inline

Get 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.

Returns
The relation position of caption and icon. Please refer to foxit.pdf.annots.Annot.MKIconCaptionRelation.e_MKRelationNoIcon values and it should be one of these values.

◆ GetMKIconFit()

IconFit foxit.pdf.annots.Widget.GetMKIconFit ( )
inline

Get 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.

Returns
An icon fit object, which contains the icon fit information in MK dictionary. If scale way type of icon fit object is 0, that means no icon fit information in MK dictionary.

◆ GetMKNormalCaption()

string foxit.pdf.annots.Widget.GetMKNormalCaption ( )
inline

Get 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.

Returns
Normal caption string. An empty string may means no normal caption in MK dictionary. In this case, please call function Widget.HasMKEntry with value foxit.pdf.annots.Annot.MKEntry.e_MKEntryNormalCaption to check.

◆ GetMKNormalIconBitmap()

Bitmap foxit.pdf.annots.Widget.GetMKNormalIconBitmap ( )
inline

Get 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.

Returns
Normal icon bitmap. If function common.Bitmap.IsEmpty for the returned bitmap object returns true, that means current widget annotation does not have normal icon bitmap.

◆ GetMKRolloverCaption()

string foxit.pdf.annots.Widget.GetMKRolloverCaption ( )
inline

Get 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.

Returns
Rollover caption string. An empty string may means no rollover caption in MK dictionary. In this case, please call function Widget.HasMKEntry with value foxit.pdf.annots.Annot.MKEntry.e_MKEntryRolloverCaption to check.

◆ GetMKRolloverIconBitmap()

Bitmap foxit.pdf.annots.Widget.GetMKRolloverIconBitmap ( )
inline

Get 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.

Returns
Rollover icon bitmap. If function common.Bitmap.IsEmpty for the returned bitmap object returns true, that means current widget annotation does not have rollover icon bitmap.

◆ GetMKRotation()

Rotation foxit.pdf.annots.Widget.GetMKRotation ( )
inline

Get 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.

Returns
The rotation value in MK dictionary. Please refer to values starting from foxit.common.Rotation.e_Rotation0 and this would be one of these values. Value foxit.common.Rotation.e_RotationUnknown means no rotation in MK dictionary.

◆ HasMKEntry()

bool foxit.pdf.annots.Widget.HasMKEntry ( Annot.MKEntry  mk_entry)
inline

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 foxit.pdf.annots.Annot.MKEntry.e_MKEntryRotation and this should be one of these values.
Returns
true means the specified entry exists in the MK dictionary, while false means not.

◆ RemoveAction()

void foxit.pdf.annots.Widget.RemoveAction ( )
inline

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 foxit.pdf.actions.AdditionalAction for more details.

Returns
None.

◆ RemoveMKEntry()

void foxit.pdf.annots.Widget.RemoveMKEntry ( Annot.MKEntry  mk_entry)
inline

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 foxit.pdf.annots.Annot.MKEntry.e_MKEntryRotation and this should be one of these values.
Returns
None.

◆ SetAction()

void foxit.pdf.annots.Widget.SetAction ( Action  action)
inline

◆ SetAppearanceState()

void foxit.pdf.annots.Widget.SetAppearanceState ( string  appearance_state)
inline

Set the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.

Parameters
[in]appearance_stateThe annotation's appearance state.
Returns
None.

◆ SetHighlightingMode()

void foxit.pdf.annots.Widget.SetHighlightingMode ( Annot.HighlightingMode  mode)
inline

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

Parameters
[in]modeNew highlighting mode value. Please refer to values starting from foxit.pdf.annots.Annot.HighlightingMode.e_HighlightingNone and this should be one of these values.
Returns
None.

◆ SetMKBackgroundColor()

void foxit.pdf.annots.Widget.SetMKBackgroundColor ( int  color)
inline

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.

Parameters
[in]colorThe background color to be set in MK dictionary. Value format: 0xRRGGBB.
Returns
None.

◆ SetMKBorderColor()

void foxit.pdf.annots.Widget.SetMKBorderColor ( int  color)
inline

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.

Parameters
[in]colorThe border color to be set in MK dictionary. Value format: 0xRRGGBB.
Returns
None.

◆ SetMKDownCaption()

void foxit.pdf.annots.Widget.SetMKDownCaption ( string  caption)
inline

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.

Parameters
[in]captionDown caption string to be set in MK dictionary. It can be an empty string.
Returns
None.

◆ SetMKDownIconBitmap()

void foxit.pdf.annots.Widget.SetMKDownIconBitmap ( Bitmap  bitmap)
inline

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.

Parameters
[in]bitmapA valid bitmap to be set as down icon in MK dictionary.
Returns
None.

◆ SetMKDownIconImage()

void foxit.pdf.annots.Widget.SetMKDownIconImage ( Image  image,
int  frame_index 
)
inline

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 foxit.common.Image.Type.e_Unknown .
[in]frame_indexFrame index. Valid range: from 0 to (count-1). count is returned by function common.Image.GetFrameCount .

◆ SetMKIconCaptionRelation()

void foxit.pdf.annots.Widget.SetMKIconCaptionRelation ( Annot.MKIconCaptionRelation  relation)
inline

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.

Parameters
[in]relationThe relation position of caption and icon. Please refer to values starting from foxit.pdf.annots.Annot.MKIconCaptionRelation.e_MKRelationNoIcon and this should be one of these values.
Returns
None.

◆ SetMKIconFit()

void foxit.pdf.annots.Widget.SetMKIconFit ( IconFit  icon_fit)
inline

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.

Parameters
[in]icon_fitAn icon fit object which represents the icon fit information to be set in MK dictionary. If value of any member in this object is invalid, this function will throw exception foxit.common.ErrorCode.e_ErrParam . Please refer to class IconFit to check the valid value range for each member.
Returns
None.

◆ SetMKNormalCaption()

void foxit.pdf.annots.Widget.SetMKNormalCaption ( string  caption)
inline

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 widgets associated with pushbutton field, check box field or radio button field. For other type of fields, this will be useless.

Parameters
[in]captionNormal caption string to be set in MK dictionary. It can be an empty string.
Returns
None.

◆ SetMKNormalIconBitmap()

void foxit.pdf.annots.Widget.SetMKNormalIconBitmap ( Bitmap  bitmap)
inline

Set a bitmap 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]bitmapA valid bitmap to be set as normal icon in MK dictionary.
Returns
None.

◆ SetMKNormalIconImage()

void foxit.pdf.annots.Widget.SetMKNormalIconImage ( Image  image,
int  frame_index 
)
inline

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 foxit.common.Image.Type.e_Unknown .
[in]frame_indexFrame index. Valid range: from 0 to (count-1). count is returned by function common.Image.GetFrameCount .

◆ SetMKRolloverCaption()

void foxit.pdf.annots.Widget.SetMKRolloverCaption ( string  caption)
inline

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.

Parameters
[in]captionRollover caption string to be set in MK dictionary. It can be an empty string.
Returns
None.

◆ SetMKRolloverIconBitmap()

void foxit.pdf.annots.Widget.SetMKRolloverIconBitmap ( Bitmap  bitmap)
inline

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.

Parameters
[in]bitmapA valid bitmap to be set as rollover icon in MK dictionary.
Returns
None.

◆ SetMKRolloverIconImage()

void foxit.pdf.annots.Widget.SetMKRolloverIconImage ( Image  image,
int  frame_index 
)
inline

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 foxit.common.Image.Type.e_Unknown .
[in]frame_indexFrame index. Valid range: from 0 to (count-1). count is returned by function common.Image.GetFrameCount .

◆ SetMKRotation()

void foxit.pdf.annots.Widget.SetMKRotation ( Rotation  rotation)
inline

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.

Parameters
[in]rotationThe rotation value to be set in MK dictionary. Please refer to values starting from foxit.common.Rotation.e_Rotation0 and this should be one of these values except foxit.common.Rotation.e_RotationUnknown