Foxit PDF SDK
|
Public Member Functions | |
XFAWidget (const XFAWidget &other) | |
Constructor, with another XFA widget object. More... | |
~XFAWidget () | |
Destructor. | |
foxit::common::Bitmap | GetBitmap () |
Get the bitmap of current XFA widget. More... | |
WString | GetDefaultValue () |
Get the default value string. More... | |
WidgetHAlignType | GetHAlign () |
Get text horizontal alignment. More... | |
int | GetIndex () const |
Get the index of XFA Widget in related XFA page. More... | |
WString | GetJavaScript () |
Get the JavaScript of validation for current XFA widget. More... | |
WString | GetName (WidgetNameType type) |
Get Widget name. More... | |
addon::xfa::WidgetChoiceOptionArray | GetOptions () const |
Get options of a choice list or an Exclusion Group (for radio button only). More... | |
PresenceProperty | GetPresence () |
Get the presence property of the XFA widget. More... | |
RectF | GetRect () |
Get rectangle of XFA widget. More... | |
foxit::pdf::Signature | GetSignature () |
Get the signature object from current XFA widget. More... | |
WString | GetToolTip () |
Get tooltip string. More... | |
WidgetType | GetType () |
Get type of XFA widget. More... | |
WidgetVAlignType | GetVAlign () |
Get text vertical alignment. More... | |
WString | GetValue () |
Get the value string. More... | |
XFAPage | GetXFAPage () |
Get the related XFA page, to which current XFA widget belongs. More... | |
bool | HasEdge (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 () const |
Check if current XFA widget is checked. More... | |
bool | IsEmpty () const |
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, 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... | |
XFAWidget & | operator= (const XFAWidget &other) |
Assign operator. More... | |
bool | operator== (const XFAWidget &other) const |
Equal operator. 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 (const wchar_t *value) |
Set the default value string. More... | |
void | SetImage (const foxit::common::Image &image) |
Set the image for current XFA widget. More... | |
bool | SetOptions (const addon::xfa::WidgetChoiceOptionArray &option_array) |
Set options of a choice list or an Exclusion Group (for radio button only). More... | |
void | SetValue (const wchar_t *value) |
Set the value string. More... | |
bool | ValidateValue (const wchar_t *value, WString &format) |
Validate whether the value conforms to the format of current XFA widget. More... | |
![]() | |
FS_HANDLE | Handle () const |
Get the handle of current object. More... | |
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.
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.
Enumeration for the positon of XFA widget edge position.
Values of this enumeration should be used alone.
Enumerator | |
---|---|
e_WidgetEdgePositionTop | Egde position: top. |
e_WidgetEdgePositionRight | Egde position: right. |
e_WidgetEdgePositionBottom | Egde position: bottom. |
e_WidgetEdgePositionLeft | Egde position: left. |
Enumeration for the type of text horizontal alignment of XFA widget.
Values of this enumeration should be used alone.
Enumeration for the type of XFA widget name.
Values of this enumeration should be used alone.
Enumeration for the type of XFA widget.
Values of this enumeration should be used alone.
Enumeration for the type of text vertical alignment of XFA widget.
Values of this enumeration should be used alone.
foxit::addon::xfa::XFAWidget::XFAWidget | ( | const XFAWidget & | other | ) |
Constructor, with another XFA widget object.
[in] | other | Another XFA widget object. |
foxit::common::Bitmap foxit::addon::xfa::XFAWidget::GetBitmap | ( | ) |
Get the bitmap of current XFA widget.
Applicable only when the type of current XFA widget is XFAWidget::e_WidgetTypeImageEdit or XFAWidget::e_WidgetTypeImage. For types that are not applicable, this function will throw exception foxit::e_ErrUnsupported.
WString foxit::addon::xfa::XFAWidget::GetDefaultValue | ( | ) |
Get the default value string.
WidgetHAlignType foxit::addon::xfa::XFAWidget::GetHAlign | ( | ) |
Get text horizontal alignment.
int foxit::addon::xfa::XFAWidget::GetIndex | ( | ) | const |
Get the index of XFA Widget in related XFA page.
WString foxit::addon::xfa::XFAWidget::GetJavaScript | ( | ) |
Get the JavaScript of validation for current XFA widget.
WString foxit::addon::xfa::XFAWidget::GetName | ( | WidgetNameType | type | ) |
Get Widget name.
[in] | type | Name type. Please refer to values starting from XFAWidget::e_WidgetNameTypeField and this should be one of these values. |
addon::xfa::WidgetChoiceOptionArray foxit::addon::xfa::XFAWidget::GetOptions | ( | ) | const |
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.
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.
RectF foxit::addon::xfa::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.
foxit::pdf::Signature foxit::addon::xfa::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 foxit::e_ErrUnsupported.
WString foxit::addon::xfa::XFAWidget::GetToolTip | ( | ) |
Get tooltip string.
WidgetType foxit::addon::xfa::XFAWidget::GetType | ( | ) |
Get type of XFA widget.
WidgetVAlignType foxit::addon::xfa::XFAWidget::GetVAlign | ( | ) |
Get text vertical alignment.
WString foxit::addon::xfa::XFAWidget::GetValue | ( | ) |
Get the value string.
XFAPage foxit::addon::xfa::XFAWidget::GetXFAPage | ( | ) |
Get the related XFA page, to which current XFA widget belongs.
bool foxit::addon::xfa::XFAWidget::HasEdge | ( | WidgetEdgePosition | edge_pos | ) |
Check if the edge for specified position exists.
[in] | edge_pos | Edge position to specify which edge will be checked. Please refer to values starting from XFAWidget::e_WidgetEdgePositionTop and this should be one of these values. |
bool foxit::addon::xfa::XFAWidget::IsAllowRichText | ( | ) |
Check whether the widget allows rich text formatting.
Only text edit widget which type is XFAWidget::e_WidgetTypeTextEdit supports rich text.
bool foxit::addon::xfa::XFAWidget::IsChecked | ( | ) | const |
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.
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.
bool foxit::addon::xfa::XFAWidget::IsListBox | ( | ) |
Check whether the widget is listbox or not.
bool foxit::addon::xfa::XFAWidget::IsReadOnly | ( | ) |
Check whether the widget is read only.
bool foxit::addon::xfa::XFAWidget::IsRequired | ( | ) |
Check whether the widget requires a value at the time it is exported by a submit-form action.
bool foxit::addon::xfa::XFAWidget::IsSupportMultiline | ( | ) |
Check whether the widget supports multiple lines.
Only text edit widget which type is XFAWidget::e_WidgetTypeTextEdit supports multiple lines.
bool foxit::addon::xfa::XFAWidget::IsSupportMultiSelect | ( | ) |
Check whether the widget supports multiple selections.
Only the list box widget supports multiline selections, whose type is XFAWidget::e_WidgetTypeChoiceList and the return value of function xfa::XFAWidget::IsListBox is true.
bool foxit::addon::xfa::XFAWidget::OnChar | ( | int | input_char, |
uint32 | flags | ||
) |
Call this function when a character code is being input.
[in] | input_char | A character code, in UTF16-LE encoding. |
[in] | flags | Event flags. Please refer to values starting from pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
HitTestArea foxit::addon::xfa::XFAWidget::OnHitTest | ( | const PointF & | point | ) |
Call this function to do hit test for a specified point.
[in] | point | A point to be tested. |
Call this function when key on the keyboard is down.
[in] | key_code | The key code. Please refer to values starting from pdf::interform::Filler::e_VkeyUnknown and this should be one of these values. |
[in] | flags | Event flags. Please refer to values starting from pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
Call this function when key on the keyboard is up.
[in] | key_code | The key code. Please refer to values starting from pdf::interform::Filler::e_VkeyUnknown and this should be one of these values. |
[in] | flags | Event flags. Please refer to values starting from pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
Call this function when left mouse button is double-clicked .
[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 pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
Call this function when left mouse button is down.
[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 pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
Call this function when left mouse button is up.
[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 pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::addon::xfa::XFAWidget::OnMouseEnter | ( | ) |
Call this function when mouse enters current XFA widget.
bool foxit::addon::xfa::XFAWidget::OnMouseExit | ( | ) |
Call this function when mouse exits.
Call this function when mouse moves.
[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 pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
Call this function when right mouse is down.
[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 pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
Call this function when right button is up.
[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 pdf::interform::Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::addon::xfa::XFAWidget::operator!= | ( | const XFAWidget & | other | ) | const |
Not equal operator.
[in] | other | Another XFA widget object. This function will check if current object is not equal to this one. |
Assign operator.
[in] | other | Another XFA widget object, whose value would be assigned to current object. |
bool foxit::addon::xfa::XFAWidget::operator== | ( | const XFAWidget & | other | ) | const |
Equal operator.
[in] | other | Another XFA widget object. This function will check if current object is equal to this one. |
void foxit::addon::xfa::XFAWidget::ResetData | ( | ) |
Reset XFA Widget Data.
void foxit::addon::xfa::XFAWidget::SetCheckState | ( | bool | is_checked | ) |
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::e_ErrUnsupported.
[in] | is_checked | true means the current XFA widget will be checked, while false means it will not be checked. |
void foxit::addon::xfa::XFAWidget::SetDefaultValue | ( | const wchar_t * | value | ) |
Set the default value string.
It is only useful for the XFA widget which type is XFAWidget::e_WidgetTypeTextEdit, XFAWidget::e_WidgetTypeNumericEdit, XFAWidget::e_WidgetTypePasswordEdit or XFAWidget::e_WidgetTypeDateTimeEdit.
[in] | value | A string as default value to be set. It can be an empty string. |
void foxit::addon::xfa::XFAWidget::SetImage | ( | const foxit::common::Image & | image | ) |
Set the image for current XFA widget.
Applicable only when the type of current XFA widget is XFAWidget::e_WidgetTypeImageEdit. For types that are not applicable, this function will throw exception foxit::e_ErrUnsupported.
[in] | image | An 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 foxit::e_ErrUnsupported will be thrown. |
bool foxit::addon::xfa::XFAWidget::SetOptions | ( | const addon::xfa::WidgetChoiceOptionArray & | option_array | ) |
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.
[in] | option_array | An array of choice options to be set. |
void foxit::addon::xfa::XFAWidget::SetValue | ( | const wchar_t * | value | ) |
Set the value string.
It is only useful for the XFA widget which type is XFAWidget::e_WidgetTypeTextEdit, XFAWidget::e_WidgetTypeNumericEdit, XFAWidget::e_WidgetTypePasswordEdit or XFAWidget::e_WidgetTypeDateTimeEdit.
[in] | value | A string as value to be set. It can be an empty string. |
bool foxit::addon::xfa::XFAWidget::ValidateValue | ( | const wchar_t * | value, |
WString & | format | ||
) |
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.
[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. |