My Project
foxit::addon::xfa::XFAWidget Class Reference
Inheritance diagram for foxit::addon::xfa::XFAWidget:
foxit::Base

Public Types

enum  HitTestArea { e_HitTestAreaUnknown = 0, e_HitTestAreaClient = 1, e_HitTestAreaTitleBar = 2, e_HitTestAreaHyperLink = 3 }
 Enumeration for hit test area of XFA widget. More...
 
enum  PresenceProperty {
  e_PresenceUnknown = 0, e_PresenceVisible = 1, e_PresenceHidden = 2, e_PresenceInactive = 3,
  e_PresenceInvisible = 4
}
 Enumeration for presence attribute of XFA widget. More...
 
enum  WidgetType {
  e_WidgetTypeBarcode = 0, e_WidgetTypePushButton = 1, e_WidgetTypeCheckButton = 2, e_WidgetTypeArc = 3,
  e_WidgetTypeDateTimeEdit = 4, e_WidgetTypeNumericEdit = 5, e_WidgetTypeSignature = 6, e_WidgetTypeChoiceList = 7,
  e_WidgetTypeImageEdit = 8, e_WidgetTypeLine = 9, e_WidgetTypePasswordEdit = 10, e_WidgetTypeRadioButton = 11,
  e_WidgetTypeRectangle = 12, e_WidgetTypeTextEdit = 13, e_WidgetTypeUnknown = 14
}
 Enumeration for the type of xfa widget. More...
 

Public Member Functions

 XFAWidget (const XFAWidget &other)
 Constructor, with another XFA widget object. More...
 
 ~XFAWidget ()
 Destructor.
 
int GetIndex () const
 Get the index of XFA Widget in related XFA page. More...
 
PresenceProperty GetPresence ()
 Get the presence property of the XFA widget. More...
 
RectF GetRect ()
 Get rectangle of XFA widget. More...
 
WidgetType GetType ()
 Get type of XFA widget. More...
 
WString GetValue ()
 Get the value string. More...
 
XFAPage GetXFAPage ()
 Get the related XFA page, to which current XFA widget belongs. More...
 
bool IsEmpty () const
 Check whether current object is empty or not. More...
 
bool OnChar (int input_char, uint32 flags)
 Call this function when a character code is being input. More...
 
HitTestArea OnHitTest (const PointF &point)
 Call this function to do hit test for a specified point. More...
 
bool OnKeyDown (uint32 key_code, uint32 flags)
 Call this function when key on the keyboard is down. More...
 
bool OnKeyUp (uint32 key_code, uint32 flags)
 Call this function when key on the keyboard is up. More...
 
bool OnLButtonDoubleClick (const PointF &point, uint32 flags)
 Call this function when left mouse button is double-clicked . More...
 
bool OnLButtonDown (const PointF &point, uint32 flags)
 Call this function when left mouse button is down. More...
 
