Foxit PDF SDK
|
Public Member Functions | |
Filler (const Filler &other) | |
Constructor, with another filler object. More... | |
Filler (const Form &form, FillerAssistCallback *assist) | |
Constructor. More... | |
~Filler () | |
Destructor. | |
PointF | GetEditingTextCaretPosition (Matrix matrix) |
Get the text caret position when the text field or combo box is in the editing state. More... | |
void | HighlightFormFields (bool is_highlight) |
Decide whether to highlight form fields (including signature fields) or not. More... | |
void | HighlightFormFields (bool is_highlight, bool is_sign_highlight) |
Decide whether to highlight signature fields and other form fields or not. More... | |
bool | IsEmpty () const |
Check whether current object is empty or not. More... | |
bool | KillFocus () |
Kill focus from form. More... | |
bool | OnChar (uint32 char_code, uint32 flags) |
Call this function when a character code is about to be inputted to a form field. More... | |
bool | OnCopy () |
Call this function when the popup menu item "Copy" is down. More... | |
bool | OnCut () |
Call this function when the popup menu item "Cut" is down. More... | |
bool | OnDelete () |
Call this function when the popup menu item "Delete" is down. 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 PDFPage &page, const PointF &point, uint32 flags) |
Call this function when left mouse button is double clicked. More... | |
bool | OnLButtonDown (const PDFPage &page, const PointF &point, uint32 flags) |
Call this function when left mouse button is down. More... | |
bool | OnLButtonUp (const PDFPage &page, const PointF &point, uint32 flags) |
Call this function when left mouse button is up. More... | |
bool | OnMouseEnter (const PDFPage &page, const PointF &point, uint32 flags) |
(Reserved, unsupported yet) Call this function when mouse enters somewhere. More... | |
bool | OnMouseHover (const PDFPage &page, const PointF &point, uint32 flags) |
(Reserved, unsupported yet) Call this function when mouse hovers somewhere. More... | |
bool | OnMouseLeave (const PDFPage &page, const PointF &point, uint32 flags) |
(Reserved, unsupported yet) Call this function when mouse leaves somewhere. More... | |
bool | OnMouseMove (const PDFPage &page, const PointF &point, uint32 flags) |
Call this function when mouse moves. More... | |
bool | OnMouseWheel (const PDFPage &page, const PointF &point, int32 delta, uint32 flags) |
(Reserved, unsupported yet) Call this function when mouse wheel moves. More... | |
bool | OnPaste () |
Call this function when the popup menu item "Paste" is down. More... | |
bool | OnRButtonDoubleClick (const PDFPage &page, const PointF &point, uint32 flags) |
(Reserved, unsupported yet) Call this function when right mouse button is double clicked. More... | |
bool | OnRButtonDown (const PDFPage &page, const PointF &point, uint32 flags) |
Call this function when right mouse button is down. More... | |
bool | OnRButtonUp (const PDFPage &page, const PointF &point, uint32 flags) |
Call this function when right mouse button is up. More... | |
bool | OnSelectAll () |
Call this function when the popup menu item "Select All" is down. More... | |
bool | OnWheelButtonDoubleClick (const PDFPage &page, const PointF &point, uint32 flags) |
(Reserved, unsupported yet) Call this function when mouse wheel button is double clicked. More... | |
bool | OnWheelButtonDown (const PDFPage &page, const PointF &point, uint32 flags) |
(Reserved, unsupported yet) Call this function when mouse wheel button is down. More... | |
bool | OnWheelButtonUp (const PDFPage &page, const PointF &point, uint32 flags) |
(Reserved, unsupported yet) Call this function when mouse wheel button is up. More... | |
bool | operator!= (const Filler &other) const |
Not equal operator. More... | |
Filler & | operator= (const Filler &other) |
Assign operator. More... | |
bool | operator== (const Filler &other) const |
Equal operator. More... | |
void | Render (const PDFPage &page, const Matrix &matrix, const common::Renderer &renderer) |
Draw the currently focused form control on the page. More... | |
bool | SetFocus (const Control &control) |
Set focus on a form control. More... | |
void | SetHighlightColor (ARGB color) |
Set the highlight color used for highlighting form fields. More... | |
void | ShowOverflowIndicator (bool is_show_overflow_indicator) |
Decide whether to show the overflow indicator when the text in text field overflow. More... | |
![]() | |
FS_HANDLE | Handle () const |
Get the handle of current object. More... | |
This class represents a form filler used for filling PDF form. There should be only one form filler object for an interactive form, so do not construct form filler for one Form object more than one time. User is recommended to implement an foxit::ActionCallback and set it to Foxit PDF SDK by function common::Library::SetActionCallback, in order to implement more features of form filler.
Enumeration for key event flags.
Values of this enumeration can be used alone or in combination.
Enumeration for virtual key code.
Values of this enumeration should be used alone.
|
explicit |
Constructor.
There can be only one form filler for a form.
[in] | form | A valid PDF form. |
[in] | assist | An assistant callback class for form filler. This should be implemented by user and should not be NULL. |
foxit::pdf::interform::Filler::Filler | ( | const Filler & | other | ) |
Constructor, with another filler object.
[in] | other | Another filler object. |
Get the text caret position when the text field or combo box is in the editing state.
[in] | matrix | A matrix used to transform the returned position to device coordinate system. |
void foxit::pdf::interform::Filler::HighlightFormFields | ( | bool | is_highlight | ) |
Decide whether to highlight form fields (including signature fields) or not.
All types of form fields can be highlighted except push button fields. If this function is not called, Foxit PDF SDK will highlight all form fields (including signature fields) by default.
[in] | is_highlight | true means to highlight form fields (including signature fields), and false means not to highlight form fields (including signature fields). |
void foxit::pdf::interform::Filler::HighlightFormFields | ( | bool | is_highlight, |
bool | is_sign_highlight | ||
) |
Decide whether to highlight signature fields and other form fields or not.
All types of form fields can be highlighted except push button fields. If this function is not called, Foxit PDF SDK will highlight all form fields by default apart from signature fields which are not highlighted by default.
[in] | is_highlight | This boolean value is used for non-signature fields: true means to highlight form fields, and false means not to highlight form fields. |
[in] | is_sign_highlight | This boolean value is used only for siganture fields: true means to highlight signature fields, and false means not to highlight signature fields. |
bool foxit::pdf::interform::Filler::IsEmpty | ( | ) | const |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
bool foxit::pdf::interform::Filler::KillFocus | ( | ) |
Kill focus from form.
Call this function when a character code is about to be inputted to a form field.
[in] | char_code | A character code, in UTF16-LE encoding. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnCopy | ( | ) |
Call this function when the popup menu item "Copy" is down.
bool foxit::pdf::interform::Filler::OnCut | ( | ) |
Call this function when the popup menu item "Cut" is down.
bool foxit::pdf::interform::Filler::OnDelete | ( | ) |
Call this function when the popup menu item "Delete" is down.
Call this function when key on the keyboard is down.
[in] | key_code | The key code. Please refer to values starting from Filler::e_VkeyUnknown and this should be one of these values. |
[in] | flags | Event flags. Please refer to values starting from 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 Filler::e_VkeyUnknown and this should be one of these values. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnLButtonDoubleClick | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
Call this function when left mouse button is double clicked.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnLButtonDown | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
Call this function when left mouse button is down.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is down in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnLButtonUp | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
Call this function when left mouse button is up.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnMouseEnter | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
(Reserved, unsupported yet) Call this function when mouse enters somewhere.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnMouseHover | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
(Reserved, unsupported yet) Call this function when mouse hovers somewhere.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnMouseLeave | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
(Reserved, unsupported yet) Call this function when mouse leaves somewhere.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnMouseMove | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
Call this function when mouse moves.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnMouseWheel | ( | const PDFPage & | page, |
const PointF & | point, | ||
int32 | delta, | ||
uint32 | flags | ||
) |
(Reserved, unsupported yet) Call this function when mouse wheel moves.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | delta | Indicates the amount the mouse wheel has been moved. A positive value means to be moved forward, and a negative value means to be moved backward. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnPaste | ( | ) |
Call this function when the popup menu item "Paste" is down.
bool foxit::pdf::interform::Filler::OnRButtonDoubleClick | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
(Reserved, unsupported yet) Call this function when right mouse button is double clicked.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnRButtonDown | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
Call this function when right mouse button is down.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnRButtonUp | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
Call this function when right mouse button is up.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnSelectAll | ( | ) |
Call this function when the popup menu item "Select All" is down.
bool foxit::pdf::interform::Filler::OnWheelButtonDoubleClick | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
(Reserved, unsupported yet) Call this function when mouse wheel button is double clicked.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnWheelButtonDown | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
(Reserved, unsupported yet) Call this function when mouse wheel button is down.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::OnWheelButtonUp | ( | const PDFPage & | page, |
const PointF & | point, | ||
uint32 | flags | ||
) |
(Reserved, unsupported yet) Call this function when mouse wheel button is up.
[in] | page | A valid PDF page object. |
[in] | point | A point where left mouse button is up in the page, in PDF coordinate system. |
[in] | flags | Event flags. Please refer to values starting from Filler::e_EventFlagShiftKey and this should be one or a combination of these values. |
bool foxit::pdf::interform::Filler::operator!= | ( | const Filler & | other | ) | const |
Not equal operator.
[in] | other | Another filler object. This function will check if current object is not equal to this one. |
Assign operator.
[in] | other | Another filler object, whose value would be assigned to current object. |
bool foxit::pdf::interform::Filler::operator== | ( | const Filler & | other | ) | const |
Equal operator.
[in] | other | Another filler object. This function will check if current object is equal to this one. |
void foxit::pdf::interform::Filler::Render | ( | const PDFPage & | page, |
const Matrix & | matrix, | ||
const common::Renderer & | renderer | ||
) |
Draw the currently focused form control on the page.
If there is no focused form control on the page, nothing will be drawn by this function. The focused form control has to be the topmost visible element, so that it should be always rendered after page content and all the other annotations have been rendered.
For how to render form control (which is associated with widget annotations), please refer to the recommended flow mentioned in comment of class Renderer.
[in] | page | A valid PDF page object. |
[in] | matrix | The transformation matrix used for rendering, which is usually returned by function PDFPage::GetDisplayMatrix. |
[in] | renderer | A valid renderer object for rendering. |
bool foxit::pdf::interform::Filler::SetFocus | ( | const Control & | control | ) |
Set focus on a form control.
[in] | control | A form control object. If this is constructed by default constructor and not set any value, that means no focus control. |
void foxit::pdf::interform::Filler::SetHighlightColor | ( | ARGB | color | ) |
Set the highlight color used for highlighting form fields.
If this function is not called, Foxit PDF SDK will use a kind of light blue grey color (value 0x80C8D2FF) by default.
[in] | color | The highlight color to be set for highlighting form fields. |
void foxit::pdf::interform::Filler::ShowOverflowIndicator | ( | bool | is_show_overflow_indicator | ) |
Decide whether to show the overflow indicator when the text in text field overflow.
If this function is not called, Foxit PDF SDK will not show form field overflow indicator by default.
[in] | is_show_overflow_indicator | true means to show overflow indicator when the text in text field overflow, and false means not to show overflow indicator in this case. |