Foxit PDF SDK
FoxitPDFSDKPython3.XFAWidget Class Reference
Inheritance diagram for FoxitPDFSDKPython3.XFAWidget:
FoxitPDFSDKPython3.Base

Public Member Functions

def XFAWidget (other)
 Constructor, with another XFA widget object. More...
 
def GetBitmap ()
 Get the bitmap of current XFA widget. More...
 
def GetHAlign ()
 Get text horizontal alignment. More...
 
def GetIndex ()
 Get the index of XFA Widget in related XFA page. More...
 
def GetName (type)
 Get Widget name. More...
 
def GetOptions ()
 Get options of a choice list or an Exclusion Group (for radion button only). More...
 
def GetPresence ()
 Get the presence property of the XFA widget. More...
 
def GetRect ()
 Get rectangle of XFA widget. More...
 
def GetSignature ()
 Get the signature object from current XFA widget. More...
 
def GetToolTip ()
 Get tooltip string. More...
 
def GetType ()
 Get type of XFA widget. More...
 
def GetVAlign ()
 Get text vertical alignment. More...
 
def GetValue ()
 Get the value string. More...
 
def GetXFAPage ()
 Get the related XFA page, to which current XFA widget belongs. More...
 
def HasEdge (edge_pos)
 Check if the edge for specified position exists. More...
 
def IsChecked ()
 Check if current XFA widget is checked when it is a check box or a radio button. More...
 
def IsEmpty ()
 Check whether current object is empty or not. More...
 
def OnChar (input_char, flags)
 Call this function when a character code is being input. More...
 
def OnHitTest (point)
 Call this function to do hit test for a specified point. More...
 
def OnKeyDown (key_code, flags)
 Call this function when key on the keyboard is down. More...
 
def OnKeyUp (key_code, flags)
 Call this function when key on the keyboard is up. More...
 
def OnLButtonDoubleClick (point, flags)
 Call this function when left mouse button is double-clicked . More...
 
def OnLButtonDown (point, flags)
 Call this function when left mouse button is down. More...
 
def OnLButtonUp (point, flags)
 Call this function when left mouse button is up. More...
 
def OnMouseEnter ()
 Call this function when mouse enters current XFA widget. More...
 
def OnMouseExit ()
 Call this function when mouse exits. More...
 
def OnMouseMove (point, flags)
 Call this function when mouse moves. More...
 
def OnRButtonDown (point, flags)
 Call this function when right mouse is down. More...
 
def OnRButtonUp (point, flags)
 Call this function when right button is up. More...
 
def ResetData ()
 Reset XFA Widget Data. More...
 
def SetImage (image)
 Set the image for current XFA widget. More...
 
def SetValue (value)
 Set the value string. More...
 