bool OnLButtonUp (const PointF &point, uint32 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 (const PointF &point, uint32 flags)
 Call this function when mouse moves. More...
 
bool OnRButtonDown (const PointF &point, uint32 flags)
 Call this function when right mouse is down. More...
 
bool OnRButtonUp (const PointF &point, uint32 flags)
 Call this function when right button is up. More...
 
bool operator != (const XFAWidget &other) const
 Not equal operator. More...
 
XFAWidgetoperator= (const XFAWidget &other)
 Assign operator. More...
 
bool operator== (const XFAWidget &other) const
 Equal operator. More...
 
void ResetData ()
 Reset XFA Widget Data. More...
 
void SetValue (const wchar_t *value)
 Set the value string. More...
 
- Public Member Functions inherited from foxit::Base
FS_HANDLE Handle () const
 Get the handle of current object. 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 xfa::WidgetMenu object with XFAWidget object.

See also
WidgetMenu

Member Enumeration Documentation

◆ HitTestArea

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

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.

◆ WidgetType

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.

Constructor & Destructor Documentation

◆ XFAWidget()

foxit::addon::xfa::XFAWidget::XFAWidget ( const XFAWidget other)

Constructor, with another XFA widget object.

Parameters
[in]otherAnother XFA widget object.

Member Function Documentation

◆ GetIndex()

int foxit::addon::xfa::XFAWidget::GetIndex ( ) const

Get the index of XFA Widget in related XFA page.

Returns
The index of XFA Widget in related XFA page.

◆ GetPresence()

PresenceProperty foxit::addon::xfa::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()

RectF foxit::addon::xfa::XFAWidget::GetRect ( )

Get rectangle of XFA widget.

Returns
The rectangle of XFA widget.

◆ GetType()

WidgetType foxit::addon::xfa::XFAWidget::GetType ( )

Get type of XFA widget.

Returns
The hit test area. Please refer to values starting from XFAWidget::e_WidgetTypeBarcode and this would be one of these values.

◆ GetValue()

WString foxit::addon::xfa::XFAWidget::GetValue ( )

Get the value string.

Returns
The value string.

◆ GetXFAPage()

XFAPage foxit::addon::xfa::XFAWidget::GetXFAPage ( )

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

Returns
An XFA page object.

◆ IsEmpty()

bool foxit::addon::xfa::XFAWidget::IsEmpty ( ) const

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

bool foxit::addon::xfa::XFAWidget::OnChar ( int  input_char,
uint32  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 pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnHitTest()

HitTestArea foxit::addon::xfa::XFAWidget::OnHitTest ( const PointF 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 XFAWidget::e_HitTestAreaUnknown and this would be one of these values.

◆ OnKeyDown()

bool foxit::addon::xfa::XFAWidget::OnKeyDown ( uint32  key_code,
uint32  flags 
)

Call this function when key on the keyboard is down.

Parameters
[in]key_codeThe key code. Please refer to values starting from pdf::interform::Filler::e_VkeyUnknown and this should be one of these values.
[in]flagsEvent flags. Please refer to values starting from pdf::interform::Filler::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 ( uint32  key_code,
uint32  flags 
)

Call this function when key on the keyboard is up.

Parameters
[in]key_codeThe key code. Please refer to values starting from pdf::interform::Filler::e_VkeyUnknown and this should be one of these values.
[in]flagsEvent flags. Please refer to values starting from pdf::interform::Filler::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 ( const PointF point,
uint32  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 pdf::interform::Filler::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 ( const PointF point,
uint32  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 pdf::interform::Filler::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 ( const PointF point,
uint32  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 pdf::interform::Filler::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 ( )

Call this function when mouse enters current XFA widget.

Returns
true means success, while false means failure.

◆ OnMouseExit()

bool foxit::addon::xfa::XFAWidget::OnMouseExit ( )

Call this function when mouse exits.

Returns
true means success, while false means failure.

◆ OnMouseMove()

bool foxit::addon::xfa::XFAWidget::OnMouseMove ( const PointF point,
uint32  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 pdf::interform::Filler::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 ( const PointF point,
uint32  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 pdf::interform::Filler::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 ( const PointF point,
uint32  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 pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ operator !=()

bool foxit::addon::xfa::XFAWidget::operator != ( const XFAWidget other) const

Not equal operator.

Parameters
[in]otherAnother XFA widget object. This function will check if current object is not equal to this one.
Returns
true means not equal, while false means equal.

◆ operator=()

XFAWidget& foxit::addon::xfa::XFAWidget::operator= ( const XFAWidget other)

Assign operator.

Parameters
[in]otherAnother XFA widget object, whose value would be assigned to current object.
Returns
Reference to current object itself.

◆ operator==()

bool foxit::addon::xfa::XFAWidget::operator== ( const XFAWidget other) const

Equal operator.

Parameters
[in]otherAnother XFA widget object. This function will check if current object is equal to this one.
Returns
true means equal, while false means not equal.

◆ ResetData()

void foxit::addon::xfa::XFAWidget::ResetData ( )

Reset XFA Widget Data.

Returns
None.

◆ SetValue()

void foxit::addon::xfa::XFAWidget::SetValue ( const wchar_t *  value)

Set the value string.

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

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.