Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.addon.xfa.XFAWidget Class Reference
Inheritance diagram for foxit.addon.xfa.XFAWidget:

## Public Types
enum | HitTestArea { HitTestArea.e_HitTestAreaUnknown = 0, HitTestArea.e_HitTestAreaClient = 1, HitTestArea.e_HitTestAreaTitleBar = 2, HitTestArea.e_HitTestAreaHyperLink = 3 }
| Enumeration for hit test area of XFA widget. More...
enum | PresenceProperty { PresenceProperty.e_PresenceUnknown = 0, PresenceProperty.e_PresenceVisible = 1, PresenceProperty.e_PresenceHidden = 2, PresenceProperty.e_PresenceInactive = 3, PresenceProperty.e_PresenceInvisible = 4 }
| Enumeration for presence attribute of XFA widget. More...
enum | WidgetEdgePosition { WidgetEdgePosition.e_WidgetEdgePositionTop = 0, WidgetEdgePosition.e_WidgetEdgePositionRight = 1, WidgetEdgePosition.e_WidgetEdgePositionBottom = 2, WidgetEdgePosition.e_WidgetEdgePositionLeft = 3 }
| Enumeration for the positon of XFA widget edge position. More...
enum | WidgetHAlignType { WidgetHAlignType.e_WidgethAlignTypeCenter = 128, WidgetHAlignType.e_WidgethAlignTypeJustify = 156, WidgetHAlignType.e_WidgethAlignTypeJustifyAll = 61, WidgetHAlignType.e_WidgethAlignTypeLeft = 252, WidgetHAlignType.e_WidgethAlignTypeRadix = 231, WidgetHAlignType.e_WidgethAlignTypeRight = 54 }
| Enumeration for the type of text horizontal alignment of XFA widget. More...
enum | WidgetNameType { WidgetNameType.e_WidgetNameTypeField = 0, WidgetNameType.e_WidgetNameTypeCaption = 1, WidgetNameType.e_WidgetNameTypeFullName = 2 }
| Enumeration for the type of XFA widget name. More...
enum | WidgetType { WidgetType.e_WidgetTypeBarcode = 0, WidgetType.e_WidgetTypePushButton = 1, WidgetType.e_WidgetTypeCheckButton = 2, WidgetType.e_WidgetTypeArc = 3, WidgetType.e_WidgetTypeDateTimeEdit = 4, WidgetType.e_WidgetTypeNumericEdit = 5, WidgetType.e_WidgetTypeSignature = 6, WidgetType.e_WidgetTypeChoiceList = 7, WidgetType.e_WidgetTypeImageEdit = 8, WidgetType.e_WidgetTypeLine = 9, WidgetType.e_WidgetTypePasswordEdit = 10, WidgetType.e_WidgetTypeRadioButton = 11, WidgetType.e_WidgetTypeRectangle = 12, WidgetType.e_WidgetTypeTextEdit = 13, WidgetType.e_WidgetTypeUnknown = 14, WidgetType.e_WidgetTypeExclGroup = 15, WidgetType.e_WidgetTypeImage = 16 }
| Enumeration for the type of XFA widget. More...
enum | WidgetVAlignType { WidgetVAlignType.e_WidgetvAlignTypeTop = 33, WidgetVAlignType.e_WidgetvAlignTypeBottom = 85, WidgetVAlignType.e_WidgetvAlignTypeMiddle = 161 }
| Enumeration for the type of text vertical alignment of XFA widget. More...

