Foxit PDF SDK
|
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... | |
Widget.LineSpacingStyle | GetLineSpacing (ref float line_spacing_value) |
Get line spacing of current widget. 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 | SetLineSpacing (Widget.LineSpacingStyle line_spacing_style, float line_spacing_value) |
Set line spacing for current widget. 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... | |
![]() | |
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 | HasProperty (Annot.Property property) |
Whether current annotation has the specified annotation's property. 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 | Move (RectF rect, bool is_reset_appearance) |
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... | |
bool | ResetAppearanceStream (bool is_generate_new_appearance_obj) |
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... | |
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.
|
strong |
Enumeration for line spacing style.
Values of this enumeration should be used alone.
|
inline |
Constructor, with parent class object.
[in] | annot | Parent class object. |
|
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.
|
inline |
Get the name of the annotation's appearance "ON" state.
|
inline |
Get the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.
|
inline |
Get associated form control.
|
inline |
Get associated form field.
|
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.
|
inline |
Get line spacing of current widget.
This is only applicable for widget associated with text fields which contain the flag foxit.pdf.interform.Field.Flags.e_FlagTextMultiline . For other type of fields, this will be useless.
[out] | line_spacing_value | Output parameter that receives the line spacing exact value. |
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
[in] | mk_entry | An 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. |
|
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.
|
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.
[in] | mk_entry | An 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. |
|
inline |
Set action.
This function cannot be used to set action which is used as additional action. If user wants to set any additional action, please refer to class foxit.pdf.actions.AdditionalAction for more details.
[in] | action | New action to be set. It should be valid. Currently only support following types as the new action: foxit.pdf.actions.Action.Type.e_TypeGoto , foxit.pdf.actions.Action.Type.e_TypeURI , foxit.pdf.actions.Action.Type.e_TypeJavaScript , foxit.pdf.actions.Action.Type.e_TypeNamed , foxit.pdf.actions.Action.Type.e_TypeGoToR , foxit.pdf.actions.Action.Type.e_TypeGoToE , foxit.pdf.actions.Action.Type.e_TypeSubmitForm , foxit.pdf.actions.Action.Type.e_TypeResetForm , foxit.pdf.actions.Action.Type.e_TypeHide , foxit.pdf.actions.Action.Type.e_TypeLaunch , foxit.pdf.actions.Action.Type.e_TypeImportData , foxit.pdf.actions.Action.Type.e_TypeRendition . |
|
inline |
Set the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.
[in] | appearance_state | The annotation's appearance state. |
|
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.
[in] | mode | New highlighting mode value. Please refer to values starting from foxit.pdf.annots.Annot.HighlightingMode.e_HighlightingNone and this should be one of these values. |
|
inline |
Set line spacing for current widget.
This is only applicable for widget associated with text fields which contain the flag foxit.pdf.interform.Field.Flags.e_FlagTextMultiline . For other type of fields, this will be useless.
[in] | line_spacing_style | Line spacing style to be set to current widget.Please refer to values starting from foxit.pdf.annots.Widget.LineSpacingStyle.e_LineSpacingSingle and this would be one of these values. |
[in] | line_spacing_value | Line spacing exact value to be set to current widget when parameter line_spacing_style is foxit.pdf.annots.Widget.LineSpacingStyle.e_LineSpacingExactValue . When this parameter is useful, this parameter must be an non-negative value and the unit should be "pt" (known as point). If this value is zero, the effect of line spacing will be the same as single line spacing. |
|
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.
[in] | color | The background color to be set in MK dictionary. Value format: 0xRRGGBB. |
|
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.
[in] | color | The border color to be set in MK dictionary. Value format: 0xRRGGBB. |
|
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.
[in] | caption | Down caption string to be set in MK dictionary. It can be an empty string. |
|
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.
[in] | bitmap | A valid bitmap to be set as down icon in MK dictionary. |
|
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.
[in] | image | An 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_index | Frame index. Valid range: from 0 to (count-1). count is returned by function common.Image.GetFrameCount . |
|
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.
[in] | relation | The 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. |
|
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.
[in] | icon_fit | An 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. |
|
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.
[in] | caption | Normal caption string to be set in MK dictionary. It can be an empty string. |
|
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.
[in] | bitmap | A valid bitmap to be set as normal icon in MK dictionary. |
|
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.
[in] | image | An 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_index | Frame index. Valid range: from 0 to (count-1). count is returned by function common.Image.GetFrameCount . |
|
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.
[in] | caption | Rollover caption string to be set in MK dictionary. It can be an empty string. |
|
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.
[in] | bitmap | A valid bitmap to be set as rollover icon in MK dictionary. |
|
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.
[in] | image | An 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_index | Frame index. Valid range: from 0 to (count-1). count is returned by function common.Image.GetFrameCount . |
|
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.
[in] | rotation | The 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 . Specially, rotation value here represents in counterclockwise. |