Static Public Attributes

 e_HitTestAreaClient = _fsdk.XFAWidget_e_HitTestAreaClient
 Hit test area: Client.
 
 e_HitTestAreaHyperLink = _fsdk.XFAWidget_e_HitTestAreaHyperLink
 Hit test area: HyperLink.
 
 e_HitTestAreaTitleBar = _fsdk.XFAWidget_e_HitTestAreaTitleBar
 Hit test area: Title Bar.
 
 e_HitTestAreaUnknown = _fsdk.XFAWidget_e_HitTestAreaUnknown
 Hit test area: Unknown.
 
 e_PresenceHidden = _fsdk.XFAWidget_e_PresenceHidden
 Presence property: Hidden. Participate in interaction but not layout or rendering.
 
 e_PresenceInactive = _fsdk.XFAWidget_e_PresenceInactive
 Presence property: Inactive. Do not participate in interaction, layout, or rendering.
 
 e_PresenceInvisible = _fsdk.XFAWidget_e_PresenceInvisible
 Presence property: Invisible. Participate in interaction and layout but not rendering.
 
 e_PresenceUnknown = _fsdk.XFAWidget_e_PresenceUnknown
 Presence property: Unknown.
 
 e_PresenceVisible = _fsdk.XFAWidget_e_PresenceVisible
 Presence property: Visible. Participate in interaction, layout, and rendering.
 
 e_WidgetEdgePositionBottom = _fsdk.XFAWidget_e_WidgetEdgePositionBottom
 Egde position: bottom.
 
 e_WidgetEdgePositionLeft = _fsdk.XFAWidget_e_WidgetEdgePositionLeft
 Egde position: left.
 
 e_WidgetEdgePositionRight = _fsdk.XFAWidget_e_WidgetEdgePositionRight
 Egde position: right.
 
 e_WidgetEdgePositionTop = _fsdk.XFAWidget_e_WidgetEdgePositionTop
 Egde position: top.
 
 e_WidgethAlignTypeCenter = _fsdk.XFAWidget_e_WidgethAlignTypeCenter
 Center the text horizontally within the available region.
 
 e_WidgethAlignTypeJustify = _fsdk.XFAWidget_e_WidgethAlignTypeJustify
 Left-align the last line and spread-justify the rest.
 
 e_WidgethAlignTypeJustifyAll = _fsdk.XFAWidget_e_WidgethAlignTypeJustifyAll
 Spread-justify all lines to fill the available region.
 
 e_WidgethAlignTypeLeft = _fsdk.XFAWidget_e_WidgethAlignTypeLeft
 Align the text to the left edge of the available region.
 
 e_WidgethAlignTypeRadix = _fsdk.XFAWidget_e_WidgethAlignTypeRadix
 Align the radix indicator.
 
 e_WidgethAlignTypeRight = _fsdk.XFAWidget_e_WidgethAlignTypeRight
 Align the text to the right edge of the available region.
 
 e_WidgetNameTypeCaption = _fsdk.XFAWidget_e_WidgetNameTypeCaption
 Name type: caption name. Name in this type will be retrieved from caption entry.
 
 e_WidgetNameTypeField = _fsdk.XFAWidget_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_WidgetNameTypeFullName = _fsdk.XFAWidget_e_WidgetNameTypeFullName
 Name type: full name.
 
 e_WidgetTypeArc = _fsdk.XFAWidget_e_WidgetTypeArc
 XFA widget type: arc.
 
 e_WidgetTypeBarcode = _fsdk.XFAWidget_e_WidgetTypeBarcode
 XFA widget type: barcode.
 
 e_WidgetTypeCheckButton = _fsdk.XFAWidget_e_WidgetTypeCheckButton
 XFA widget type: check button.
 
 e_WidgetTypeChoiceList = _fsdk.XFAWidget_e_WidgetTypeChoiceList
 XFA widget type: choice list.
 
 e_WidgetTypeDateTimeEdit = _fsdk.XFAWidget_e_WidgetTypeDateTimeEdit
 XFA widget type: date time edit.
 
 e_WidgetTypeExclGroup = _fsdk.XFAWidget_e_WidgetTypeExclGroup
 XFA widget type: Exclusion Group for radio button only.
 
 e_WidgetTypeImage = _fsdk.XFAWidget_e_WidgetTypeImage
 XFA widget type: image.
 
 e_WidgetTypeImageEdit = _fsdk.XFAWidget_e_WidgetTypeImageEdit
 XFA widget type: image edit.
 
 e_WidgetTypeLine = _fsdk.XFAWidget_e_WidgetTypeLine
 XFA widget type: line.
 
 e_WidgetTypeNumericEdit = _fsdk.XFAWidget_e_WidgetTypeNumericEdit
 XFA widget type: numeric edit.
 
 e_WidgetTypePasswordEdit = _fsdk.XFAWidget_e_WidgetTypePasswordEdit
 XFA widget type: password edit.
 
 e_WidgetTypePushButton = _fsdk.XFAWidget_e_WidgetTypePushButton
 XFA widget type: push button.
 
 e_WidgetTypeRadioButton = _fsdk.XFAWidget_e_WidgetTypeRadioButton
 XFA widget type: radio button.
 
 e_WidgetTypeRectangle = _fsdk.XFAWidget_e_WidgetTypeRectangle
 XFA widget type: rectangle.
 
 e_WidgetTypeSignature = _fsdk.XFAWidget_e_WidgetTypeSignature
 XFA widget type: signature.
 
 e_WidgetTypeTextEdit = _fsdk.XFAWidget_e_WidgetTypeTextEdit
 XFA widget type: text edit.
 
 e_WidgetTypeUnknown = _fsdk.XFAWidget_e_WidgetTypeUnknown
 XFA widget type: unknown.
 
 e_WidgetvAlignTypeBottom = _fsdk.XFAWidget_e_WidgetvAlignTypeBottom
 Align the text to the bottom of the available region.
 
 e_WidgetvAlignTypeMiddle = _fsdk.XFAWidget_e_WidgetvAlignTypeMiddle
 Align the text so that it is centered between the top and bottom of the available region.
 
 e_WidgetvAlignTypeTop = _fsdk.XFAWidget_e_WidgetvAlignTypeTop
 Align the text to the top of the available region.
 

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 FoxitPDFSDKPython3.WidgetMenu object with XFAWidget object.