## Public Member Functions
| XFAWidget (XFAWidget other)
| Constructor, with another XFA widget object. More...
Bitmap | GetBitmap ()
| Get the bitmap of current XFA widget. More...
string | GetDefaultValue ()
| Get the default value string. More...
XFAWidget.WidgetHAlignType | GetHAlign ()
| Get text horizontal alignment. More...
int | GetIndex ()
| Get the index of XFA Widget in related XFA page. More...
string | GetJavaScript ()
| Get the JavaScript of validation for current XFA widget. More...
string | GetName (XFAWidget.WidgetNameType type)
| Get Widget name. More...
WidgetChoiceOptionArray | GetOptions ()
| Get options of a choice list or an Exclusion Group (for radio button only). More...
XFAWidget.PresenceProperty | GetPresence ()
| Get the presence property of the XFA widget. More...
RectF | GetRect ()
| Get rectangle of XFA widget. More...
Signature | GetSignature ()
| Get the signature object from current XFA widget. More...
string | GetToolTip ()
| Get tooltip string. More...
XFAWidget.WidgetType | GetType ()
| Get type of XFA widget. More...
XFAWidget.WidgetVAlignType | GetVAlign ()
| Get text vertical alignment. More...
string | GetValue ()
| Get the value string. More...
XFAPage | GetXFAPage ()
| Get the related XFA page, to which current XFA widget belongs. More...
string | GetXMLContent ()
| Get the xml content of current XFA widget. More...
bool | HasEdge (XFAWidget.WidgetEdgePosition edge_pos)
| Check if the edge for specified position exists. More...
bool | IsAllowRichText ()
| Check whether the widget allows rich text formatting. More...
bool | IsChecked ()
| Check if current XFA widget is checked. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...
bool | IsListBox ()
| Check whether the widget is listbox or not. More...
bool | IsReadOnly ()
| Check whether the widget is read only. More...
bool | IsRequired ()
| Check whether the widget requires a value at the time it is exported by a submit-form action. More...
bool | IsSupportMultiline ()
| Check whether the widget supports multiple lines. More...
bool | IsSupportMultiSelect ()
| Check whether the widget supports multiple selections. More...
bool | OnChar (int input_char, int flags)
| Call this function when a character code is being input. More...
XFAWidget.HitTestArea | OnHitTest (PointF point)
| Call this function to do hit test for a specified point. More...
bool | OnKeyDown (int key_code, int flags)
| Call this function when key on the keyboard is down. More...
bool | OnKeyUp (int key_code, int flags)
| Call this function when key on the keyboard is up. More...
bool | OnLButtonDoubleClick (PointF point, int flags)
| Call this function when left mouse button is double-clicked . More...
bool | OnLButtonDown (PointF point, int flags)
| Call this function when left mouse button is down. More...
bool | OnLButtonUp (PointF point, int flags)
| Call this function when left mouse button is up. More...
bool | OnMouseEnter ()
| Call this function when mouse enters current XFA widget. More...
bool | OnMouseExit ()
| Call this function when mouse exits. More...
bool | OnMouseMove (PointF point, int flags)
| Call this function when mouse moves. More...
bool | OnRButtonDown (PointF point, int flags)
| Call this function when right mouse is down. More...
bool | OnRButtonUp (PointF point, int flags)
| Call this function when right button is up. More...
void | ResetData ()
| Reset XFA Widget Data. More...
void | SetCheckState (bool is_checked)
| Set the checked state of the current XFA widget. More...
void | SetDefaultValue (string value)
| Set the default value string. More...
void | SetImage (Image image)
| Set the image for current XFA widget. More...
bool | SetOptions (WidgetChoiceOptionArray option_array)
| Set options of a choice list or an Exclusion Group (for radio button only). More...
void | SetValue (string value)
| Set the value string. More...
bool | ValidateValue (string value, string format)
| Validate whether the value conforms to the format of current XFA widget. More...

## Detailed Description

Class XFAWidget represents the XFA widget which is retrieved from XFA page object.
To access the menu of XFA widget, please construct a foxit.addon.xfa.WidgetMenu object with XFAWidget object.

See also
  WidgetMenu

## Member Enumeration Documentation

## ◆ HitTestArea

enum foxit.addon.xfa.XFAWidget.HitTestArea
| strong

Enumeration for hit test area of XFA widget.

Values of this enumeration should be used alone.

