|
Foxit PDF SDK
|
Public Member Functions | |
| def | GetAction () |
| Get action. More... | |
| def | GetAppearanceOnStateName () |
| Get the name of the annotation's appearance "ON" state. More... | |
| def | GetAppearanceState () |
| Get the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary. More... | |
| def | GetControl () |
| Get associated form control. More... | |
| def | GetField () |
| Get associated form field. More... | |
| def | GetHighlightingMode () |
| Get highlighting mode. More... | |
| def | GetMKBackgroundColor () |
| Get the background color in the MK dictionary. More... | |
| def | GetMKBorderColor () |
| Get the border color in the MK dictionary. More... | |
| def | GetMKDownCaption () |
| Get the down caption string in the MK dictionary. More... | |
| def | GetMKDownIconBitmap () |
| Get the down icon bitmap in the MK dictionary. More... | |
| def | GetMKIconCaptionRelation () |
| Get the relation of icon and caption in the MK dictionary. More... | |
| def | GetMKIconFit () |
| Get the icon fit information in the MK dictionary. More... | |
| def | GetMKNormalCaption () |
| Get the normal caption string in the MK dictionary. More... | |
| def | GetMKNormalIconBitmap () |
| Get the normal icon bitmap in the MK dictionary. More... | |
| def | GetMKRolloverCaption () |
| Get the rollover caption string in the MK dictionary. More... | |
| def | GetMKRolloverIconBitmap () |
| Get the rollover icon bitmap in the MK dictionary. More... | |
| def | GetMKRotation () |
| Get the rotation value in the MK dictionary. More... | |
| def | HasMKEntry (mk_entry) |
| Check if a specified entry exists in the MK dictionary. More... | |
| def | RemoveAction () |
| Remove action. More... | |
| def | RemoveMKEntry (mk_entry) |
| Remove a specified entry from the MK dictionary. More... | |
| def | SetAction (action) |
| Set action. More... | |
| def | SetAppearanceState (appearance_state) |
| Set the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary. More... | |
| def | SetHighlightingMode (mode) |
| Set highlighting mode. More... | |
| def | SetLineSpacing (line_spacing_style, line_spacing_value) |
| Set line spacing for current widget. More... | |
| def | SetMKBackgroundColor (color) |
| Set the background color in the MK dictionary. More... | |
| def | SetMKBorderColor (color) |
| Set the border color in the MK dictionary. More... | |
| def | SetMKDownCaption (caption) |
| Set the down caption string in the MK dictionary. More... | |
| def | SetMKDownIconBitmap (bitmap) |
| Set the down icon bitmap in the MK dictionary. More... | |
| def | SetMKDownIconImage (image, frame_index) |
| Set an image with specified frame index as down icon in the MK dictionary. More... | |
| def | SetMKIconCaptionRelation (relation) |
| Set the relation of icon and caption in the MK dictionary. More... | |
| def | SetMKIconFit (icon_fit) |
| Set the icon fit information in the MK dictionary. More... | |
| def | SetMKNormalCaption (caption) |
| Set the normal caption string in the MK dictionary. More... | |
| def | SetMKNormalIconBitmap (bitmap) |
| Set a bitmap as normal icon in the MK dictionary. More... | |
| def | SetMKNormalIconImage (image, frame_index) |
| Set an image with specified frame index as normal icon in the MK dictionary. More... | |
| def | SetMKRolloverCaption (caption) |
| Set the rollover caption string in the MK dictionary. More... | |
| def | SetMKRolloverIconBitmap (bitmap) |
| Set the rollover icon bitmap in the MK dictionary. More... | |
| def | SetMKRolloverIconImage (image, frame_index) |
| Set an image with specified frame index as rollover icon in the MK dictionary. More... | |
| def | SetMKRotation (rotation) |
| Set the rotation value in the MK dictionary. More... | |
A widget annotation is used to represent the appearance of form fields.
Class fsdk.Widget is derived from class Annot and also offers functions to get/set widget annotation's properties. Functions fsdk.Widget.GetField and fsdk.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, fsdk.Annot.ResetAppearanceStream (inherited from Widget's parent class) will return false directly.
| def fsdk.Widget.GetAction | ( | ) |
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 fsdk.AdditionalAction for more details.
| def fsdk.Widget.GetAppearanceOnStateName | ( | ) |
Get the name of the annotation's appearance "ON" state.
| def fsdk.Widget.GetAppearanceState | ( | ) |
Get the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.
| def fsdk.Widget.GetControl | ( | ) |
Get associated form control.
| def fsdk.Widget.GetField | ( | ) |
Get associated form field.
| def fsdk.Widget.GetHighlightingMode | ( | ) |
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.
| def fsdk.Widget.GetMKBackgroundColor | ( | ) |
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.
| def fsdk.Widget.GetMKBorderColor | ( | ) |
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.
| def fsdk.Widget.GetMKDownCaption | ( | ) |
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.
| def fsdk.Widget.GetMKDownIconBitmap | ( | ) |
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.
| def fsdk.Widget.GetMKIconCaptionRelation | ( | ) |
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.
| def fsdk.Widget.GetMKIconFit | ( | ) |
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.
| def fsdk.Widget.GetMKNormalCaption | ( | ) |
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.
| def fsdk.Widget.GetMKNormalIconBitmap | ( | ) |
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.
| def fsdk.Widget.GetMKRolloverCaption | ( | ) |
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.
| def fsdk.Widget.GetMKRolloverIconBitmap | ( | ) |
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.
| def fsdk.Widget.GetMKRotation | ( | ) |
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.
| def fsdk.Widget.HasMKEntry | ( | 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.
| [in] | mk_entry | An entry in MK dictionary. Please refer to values starting from fsdk.AnnotE_MKEntryRotation and this should be one of these values. |
| def fsdk.Widget.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 fsdk.AdditionalAction for more details.
| def fsdk.Widget.RemoveMKEntry | ( | 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.
| [in] | mk_entry | An entry in MK dictionary. Please refer to values starting from fsdk.AnnotE_MKEntryRotation and this should be one of these values. |
| def fsdk.Widget.SetAction | ( | action | ) |
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 fsdk.AdditionalAction for more details.
| [in] | action | New action to be set. It should be valid. Currently only support following types as the new action: fsdk.ActionE_TypeGoto , fsdk.ActionE_TypeURI , fsdk.ActionE_TypeJavaScript , fsdk.ActionE_TypeNamed , fsdk.ActionE_TypeGoToR , fsdk.ActionE_TypeGoToE , fsdk.ActionE_TypeSubmitForm , fsdk.ActionE_TypeResetForm , fsdk.ActionE_TypeHide , fsdk.ActionE_TypeLaunch , fsdk.ActionE_TypeImportData , fsdk.ActionE_TypeRendition . |
| def fsdk.Widget.SetAppearanceState | ( | appearance_state | ) |
Set the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.
| [in] | appearance_state | The annotation's appearance state. |
| def fsdk.Widget.SetHighlightingMode | ( | mode | ) |
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 fsdk.AnnotE_HighlightingNone and this should be one of these values. |
| def fsdk.Widget.SetLineSpacing | ( | line_spacing_style, | |
| line_spacing_value | |||
| ) |
Set line spacing for current widget.
This is only applicable for widget associated with text fields which contain the flag fsdk.FieldE_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 fsdk.WidgetE_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 fsdk.WidgetE_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. |
| def fsdk.Widget.SetMKBackgroundColor | ( | color | ) |
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. |
| def fsdk.Widget.SetMKBorderColor | ( | color | ) |
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. |
| def fsdk.Widget.SetMKDownCaption | ( | caption | ) |
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. |
| def fsdk.Widget.SetMKDownIconBitmap | ( | bitmap | ) |
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. |
| def fsdk.Widget.SetMKDownIconImage | ( | image, | |
| 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.
| [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 fsdk.ImageE_Unknown . |
| [in] | frame_index | Frame index. Valid range: from 0 to (count-1). count is returned by function fsdk.Image.GetFrameCount . |
| def fsdk.Widget.SetMKIconCaptionRelation | ( | relation | ) |
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 fsdk.AnnotE_MKRelationNoIcon and this should be one of these values. |
| def fsdk.Widget.SetMKIconFit | ( | icon_fit | ) |
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 fsdk.E_ErrParam . Please refer to class IconFit to check the valid value range for each member. |
| def fsdk.Widget.SetMKNormalCaption | ( | caption | ) |
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. |
| def fsdk.Widget.SetMKNormalIconBitmap | ( | bitmap | ) |
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. |
| def fsdk.Widget.SetMKNormalIconImage | ( | image, | |
| 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.
| [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 fsdk.ImageE_Unknown . |
| [in] | frame_index | Frame index. Valid range: from 0 to (count-1). count is returned by function fsdk.Image.GetFrameCount . |
| def fsdk.Widget.SetMKRolloverCaption | ( | caption | ) |
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. |
| def fsdk.Widget.SetMKRolloverIconBitmap | ( | bitmap | ) |
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. |
| def fsdk.Widget.SetMKRolloverIconImage | ( | image, | |
| 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.
| [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 fsdk.ImageE_Unknown . |
| [in] | frame_index | Frame index. Valid range: from 0 to (count-1). count is returned by function fsdk.Image.GetFrameCount . |
| def fsdk.Widget.SetMKRotation | ( | rotation | ) |
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 fsdk.E_Rotation0 and this should be one of these values except fsdk.E_RotationUnknown . Specially, rotation value here represents in counterclockwise. |