See also
WidgetMenu

Constructor & Destructor Documentation

◆ XFAWidget()

def FoxitPDFSDKPython3.XFAWidget.XFAWidget (   other)

Constructor, with another XFA widget object.

Parameters
[in]otherAnother XFA widget object.

Member Function Documentation

◆ GetBitmap()

def FoxitPDFSDKPython3.XFAWidget.GetBitmap ( )

Get the bitmap of current XFA widget.

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

Returns
The bitmap of current XFA widget.

◆ GetHAlign()

def FoxitPDFSDKPython3.XFAWidget.GetHAlign ( )

Get text horizontal alignment.

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

◆ GetIndex()

def FoxitPDFSDKPython3.XFAWidget.GetIndex ( )

Get the index of XFA Widget in related XFA page.

Returns
The index of XFA Widget in related XFA page.

◆ GetName()

def FoxitPDFSDKPython3.XFAWidget.GetName (   type)

Get Widget name.

Parameters
[in]typeName type. Please refer to values starting from FoxitPDFSDKPython3.XFAWidget.e_WidgetNameTypeField and this should be one of these values.
Returns
Widget name string.

◆ GetOptions()

def FoxitPDFSDKPython3.XFAWidget.GetOptions ( )

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

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

Returns
A choice option array.

◆ GetPresence()

def FoxitPDFSDKPython3.XFAWidget.GetPresence ( )

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()

def FoxitPDFSDKPython3.XFAWidget.GetRect ( )

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()

def FoxitPDFSDKPython3.XFAWidget.GetSignature ( )

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 FoxitPDFSDKPython3.e_ErrUnsupported .

Returns
A signature object.

◆ GetToolTip()

def FoxitPDFSDKPython3.XFAWidget.GetToolTip ( )

Get tooltip string.

Returns
Tooltip string.

◆ GetType()

def FoxitPDFSDKPython3.XFAWidget.GetType ( )

Get type of XFA widget.

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

◆ GetVAlign()

def FoxitPDFSDKPython3.XFAWidget.GetVAlign ( )

Get text vertical alignment.

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

◆ GetValue()

def FoxitPDFSDKPython3.XFAWidget.GetValue ( )

Get the value string.

Returns
The value string.

◆ GetXFAPage()

def FoxitPDFSDKPython3.XFAWidget.GetXFAPage ( )

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

Returns
An XFA page object.

◆ HasEdge()

def FoxitPDFSDKPython3.XFAWidget.HasEdge (   edge_pos)

Check if the edge for specified position exists.

Parameters
[in]edge_posEdge position to specify which edge will be checked. Please refer to values starting from FoxitPDFSDKPython3.XFAWidget.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.

◆ IsChecked()