Enumerator
e_HitTestAreaUnknown | Hit test area: Unknown.
e_HitTestAreaClient | Hit test area: Client.
e_HitTestAreaTitleBar | Hit test area: Title Bar.
e_HitTestAreaHyperLink | Hit test area: HyperLink.

## ◆ PresenceProperty

enum foxit.addon.xfa.XFAWidget.PresenceProperty
| strong

Enumeration for presence attribute of XFA widget.

Values of this enumeration should be used alone.
The presence property controls the participation of the associated object in different phases of processing.

Enumerator
e_PresenceUnknown | Presence property: Unknown.
e_PresenceVisible | Presence property: Visible. Participate in interaction, layout, and rendering.
e_PresenceHidden | Presence property: Hidden. Participate in interaction but not layout or rendering.
e_PresenceInactive | Presence property: Inactive. Do not participate in interaction, layout, or rendering.
e_PresenceInvisible | Presence property: Invisible. Participate in interaction and layout but not rendering.

## ◆ WidgetEdgePosition

enum foxit.addon.xfa.XFAWidget.WidgetEdgePosition
| strong

Enumeration for the positon of XFA widget edge position.

Values of this enumeration should be used alone.

Enumerator
e_WidgetEdgePositionTop | Edge position: top.
e_WidgetEdgePositionRight | Edge position: right.
e_WidgetEdgePositionBottom | Edge position: bottom.
e_WidgetEdgePositionLeft | Edge position: left.

## ◆ WidgetHAlignType

enum foxit.addon.xfa.XFAWidget.WidgetHAlignType
| strong

Enumeration for the type of text horizontal alignment of XFA widget.

Values of this enumeration should be used alone.

Enumerator
e_WidgethAlignTypeCenter | Center the text horizontally within the available region.
e_WidgethAlignTypeJustify | Left-align the last line and spread-justify the rest.
e_WidgethAlignTypeJustifyAll | Spread-justify all lines to fill the available region.
e_WidgethAlignTypeLeft | Align the text to the left edge of the available region.
e_WidgethAlignTypeRadix | Align the radix indicator.
e_WidgethAlignTypeRight | Align the text to the right edge of the available region.

## ◆ WidgetNameType

enum foxit.addon.xfa.XFAWidget.WidgetNameType
| strong

Enumeration for the type of XFA widget name.

Values of this enumeration should be used alone.

Enumerator
e_WidgetNameTypeField | Name type: field name. Name in this type will be retrieved from XFA widget's name entry and this may an empty string.
e_WidgetNameTypeCaption | Name type: caption name. Name in this type will be retrieved from caption entry.
e_WidgetNameTypeFullName | Name type: full name.

## ◆ WidgetType

enum foxit.addon.xfa.XFAWidget.WidgetType
| strong

Enumeration for the type of XFA widget.

Values of this enumeration should be used alone.

Enumerator
e_WidgetTypeBarcode | XFA widget type: barcode.
e_WidgetTypePushButton | XFA widget type: push button.
e_WidgetTypeCheckButton | XFA widget type: check button.
e_WidgetTypeArc | XFA widget type: arc.
e_WidgetTypeDateTimeEdit | XFA widget type: date time edit.
e_WidgetTypeNumericEdit | XFA widget type: numeric edit.
e_WidgetTypeSignature | XFA widget type: signature.
e_WidgetTypeChoiceList | XFA widget type: choice list.
e_WidgetTypeImageEdit | XFA widget type: image edit.
e_WidgetTypeLine | XFA widget type: line.
e_WidgetTypePasswordEdit | XFA widget type: password edit.
e_WidgetTypeRadioButton | XFA widget type: radio button.
e_WidgetTypeRectangle | XFA widget type: rectangle.
e_WidgetTypeTextEdit | XFA widget type: text edit.
e_WidgetTypeUnknown | XFA widget type: unknown.
e_WidgetTypeExclGroup | XFA widget type: Exclusion Group for radio button only.
e_WidgetTypeImage | XFA widget type: image.