def FoxitPDFSDKPython3.XFAWidget.IsChecked ( )

Check if current XFA widget is checked when it is a check box or a radio button.

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()

def FoxitPDFSDKPython3.XFAWidget.IsEmpty ( )

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.

◆ OnChar()

def FoxitPDFSDKPython3.XFAWidget.OnChar (   input_char,
  flags 
)

Call this function when a character code is being input.

Parameters
[in]input_charA character code, in UTF16-LE encoding.
[in]flagsEvent flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnHitTest()

def FoxitPDFSDKPython3.XFAWidget.OnHitTest (   point)

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

Parameters
[in]pointA point to be tested.
Returns
The hit test area. Please refer to values starting from FoxitPDFSDKPython3.XFAWidget.e_HitTestAreaUnknown and this would be one of these values.

◆ OnKeyDown()

def FoxitPDFSDKPython3.XFAWidget.OnKeyDown (   key_code,
  flags 
)

Call this function when key on the keyboard is down.

Parameters
[in]key_codeThe key code. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_VkeyUnknown and this should be one of these values.
[in]flagsEvent flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnKeyUp()

def FoxitPDFSDKPython3.XFAWidget.OnKeyUp (   key_code,
  flags 
)

Call this function when key on the keyboard is up.

Parameters
[in]key_codeThe key code. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_VkeyUnknown and this should be one of these values.
[in]flagsEvent flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnLButtonDoubleClick()

def FoxitPDFSDKPython3.XFAWidget.OnLButtonDoubleClick (   point,
  flags 
)

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

Parameters
[in]pointA point where left mouse button is double-clicked in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnLButtonDown()

def FoxitPDFSDKPython3.XFAWidget.OnLButtonDown (   point,
  flags 
)

Call this function when left mouse button is down.

Parameters
[in]pointA point where left mouse button is down in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnLButtonUp()

def FoxitPDFSDKPython3.XFAWidget.OnLButtonUp (   point,
  flags 
)

Call this function when left mouse button is up.

Parameters
[in]pointA point where left mouse button is up in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnMouseEnter()

def FoxitPDFSDKPython3.XFAWidget.OnMouseEnter ( )

Call this function when mouse enters current XFA widget.

Returns
true means success, while false means failure.

◆ OnMouseExit()

def FoxitPDFSDKPython3.XFAWidget.OnMouseExit ( )

Call this function when mouse exits.

Returns
true means success, while false means failure.

◆ OnMouseMove()

def FoxitPDFSDKPython3.XFAWidget.OnMouseMove (   point,
  flags 
)

Call this function when mouse moves.

Parameters
[in]pointA point where left mouse button moves in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnRButtonDown()

def FoxitPDFSDKPython3.XFAWidget.OnRButtonDown (   point,
  flags 
)

Call this function when right mouse is down.

Parameters
[in]pointA point where right mouse button is down in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnRButtonUp()

def FoxitPDFSDKPython3.XFAWidget.OnRButtonUp (   point,
  flags 
)

Call this function when right button is up.

Parameters
[in]pointA point where right mouse button is up in XFA page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ ResetData()

def FoxitPDFSDKPython3.XFAWidget.ResetData ( )

Reset XFA Widget Data.

Returns
None.

◆ SetImage()

def FoxitPDFSDKPython3.XFAWidget.SetImage (   image)

Set the image for current XFA widget.

Applicable only when the type of current XFA widget is FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeImageEdit . For types that are not applicable, this function will throw exception FoxitPDFSDKPython3.e_ErrUnsupported .

Parameters
[in]imageAn image will be set to current XFA widget. Currently, this function only supports the following image types: If try to set rest unsupported image types, exception FoxitPDFSDKPython3.e_ErrUnsupported will be thrown.
Returns
None.

◆ SetValue()

def FoxitPDFSDKPython3.XFAWidget.SetValue (   value)

Set the value string.

Parameters
[in]valueA string as value to be set. It can be an empty string.
Returns
None.