## ◆ WidgetVAlignType

enum foxit.addon.xfa.XFAWidget.WidgetVAlignType
| strong

Enumeration for the type of text vertical alignment of XFA widget.

Values of this enumeration should be used alone.

Enumerator
e_WidgetvAlignTypeTop | Align the text to the top of the available region.
e_WidgetvAlignTypeBottom | Align the text to the bottom of the available region.
e_WidgetvAlignTypeMiddle | Align the text so that it is centered between the top and bottom of the available region.

## Constructor & Destructor Documentation

## ◆ XFAWidget()

foxit.addon.xfa.XFAWidget.XFAWidget | ( | XFAWidget | other | ) |
| inline

Constructor, with another XFA widget object.

Parameters

  [in] | other | Another XFA widget object.

## Member Function Documentation

## ◆ GetBitmap()

Bitmap foxit.addon.xfa.XFAWidget.GetBitmap | ( |  | ) |
| inline

Get the bitmap of current XFA widget.

Applicable only when the type of current XFA widget is foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeImageEdit or foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeImage . For types that are not applicable, this function will throw exception foxit.common.ErrorCode.e_ErrUnsupported .

Returns
  The bitmap of current XFA widget.

## ◆ GetDefaultValue()

string foxit.addon.xfa.XFAWidget.GetDefaultValue | ( |  | ) |
| inline

Get the default value string.

Returns
  The default value string.

## ◆ GetHAlign()

XFAWidget.WidgetHAlignType foxit.addon.xfa.XFAWidget.GetHAlign | ( |  | ) |
| inline

Get text horizontal alignment.

Returns
  Text horizontal alignment. Please refer to values starting from foxit.addon.xfa.XFAWidget.WidgetHAlignType.e_WidgethAlignTypeLeft and this would be one of these values.

## ◆ GetIndex()

int foxit.addon.xfa.XFAWidget.GetIndex | ( |  | ) |
| inline

Get the index of XFA Widget in related XFA page.

Returns
  The index of XFA Widget in related XFA page.

## ◆ GetJavaScript()

string foxit.addon.xfa.XFAWidget.GetJavaScript | ( |  | ) |
| inline

Get the JavaScript of validation for current XFA widget.

Returns
  The JavaScript of validation for current XFA widget.

## ◆ GetName()

string foxit.addon.xfa.XFAWidget.GetName | ( | XFAWidget.WidgetNameType | type | ) |
| inline

Get Widget name.

Parameters

  [in] | type | Name type. Please refer to values starting from foxit.addon.xfa.XFAWidget.WidgetNameType.e_WidgetNameTypeField and this should be one of these values.

Returns
  Widget name string.

## ◆ GetOptions()

WidgetChoiceOptionArray foxit.addon.xfa.XFAWidget.GetOptions | ( |  | ) |
| inline

Get options of a choice list or an Exclusion Group (for radio button only).

Applicable for choice list and Exclusion Group (for radio button only). For types that are not applicable, this function will return an empty array.

Returns
  A choice option array.

## ◆ GetPresence()

XFAWidget.PresenceProperty foxit.addon.xfa.XFAWidget.GetPresence | ( |  | ) |
| inline

Get the presence property of the XFA widget.

The presence property controls the participation of the associated object in different phases of processing.

Returns
  The presence property of the XFA widget.

## ◆ GetRect()

RectF foxit.addon.xfa.XFAWidget.GetRect | ( |  | ) |
| inline

Get rectangle of XFA widget.

Widget rectangle is defined in XFA coordinate. XFA coordinate is defined as original point in left top, x-axis pointing to right and y-axis pointing down.

Returns
  The rectangle of XFA widget.

## ◆ GetSignature()

Signature foxit.addon.xfa.XFAWidget.GetSignature | ( |  | ) |
| inline

Get the signature object from current XFA widget.

Applicable only when current XFA widget represents a signature. For types that are not applicable, this function will throw exception foxit.common.ErrorCode.e_ErrUnsupported .

Returns
  A signature object.

## ◆ GetToolTip()

string foxit.addon.xfa.XFAWidget.GetToolTip | ( |  | ) |
| inline

Get tooltip string.

Returns
  Tooltip string.

## ◆ GetType()

XFAWidget.WidgetType foxit.addon.xfa.XFAWidget.GetType | ( |  | ) |
| inline

Get type of XFA widget.

Returns
  The XFA widget type. Please refer to values starting from foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeBarcode and this would be one of these values.

## ◆ GetVAlign()

XFAWidget.WidgetVAlignType foxit.addon.xfa.XFAWidget.GetVAlign | ( |  | ) |
| inline

Get text vertical alignment.

Returns
  Text vertical alignment. Please refer to values starting from foxit.addon.xfa.XFAWidget.WidgetVAlignType.e_WidgetvAlignTypeTop and this would be one of these values.

## ◆ GetValue()

string foxit.addon.xfa.XFAWidget.GetValue | ( |  | ) |
| inline

Get the value string.

Returns
  The value string.

## ◆ GetXFAPage()

XFAPage foxit.addon.xfa.XFAWidget.GetXFAPage | ( |  | ) |
| inline

Get the related XFA page, to which current XFA widget belongs.

Returns
  An XFA page object.

## ◆ GetXMLContent()

string foxit.addon.xfa.XFAWidget.GetXMLContent | ( |  | ) |
| inline

Get the xml content of current XFA widget.

Returns
  The xml content of current XFA widget.

## ◆ HasEdge()

bool foxit.addon.xfa.XFAWidget.HasEdge | ( | XFAWidget.WidgetEdgePosition | edge_pos | ) |
| inline

Check if the edge for specified position exists.

Parameters

  [in] | edge_pos | Edge position to specify which edge will be checked. Please refer to values starting from foxit.addon.xfa.XFAWidget.WidgetEdgePosition.e_WidgetEdgePositionTop and this should be one of these values.

Returns
  true means that the edge for specified position exists, while false means that no such edge exist.

## ◆ IsAllowRichText()

bool foxit.addon.xfa.XFAWidget.IsAllowRichText | ( |  | ) |
| inline

Check whether the widget allows rich text formatting.

Only text edit widget which type is foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeTextEdit supports rich text.

Returns
  true means the widget allows rich text formatting, while false means not.

## ◆ IsChecked()

bool foxit.addon.xfa.XFAWidget.IsChecked | ( |  | ) |
| inline

Check if current XFA widget is checked.

Applicable for check box or radio button as related XFA widget. For types that are not applicable, this function will return false.

Returns
  true means checked, while false means unchecked or failure.

## ◆ IsEmpty()

bool foxit.addon.xfa.XFAWidget.IsEmpty | ( |  | ) |
| inline

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  true means current object is empty, while false means not.

## ◆ IsListBox()

bool foxit.addon.xfa.XFAWidget.IsListBox | ( |  | ) |
| inline

Check whether the widget is listbox or not.

Returns
  true means the widget is listbox, while false means not.

## ◆ IsReadOnly()

bool foxit.addon.xfa.XFAWidget.IsReadOnly | ( |  | ) |
| inline

Check whether the widget is read only.

Returns
  true means the value of the field can not be changed, while false means it can be changed.

## ◆ IsRequired()

bool foxit.addon.xfa.XFAWidget.IsRequired | ( |  | ) |
| inline

Check whether the widget requires a value at the time it is exported by a submit-form action.

Returns
  true means the field must have a value at the time it is exported by a submit-form action, while false means not.

## ◆ IsSupportMultiline()

bool foxit.addon.xfa.XFAWidget.IsSupportMultiline | ( |  | ) |
| inline

Check whether the widget supports multiple lines.

Only text edit widget which type is foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeTextEdit supports multiple lines.

Returns
  true means the widget supports multiple lines, while false means not.

## ◆ IsSupportMultiSelect()

bool foxit.addon.xfa.XFAWidget.IsSupportMultiSelect | ( |  | ) |
| inline

Check whether the widget supports multiple selections.

Only the list box widget supports multiline selections, whose type is foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeChoiceList and the return value of function xfa.XFAWidget.IsListBox is true.

Returns
  true means the widget support multiple selections, while false means not.

## ◆ OnChar()

bool foxit.addon.xfa.XFAWidget.OnChar | ( | int | input_char,
|  | int | flags
| ) |  |
| inline

Call this function when a character code is being input.

Parameters

  [in] | input_char | A character code, in UTF16-LE encoding.
  [in] | flags | Event flags. Please refer to values starting from foxit.pdf.interform.Filler.EventFlags.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnHitTest()

XFAWidget.HitTestArea foxit.addon.xfa.XFAWidget.OnHitTest | ( | PointF | point | ) |
| inline

Call this function to do hit test for a specified point.

Parameters

  [in] | point | A point to be tested.

Returns
  The hit test area. Please refer to values starting from foxit.addon.xfa.XFAWidget.HitTestArea.e_HitTestAreaUnknown and this would be one of these values.

## ◆ OnKeyDown()

bool foxit.addon.xfa.XFAWidget.OnKeyDown | ( | int | key_code,
|  | int | flags
| ) |  |
| inline

Call this function when key on the keyboard is down.

Parameters

  [in] | key_code | The key code. Please refer to values starting from foxit.pdf.interform.Filler.VirtualKeyCode.e_VkeyUnknown and this should be one of these values.
  [in] | flags | Event flags. Please refer to values starting from foxit.pdf.interform.Filler.EventFlags.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnKeyUp()

bool foxit.addon.xfa.XFAWidget.OnKeyUp | ( | int | key_code,
|  | int | flags
| ) |  |
| inline

Call this function when key on the keyboard is up.

Parameters

  [in] | key_code | The key code. Please refer to values starting from foxit.pdf.interform.Filler.VirtualKeyCode.e_VkeyUnknown and this should be one of these values.
  [in] | flags | Event flags. Please refer to values starting from foxit.pdf.interform.Filler.EventFlags.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnLButtonDoubleClick()

bool foxit.addon.xfa.XFAWidget.OnLButtonDoubleClick | ( | PointF | point,
|  | int | flags
| ) |  |
| inline

Call this function when left mouse button is double-clicked .

Parameters

  [in] | point | A point where left mouse button is double-clicked in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from foxit.pdf.interform.Filler.EventFlags.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnLButtonDown()

bool foxit.addon.xfa.XFAWidget.OnLButtonDown | ( | PointF | point,
|  | int | flags
| ) |  |
| inline

Call this function when left mouse button is down.

Parameters

  [in] | point | A point where left mouse button is down in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from foxit.pdf.interform.Filler.EventFlags.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnLButtonUp()

bool foxit.addon.xfa.XFAWidget.OnLButtonUp | ( | PointF | point,
|  | int | flags
| ) |  |
| inline

Call this function when left mouse button is up.

Parameters

  [in] | point | A point where left mouse button is up in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from foxit.pdf.interform.Filler.EventFlags.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnMouseEnter()

bool foxit.addon.xfa.XFAWidget.OnMouseEnter | ( |  | ) |
| inline

Call this function when mouse enters current XFA widget.

Returns
  true means success, while false means failure.

## ◆ OnMouseExit()

bool foxit.addon.xfa.XFAWidget.OnMouseExit | ( |  | ) |
| inline

Call this function when mouse exits.

Returns
  true means success, while false means failure.

## ◆ OnMouseMove()

bool foxit.addon.xfa.XFAWidget.OnMouseMove | ( | PointF | point,
|  | int | flags
| ) |  |
| inline

Call this function when mouse moves.

Parameters

  [in] | point | A point where left mouse button moves in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from foxit.pdf.interform.Filler.EventFlags.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnRButtonDown()

bool foxit.addon.xfa.XFAWidget.OnRButtonDown | ( | PointF | point,
|  | int | flags
| ) |  |
| inline

Call this function when right mouse is down.

Parameters

  [in] | point | A point where right mouse button is down in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from foxit.pdf.interform.Filler.EventFlags.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnRButtonUp()

bool foxit.addon.xfa.XFAWidget.OnRButtonUp | ( | PointF | point,
|  | int | flags
| ) |  |
| inline

Call this function when right button is up.

Parameters

  [in] | point | A point where right mouse button is up in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from foxit.pdf.interform.Filler.EventFlags.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ ResetData()

void foxit.addon.xfa.XFAWidget.ResetData | ( |  | ) |
| inline

Reset XFA Widget Data.

Returns
  None.

## ◆ SetCheckState()

void foxit.addon.xfa.XFAWidget.SetCheckState | ( | bool | is_checked | ) |
| inline

Set the checked state of the current XFA widget.

Applicable for check box or radio button as related XFA widget. For types that are not applicable, this function will throw exception foxit.common.ErrorCode.e_ErrUnsupported .

Parameters

  [in] | is_checked | true means the current XFA widget will be checked, while false means it will not be checked.

Returns
  None.

## ◆ SetDefaultValue()

void foxit.addon.xfa.XFAWidget.SetDefaultValue | ( | string | value | ) |
| inline

Set the default value string.

It is only useful for the XFA widget which type is foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeTextEdit , foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeNumericEdit , foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypePasswordEdit or foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeDateTimeEdit .

Parameters

  [in] | value | A string as default value to be set. It can be an empty string.

Returns
  None.

## ◆ SetImage()

void foxit.addon.xfa.XFAWidget.SetImage | ( | Image | image | ) |
| inline

Set the image for current XFA widget.

Applicable only when the type of current XFA widget is foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeImageEdit . For types that are not applicable, this function will throw exception foxit.common.ErrorCode.e_ErrUnsupported .

Parameters

  [in] | image | An image will be set to current XFA widget. Currently, this function only supports the following image types: foxit.common.Image.Type.e_BMP foxit.common.Image.Type.e_PNG foxit.common.Image.Type.e_JPG foxit.common.Image.Type.e_GIF foxit.common.Image.Type.e_TIF If try to set rest unsupported image types, exception foxit.common.ErrorCode.e_ErrUnsupported will be thrown.

Returns
  None.

## ◆ SetOptions()

bool foxit.addon.xfa.XFAWidget.SetOptions | ( | WidgetChoiceOptionArray | option_array | ) |
| inline

Set options of a choice list or an Exclusion Group (for radio button only).

Applicable for choice list and Exclusion Group (for radio button only). For types that are not applicable, this function will return false.

Parameters

  [in] | option_array | An array of choice options to be set.

Returns
  true means success, while false means failure.

## ◆ SetValue()

void foxit.addon.xfa.XFAWidget.SetValue | ( | string | value | ) |
| inline

Set the value string.

It is only useful for the XFA widget which type is foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeTextEdit , foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeNumericEdit , foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypePasswordEdit or foxit.addon.xfa.XFAWidget.WidgetType.e_WidgetTypeDateTimeEdit .

Parameters

  [in] | value | A string as value to be set. It can be an empty string.

Returns
  None.

## ◆ ValidateValue()

bool foxit.addon.xfa.XFAWidget.ValidateValue | ( | string | value,
|  | string | format
| ) |  |
| inline

Validate whether the value conforms to the format of current XFA widget.

This function can be called before the function XFAWidget.SetValue to check whether the value conforms to the format of current XFA widget.

Parameters

  [in] | value | A string value to be validated.
  [out] | format | A string value that receives the format of current XFA widget. It will be an empty string if current XFA widget has no format.

Returns
  true means the value conforms to the format of current XFA widget, while false means not.