Foxit PDF SDK
fs_xfa.h
Go to the documentation of this file.
1 
16 #ifndef FS_XFA_H_
17 #define FS_XFA_H_
18 
19 #include "common/fs_common.h"
20 
26 namespace foxit {
27 namespace pdf{
28 class Signature;
29 class PDFDoc;
30 }
31 
35 namespace addon {
39 namespace xfa {
40 class XFADoc;
41 class XFAPage;
42 class XFAWidget;
43 
45 class WidgetChoiceOption FS_FINAL : public Object {
46  public:
50  , selected(false){}
51 
61  , selected(selected){}
62 
69  : option_label(option.option_label)
70  , selected(option.selected){}
71 
80  option_label = option.option_label;
81  selected = option.selected;
82  return *this;
83  }
84 
94  void Set( const wchar_t* option_label, bool selected) {
95  this->option_label = option_label;
96  this->selected = selected;
97  }
98 
101 
103  bool selected;
104 };
105 
108 
115  public:
121  typedef enum _AppInfo {
134  } AppInfo;
135 
141  typedef enum _BeepType {
152  } BeepType;
153 
159  typedef enum _StringID {
373  } StringID;
374 
380  typedef enum _MsgBoxIconType {
389  } MsgBoxIconType;
390 
396  typedef enum _MsgBoxButtonType {
406 
412  typedef enum _MsgBoxButtonID {
421  } MsgBoxButtonID;
422 
423 
429  virtual void Release() = 0;
430 
440  virtual WString GetAppInfo(AppInfo app_info) = 0;
441 
450  virtual void Beep(BeepType type) = 0;
451 
465  virtual MsgBoxButtonID MsgBox(const wchar_t* message, const wchar_t* title, MsgBoxIconType icon_type,
466  MsgBoxButtonType button_type) = 0;
467 
480  virtual WString Response(const wchar_t* question, const wchar_t* title, const wchar_t* default_answer,
481  bool is_mask) = 0;
482 
490  virtual common::file::ReaderCallback* DownLoadUrl(const wchar_t* url) = 0;
491 
506  virtual WString PostRequestURL(const wchar_t* url, const wchar_t* data, const wchar_t* content_type,
507  const wchar_t* encode, const wchar_t* header) = 0;
508 
519  virtual bool PutRequestURL(const wchar_t* url, const wchar_t* data, const wchar_t* encode) = 0;
520 
538  virtual WString LoadString(StringID string_id) = 0;
539 
550  virtual WStringArray ShowFileDialog(const wchar_t* string_title, const wchar_t* string_filter,
551  bool is_openfile_dialog) = 0;
552 
553  protected:
554  ~AppProviderCallback() {}
555 };
556 
563  public:
569  typedef enum _InvalidateFlag {
574  } InvalidateFlag;
575 
581  typedef enum _PrintOption {
589  e_PrintOptionAsImage = 0x00000008,
594  } PrintOption;
595 
601  typedef enum _SubmitFormat {
612  } SubmitFormat;
613 
619  typedef enum _TextEncoding {
644  } TextEncoding;
645 
651  typedef enum _PageViewEventType {
659 
665  typedef enum _WidgetEventType {
670  } WidgetEventType;
671 
672 
678  virtual void Release() = 0;
679 
692  virtual void InvalidateRect(int page_index, const RectF& rect, InvalidateFlag flag) = 0;
693 
704  virtual void DisplayCaret(int page_index, bool is_visible, const RectF& rect) = 0;
705 
720  virtual bool GetPopupPos(int page_index, float min_popup, float max_popup,
721  const RectF& rect_widget, RectF& inout_rect_popup) = 0;
722 
731  virtual bool PopupMenu(int page_index, const PointF& rect_popup) = 0;
732 
740  virtual int GetCurrentPage(const XFADoc& doc) = 0;
741 
750  virtual void SetCurrentPage(const XFADoc& doc, int current_page_index) = 0;
751 
759  virtual void SetChangeMark(const XFADoc& doc) = 0;
760 
768  virtual WString GetTitle(const XFADoc& doc) = 0;
769 
777  virtual void SetFocus(XFAWidget& xfa_widget) = 0;
778 
789  virtual void ExportData(const XFADoc& doc, const WString& file_path) = 0;
790 
801  virtual void ImportData(const XFADoc& doc, const WString& file_path) = 0;
802 
811  virtual void GotoURL(const XFADoc& doc, const WString& url) = 0;
812 
825  virtual void Print(const XFADoc& doc, int start_page_index, int end_page_index, uint32 options) = 0;
826 
834  virtual ARGB GetHighlightColor(const XFADoc& doc) = 0;
835 
849  virtual bool SubmitData(const XFADoc& doc, const WString& target, SubmitFormat format, TextEncoding text_encoding,
850  const WString& content) = 0;
851 
862  virtual void PageViewEvent(int page_index, PageViewEventType page_view_event_type) = 0;
863 
874  virtual void WidgetEvent(const XFAWidget& xfa_widget,WidgetEventType widget_event_type) = 0;
875 
876  protected:
877  ~DocProviderCallback() {}
878 };
879 
889 class XFADoc FS_FINAL : public Base{
890  public:
896  typedef enum _EventType {
906  } EventType;
907 
913  typedef enum _Type {
917  e_Static = 1,
919  e_XDP = 2
920  } Type;
921 
927  typedef enum _ExportDataType {
934  } ExportDataType;
935 
936 
950  XFADoc(const pdf::PDFDoc& document, DocProviderCallback* xfa_doc_provider_handler);
951 
964  XFADoc(const foxit::pdf::PDFDoc& document);
965 
971  XFADoc(const XFADoc& other);
979  XFADoc& operator = (const XFADoc& other);
980 
988  bool operator == (const XFADoc& other) const;
989 
997  bool operator != (const XFADoc& other) const;
998 
1006  bool IsEmpty() const;
1007 
1009  ~XFADoc();
1010 
1029 
1041 
1048  Type GetType() const;
1049 
1055  int GetPageCount() const;
1056 
1065  XFAPage GetPage(int page_index);
1066 
1076  bool ExportData(const char* output_file_path, ExportDataType export_type);
1077 
1087  bool ExportData(const wchar_t* output_file_path, ExportDataType export_type);
1088 
1099  void SetPDFPath(const char* pdf_file_path);
1100 
1111  void SetPDFPath(const wchar_t* pdf_file_path);
1112 
1121  bool ImportData(const char* file_path);
1122 
1131  bool ImportData(const wchar_t* file_path);
1132 
1138  void ResetForm();
1139 
1147  void FlattenTo(const char* output_file_path);
1148 
1156  void FlattenTo(const wchar_t* output_file_path);
1157 
1166 
1175  void ProcessEvent(EventType event_type);
1176 
1184  void SetFocus(XFAWidget xfa_widget);
1185 
1191  void KillFocus();
1192 
1206  XFAWidget GetWidgetByFullName(const WString& full_name);
1207 
1208  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1209  explicit XFADoc(FS_HANDLE handle = NULL);
1210 };
1211 
1218 class XFAPage FS_FINAL : public Base{
1219  public:
1225  XFAPage(const XFAPage& other);
1233  XFAPage& operator = (const XFAPage& other);
1234 
1242  bool operator == (const XFAPage& other) const;
1250  bool operator != (const XFAPage& other) const;
1251 
1253  ~XFAPage();
1254 
1262  bool IsEmpty() const;
1263 
1277  Matrix GetDisplayMatrix(int left, int top, int width, int height, common::Rotation rotate);
1278 
1284  float GetWidth() const;
1285 
1291  float GetHeight() const;
1292 
1303  XFAWidget GetWidgetAtDevicePoint(const Matrix& matrix, const PointF& device_point, float tolerance);
1304 
1310  int GetIndex() const;
1311 
1317  int GetWidgetCount() const;
1318 
1327  XFAWidget GetWidget(int widget_index) const;
1328 
1338  XFAWidget GetWidgetByFullName(const WString& full_name);
1339 
1347 
1355 
1365  XFAWidget GetNextWidget(const XFAWidget& widget);
1366 
1376  XFAWidget GetPrevWidget(const XFAWidget& widget);
1377 
1378  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1379  explicit XFAPage(FS_HANDLE handle = NULL);
1380 };
1381 
1388 class XFAWidget FS_FINAL : public Base{
1389  public:
1395  typedef enum _HitTestArea {
1404  } HitTestArea;
1405 
1411  typedef enum _WidgetType {
1444  } WidgetType;
1445 
1452  typedef enum _PresenceProperty {
1463  } PresenceProperty;
1464 
1470  typedef enum _WidgetNameType {
1477  } WidgetNameType;
1478 
1484  typedef enum _WidgetHAlignType {
1497  } WidgetHAlignType;
1498 
1504  typedef enum _WidgetVAlignType {
1511  } WidgetVAlignType;
1512 
1518  typedef enum _WidgetEdgePosition {
1528 
1529 
1535  XFAWidget(const XFAWidget& other);
1543  XFAWidget& operator = (const XFAWidget& other);
1544 
1552  bool operator == (const XFAWidget& other) const;
1560  bool operator != (const XFAWidget& other) const;
1561 
1569  bool IsEmpty() const;
1570 
1572  ~XFAWidget();
1573 
1579  XFAPage GetXFAPage();
1580 
1586  int GetIndex() const;
1587 
1593  void ResetData();
1594 
1603  RectF GetRect();
1604 
1610  WString GetValue();
1611 
1619  void SetValue(const wchar_t* value);
1620 
1630 
1640 
1649  bool IsChecked() const;
1650 
1659 
1665  bool OnMouseEnter();
1666 
1672  bool OnMouseExit();
1673 
1684  bool OnLButtonDown(const PointF& point, uint32 flags);
1685 
1696  bool OnLButtonUp(const PointF& point, uint32 flags);
1697 
1708  bool OnLButtonDoubleClick(const PointF& point, uint32 flags);
1709 
1720  bool OnMouseMove(const PointF& point, uint32 flags);
1721 
1732  bool OnRButtonDown(const PointF& point, uint32 flags);
1733 
1744  bool OnRButtonUp(const PointF& point, uint32 flags);
1745 
1758  bool OnKeyDown(uint32 key_code, uint32 flags);
1759 
1772  bool OnKeyUp(uint32 key_code, uint32 flags);
1773 
1784  bool OnChar(int input_char, uint32 flags);
1785 
1794  HitTestArea OnHitTest(const PointF& point);
1795 
1802  WidgetType GetType();
1803 
1811 
1819 
1828  bool HasEdge(WidgetEdgePosition edge_pos);
1829 
1839 
1845  WString GetToolTip();
1846 
1847  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1848  explicit XFAWidget(FS_HANDLE handle = NULL);
1849 };
1850 
1854 class WidgetMenu FS_FINAL : public Base {
1855  public:
1861  explicit WidgetMenu(const XFAWidget& xfa_widget);
1862 
1868  WidgetMenu(const WidgetMenu& other);
1876  WidgetMenu& operator = (const WidgetMenu& other);
1877 
1885  bool operator == (const WidgetMenu& other) const;
1893  bool operator != (const WidgetMenu& other) const;
1894 
1896  ~WidgetMenu();
1897 
1905  bool IsEmpty() const;
1906 
1912  bool CanCopy();
1913 
1919  bool CanCut();
1920 
1926  bool CanPaste();
1927 
1933  bool CanSelectAll();
1934 
1940  bool CanDelete();
1941 
1948  bool CanDeSelect();
1949 
1955  WString Copy();
1956 
1962  WString Cut();
1963 
1971  bool Paste(const wchar_t* text);
1972 
1978  bool SelectAll();
1979 
1985  bool Delete();
1986 
1992  bool DeSelect();
1993 
2000  bool CanUndo();
2001 
2008  bool CanRedo();
2009 
2015  bool Undo();
2016 
2022  bool Redo();
2023 
2029  bool Bold();
2030 
2036  bool Italic();
2037 
2043  bool Underline();
2044 
2050  bool Superscript();
2051 
2057  bool Subscript();
2058 
2064  bool ClearStyle();
2065 
2066  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2067  explicit WidgetMenu(FS_HANDLE handle = NULL);
2068 };
2069 } // namespace XFA
2070 } // namespace addon
2071 } // namespace foxit
2072 #endif // namespace foxit
2073 
virtual void DisplayCaret(int page_index, bool is_visible, const RectF &rect)=0
A callback function used to display or hide caret.
Sample message: "Unable to set the value for property 'numPages'".
Definition: fs_xfa.h:197
int GetIndex() const
Get the index of XFA Widget in related XFA page.
Message box icon: Question.
Definition: fs_xfa.h:386
Message box button ID: Cancel.
Definition: fs_xfa.h:416
virtual void Beep(BeepType type)=0
A callback function used to beep for specified beep type.
Sample message: "Script failed(language is %s;context is %s) script=%s".
Definition: fs_xfa.h:365
If set, print page in reverse order; otherwise, in normal order.
Definition: fs_xfa.h:591
XFA widget type: date time edit.
Definition: fs_xfa.h:1421
Sample message: "The element [%s] has violated its allowable number of occurrences".
Definition: fs_xfa.h:309
PresenceProperty
Enumeration for presence attribute of XFA widget.
Definition: fs_xfa.h:1452
void SetValue(const wchar_t *value)
Set the value string.
Sample message: "Bad suffix on number".
Definition: fs_xfa.h:217
Sample message: "SOM expression returned list when single result was expected".
Definition: fs_xfa.h:303
virtual void ExportData(const XFADoc &doc, const WString &file_path)=0
A callback function used to export data to file.
String ID for case: Use string in local language for "Tuesday".
Definition: fs_xfa.h:317
Sample message: "Condition is null".
Definition: fs_xfa.h:245
void SetDocProviderCallback(foxit::addon::xfa::DocProviderCallback *doc_provider_callback)
Set XFA document provider callback.
Sample message: "Unsupported method %s.".
Definition: fs_xfa.h:184
XFA widget type: rectangle.
Definition: fs_xfa.h:1437
virtual void ImportData(const XFADoc &doc, const WString &file_path)=0
A callback function used to import data from file.
This kind of event is triggered just after the rendered form has been sent to the printer,...
Definition: fs_xfa.h:903
The submit data is packaged in URL-encoded format as described in Uniform Resource Locator(URL).
Definition: fs_xfa.h:607
XFA widget type: barcode.
Definition: fs_xfa.h:1413
XFA widget type: unknown.
Definition: fs_xfa.h:1441
bool OnLButtonUp(const PointF &point, uint32 flags)
Call this function when left mouse button is up.
XFA widget type: arc.
Definition: fs_xfa.h:1419
virtual int GetCurrentPage(const XFADoc &doc)=0
A callback function used to get index of current page.
WidgetNameType
Enumeration for the type of XFA widget name.
Definition: fs_xfa.h:1470
Sample message: "An attempt was made to reference property '%s' of a non-object in SOM expression %s"...
Definition: fs_xfa.h:287
bool operator==(const XFAWidget &other) const
Equal operator.
Sample message: "The value you entered for %s is invalid. To ignore validations for %s,...
Definition: fs_xfa.h:359
void Set(const wchar_t *option_label, bool selected)
Set value.
Definition: fs_xfa.h:94
XFAWidget GetPrevWidget(const XFAWidget &widget)
Get the previous XFA widget of a specified XFA widget in current tab order.
WidgetMenu & operator=(const WidgetMenu &other)
Assign operator.
bool ImportData(const char *file_path)
Import data from an XML or XDP file.
Sample message: "Illegal continue".
Definition: fs_xfa.h:249
WidgetHAlignType
Enumeration for the type of text horizontal alignment of XFA widget.
Definition: fs_xfa.h:1484
Text encoding: GB18030.
Definition: fs_xfa.h:629
HitTestArea OnHitTest(const PointF &point)
Call this function to do hit test for a specified point.
XFA widget type: signature.
Definition: fs_xfa.h:1425
virtual void InvalidateRect(int page_index, const RectF &rect, InvalidateFlag flag)=0
A callback function used to invalidate rectangle according the flag.
bool Italic()
(Only useful for rich text) Make the rich text italic.
Sample message: "Index value is out of bounds".
Definition: fs_xfa.h:293
Sample message: "Unable to set the value for property 'length'".
Definition: fs_xfa.h:213
Sample message: "Invalidate token '%s'".
Definition: fs_xfa.h:227
XFAWidget GetWidgetByFullName(const WString &full_name)
Get the XFA widget which matches the specified full name in current XFA page.
PageViewEventType
Enumeration for the event type of page view.
Definition: fs_xfa.h:651
String ID for case: Use string in local language for "July".
Definition: fs_xfa.h:339
WidgetVAlignType GetVAlign()
Get text vertical alignment.
String ID for case: If to modify field. Sample message: "Do you want to modify this field?...
Definition: fs_xfa.h:165
WidgetEventType
Enumeration for the type of XFA widget event.
Definition: fs_xfa.h:665
Message box button ID: OK.
Definition: fs_xfa.h:414
CFX_Object Object
Object type.
Definition: fs_basictypes.h:219
Sample message: "Unable to set the value for property 'variation'".
Definition: fs_xfa.h:203
Sample message: "Cannot find function '%s'".
Definition: fs_xfa.h:275
WidgetType
Enumeration for the type of XFA widget.
Definition: fs_xfa.h:1411
Sample message: "Validate failed".
Definition: fs_xfa.h:161
The submit data is translated and packaged into an URL-Encoded format.
Definition: fs_xfa.h:611
XFA widget type: line.
Definition: fs_xfa.h:1431
bool HasEdge(WidgetEdgePosition edge_pos)
Check if the edge for specified position exists.
Sample message: "Not have a default property".
Definition: fs_xfa.h:193
WidgetVAlignType
Enumeration for the type of text vertical alignment of XFA widget.
Definition: fs_xfa.h:1504
bool Redo()
Redo the operation of related XFA widget. (No effect for rich text)
bool operator!=(const WidgetMenu &other) const
Not equal operator.
Sample message: "Unable to set the value for property 'ready'".
Definition: fs_xfa.h:207
XFAPage GetXFAPage()
Get the related XFA page, to which current XFA widget belongs.
Definition: fs_xfa.h:1218
InvalidateFlag
Enumeration for XFA invalidate flag.
Definition: fs_xfa.h:569
Presence property: Inactive. Do not participate in interaction, layout, or rendering.
Definition: fs_xfa.h:1460
bool CanDelete()
Check if the text of related XFA widget can be deleted.
WString option_label
The displayed string value for the option.
Definition: fs_xfa.h:100
Sample message: "Out of the range of '%s' array".
Definition: fs_xfa.h:279
Sample message: "Unable to set the value for property 'validationsEnabled'".
Definition: fs_xfa.h:201
Definition: fs_basictypes.h:226
common::Progressive StartLoad(common::PauseCallback *pause=0)
Start to load content for current XFA document.
String ID for case: Use string in local language for "December".
Definition: fs_xfa.h:349
bool OnLButtonDown(const PointF &point, uint32 flags)
Call this function when left mouse button is down.
Matrix GetDisplayMatrix(int left, int top, int width, int height, common::Rotation rotate)
Get the display matrix, from PDF coordinate system to targeted device coordinate system.
Message box icon: Error.
Definition: fs_xfa.h:382
Egde position: top.
Definition: fs_xfa.h:1520
String ID for case: Use string in local language for "Thursday".
Definition: fs_xfa.h:321
Definition: fx_coordinates.h:30
Sample message: "Unable to set the value for property 'platform'".
Definition: fs_xfa.h:199
Message box button ID: Yes.
Definition: fs_xfa.h:420
bool CanCut()
Check if the text of related XFA widget can be cut.
bool IsEmpty() const
Check whether current object is empty or not.
String ID for case: Use string in local language for "October".
Definition: fs_xfa.h:345
Message box button: Yes, No and Cancel.
Definition: fs_xfa.h:404
Align the radix indicator.
Definition: fs_xfa.h:1494
Definition: fs_xfa.h:1388
Event type: after a page view is removed.
Definition: fs_xfa.h:655
bool Subscript()
(Only useful for rich text) Make the rich text as subscript.
Align the text to the left edge of the available region.
Definition: fs_xfa.h:1492
file reading interface.
Definition: fx_stream.h:555
virtual WString Response(const wchar_t *question, const wchar_t *title, const wchar_t *default_answer, bool is_mask)=0
A callback function used to response.
PresenceProperty GetPresence()
Get the presence property of the XFA widget.
XFA widget type: image edit.
Definition: fs_xfa.h:1429
bool Underline()
(Only useful for rich text) Underline the rich text.
AppInfo
Enumeration for XFA application information type.
Definition: fs_xfa.h:121
Presence property: Visible. Participate in interaction, layout, and rendering.
Definition: fs_xfa.h:1456
MsgBoxIconType
Enumeration for icon type of XFA message box.
Definition: fs_xfa.h:380
bool OnMouseExit()
Call this function when mouse exits.
XFAPage(const XFAPage &other)
Constructor, with another XFA page object.
void SetPDFPath(const char *pdf_file_path)
Set the path of related PDF document.
Beep type: warning.
Definition: fs_xfa.h:145
Text encoding: GB2312.
Definition: fs_xfa.h:631
WidgetChoiceOption()
Constructor.
Definition: fs_xfa.h:48
WIDE STRING CLASS.
Definition: fx_string.h:1459
float GetHeight() const
Get the height of the XFA page.
XFAWidget GetWidgetAtDevicePoint(const Matrix &matrix, const PointF &device_point, float tolerance)
Get the XFA widget at a specified point, in device coordination system.
bool IsEmpty() const
Check whether current object is empty or not.
int GetPageCount() const
Get XFA page count.
XFAPage & operator=(const XFAPage &other)
Assign operator.
Egde position: bottom.
Definition: fs_xfa.h:1524
virtual void SetFocus(XFAWidget &xfa_widget)=0
A callback function used to set focus widget.
bool OnKeyDown(uint32 key_code, uint32 flags)
Call this function when key on the keyboard is down.
WString GetToolTip()
Get tooltip string.
Name type: full name.
Definition: fs_xfa.h:1476
String ID for case: Use string in local language for "November".
Definition: fs_xfa.h:347
Hit test area: Title Bar.
Definition: fs_xfa.h:1401
bool OnChar(int input_char, uint32 flags)
Call this function when a character code is being input.
Sample message: "Cannot find property '%s'".
Definition: fs_xfa.h:259
bool ExportData(const char *output_file_path, ExportDataType export_type)
Export data to a file.
XFAWidget & operator=(const XFAWidget &other)
Assign operator.
Sample message: "Unable to set the value for property 'language'".
Definition: fs_xfa.h:195
Definition: fs_pdfdoc.h:347
XFA widget type: text edit.
Definition: fs_xfa.h:1439
XFA widget type: numeric edit.
Definition: fs_xfa.h:1423
bool Delete()
Delete all the text of related XFA widget.
Sample message: "'%s' redefinition".
Definition: fs_xfa.h:225
Event type: after an XFA widget is added.
Definition: fs_xfa.h:667
Sample message: "'%s' argument is expected to be a container".
Definition: fs_xfa.h:285
Name type: field name. Name in this type will be retrieved from XFA widget's name entry and this may ...
Definition: fs_xfa.h:1472
EventType
Enumeration for XFA event type.
Definition: fs_xfa.h:896
Sample message: "Argument mismatch in property or function argument".
Definition: fs_xfa.h:297
Sample message: "Unsupported character '%c'".
Definition: fs_xfa.h:215
Align the text so that it is centered between the top and bottom of the available region.
Definition: fs_xfa.h:1510
String ID for case: Use string in local language for "September".
Definition: fs_xfa.h:343
addon::xfa::WidgetChoiceOptionArray GetOptions() const
Get options of a choice list or an Exclusion Group (for radion button only).
bool OnMouseMove(const PointF &point, uint32 flags)
Call this function when mouse moves.
PrintOption
Enumeration for XFA print options.
Definition: fs_xfa.h:581
This kind of event is triggered just before the rendering for printing begins.
Definition: fs_xfa.h:905
bool SelectAll()
Select all the text of related XFA widget.
bool CanSelectAll()
Check if the text of related XFA widget can be selected all.
virtual WString GetTitle(const XFADoc &doc)=0
A callback function used to get title of current XFA document.
virtual void Release()=0
A callback function used to release current callback object itself.
Message box icon: Status.
Definition: fs_xfa.h:388
Invalidate all pages.
Definition: fs_xfa.h:571
String ID for case: Use string in local language for "Monday".
Definition: fs_xfa.h:315
XFAWidget(const XFAWidget &other)
Constructor, with another XFA widget object.
bool CanCopy()
Check if the text of related XFA widget can be copied.
The submit data is packaged in XFD format, as described in XFDF.
Definition: fs_xfa.h:609
Align the text to the right edge of the available region.
Definition: fs_xfa.h:1496
WString GetName(WidgetNameType type)
Get Widget name.
Sample message: "The value you entered for %s is invalid.".
Definition: fs_xfa.h:361
WString Copy()
Copy the text of related XFA widget.
void ResetForm()
Reset form.
Sample message: "'%s' is not an array".
Definition: fs_xfa.h:277
XFA widget type: password edit.
Definition: fs_xfa.h:1433
bool OnLButtonDoubleClick(const PointF &point, uint32 flags)
Call this function when left mouse button is double-clicked .
Text encoding: UTF-16.
Definition: fs_xfa.h:641
No text encoding.
Definition: fs_xfa.h:621
StringID
Enumeration for string ID used to specify a case.
Definition: fs_xfa.h:159
WidgetMenu(const XFAWidget &xfa_widget)
Constructor, from XFA widget object.
Sample message: "Unknown error is caught!".
Definition: fs_xfa.h:176
The submit data is packaged in PDF format as described in the PDF Reference.
Definition: fs_xfa.h:605
bool OnRButtonDown(const PointF &point, uint32 flags)
Call this function when right mouse is down.
Sample message: "Expected 'endif' instead of '%s'".
Definition: fs_xfa.h:241
String ID for case: Application's name. Sample message: "Foxit Phantom".
Definition: fs_xfa.h:169
Presence property: Hidden. Participate in interaction but not layout or rendering.
Definition: fs_xfa.h:1458
virtual void SetCurrentPage(const XFADoc &doc, int current_page_index)=0
A callback function used to set index of current page.
XFAWidget GetNextWidget(const XFAWidget &widget)
Get the next XFA widget of a specified XFA widget in current tab order.
Message box button ID: No.
Definition: fs_xfa.h:418
TextEncoding
Enumeration for text encoding for XFA submit.
Definition: fs_xfa.h:619
bool Bold()
(Only useful for rich text) Make the rich text bold.
String ID for case: Not allow to modify field. Sample message: "You are not allowed to modify this fi...
Definition: fs_xfa.h:167
Definition: fs_xfa.h:1854
Definition: fs_xfa.h:889
String ID for case: Use string in local language for "Wednesday".
Definition: fs_xfa.h:319
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:212
Sample message: "'%s' operator cannot support array calculation".
Definition: fs_xfa.h:281
Beep type: error.
Definition: fs_xfa.h:143
String ID for case: Use string in local language for "Friday".
Definition: fs_xfa.h:323
Sample message: "Invalid node type: '%s'".
Definition: fs_xfa.h:307
Sample message: "Error:Invalid enumerated value:%s".
Definition: fs_xfa.h:367
Sample message: "Expected operator '%s' instead of '%s'".
Definition: fs_xfa.h:251
bool operator!=(const XFADoc &other) const
Not equal operator.
Application information: name.
Definition: fs_xfa.h:131
virtual WString LoadString(StringID string_id)=0
A callback function used to load a string in local language for a specified case.
File stream interface, reading & writing.
Definition: fx_stream.h:650
virtual bool PutRequestURL(const wchar_t *url, const wchar_t *data, const wchar_t *encode)=0
A callback function used to put data to the given url.
Sample message: "%s cannot be left blank. To ignore validations for %s, click Ignore....
Definition: fs_xfa.h:355
Sample message: "Validate access index '%s' out of array".
Definition: fs_xfa.h:271
WidgetChoiceOption(const WidgetChoiceOption &option)
Constructor, with another choice option object.
Definition: fs_xfa.h:68
If set, print page as image; otherwise, as text.
Definition: fs_xfa.h:589
Beep type: default.
Definition: fs_xfa.h:151
int GetIndex() const
Get index of the XFA page.
bool OnMouseEnter()
Call this function when mouse enters current XFA widget.
void FlattenTo(const char *output_file_path)
Flatten current XFA document to a file.
If set, shrink page to fit within content area.
Definition: fs_xfa.h:587
void ResetData()
Reset XFA Widget Data.
Text encoding: GBK.
Definition: fs_xfa.h:627
Application information: version.
Definition: fs_xfa.h:123
bool Undo()
Undo the operation of related XFA widget. (No effect for rich text)
Definition: fx_basic.h:3736
Sample message: "Invalidate character '%c'".
Definition: fs_xfa.h:223
Type of exported data: XDP.
Definition: fs_xfa.h:933
Egde position: right.
Definition: fs_xfa.h:1522
virtual ARGB GetHighlightColor(const XFADoc &doc)=0
A callback function get the highlight color.
WidgetHAlignType GetHAlign()
Get text horizontal alignment.
Sample message: "Function 's' is built-in.
Definition: fs_xfa.h:289
WString GetValue()
Get the value string.
String ID for case: Use string in local language for "Saturday".
Definition: fs_xfa.h:325
virtual bool SubmitData(const XFADoc &doc, const WString &target, SubmitFormat format, TextEncoding text_encoding, const WString &content)=0
A callback function to submit data.
Center the text horizontally within the available region.
Definition: fs_xfa.h:1486
bool OnKeyUp(uint32 key_code, uint32 flags)
Call this function when key on the keyboard is up.
Sample message: "Cannot modify the '%s' value".
Definition: fs_xfa.h:237
Sample message: "%s.%s cannot covert to object".
Definition: fs_xfa.h:255
String ID for case: Use string in local language for "Sunday".
Definition: fs_xfa.h:313
Beep type: question.
Definition: fs_xfa.h:147
Definition: fs_common.h:465
String ID for case: Server denies. Sample message: "Server does not permit".
Definition: fs_xfa.h:311
foxit::pdf::Signature GetSignature()
Get the signature object from current XFA widget.
XFA document type: Dynamic.
Definition: fs_xfa.h:915
String ID for case: Use string in local language for "May".
Definition: fs_xfa.h:335
Sample message: "Illegal break".
Definition: fs_xfa.h:247
Type of exported data: XML.
Definition: fs_xfa.h:929
virtual void Print(const XFADoc &doc, int start_page_index, int end_page_index, uint32 options)=0
A callback function used to print.
XFA widget type: push button.
Definition: fs_xfa.h:1415
Message box button: OK and Cancel.
Definition: fs_xfa.h:400
Message box button: Yes and No.
Definition: fs_xfa.h:402
virtual void PageViewEvent(int page_index, PageViewEventType page_view_event_type)=0
A callback function to execute page view event.
Sample message: "Unsupported property %s.".
Definition: fs_xfa.h:186
Presence property: Unknown.
Definition: fs_xfa.h:1454
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:198
XFAWidget GetWidgetByFullName(const WString &full_name)
Get the XFA widget which matches the specified full name.
Type
Enumeration for XFA document type.
Definition: fs_xfa.h:913
Sample message: "Invalidate instruction".
Definition: fs_xfa.h:267
Sample message: "The element [%s] has violated its allowable number of occurrences".
Definition: fs_xfa.h:209
bool CanDeSelect()
Check if the selection of the text in related XFA widget can be canceled.
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
bool CanPaste()
Check if the text of related XFA widget can be pasted.
Sample message: "Invalid enumerated value: %s".
Definition: fs_xfa.h:299
bool Paste(const wchar_t *text)
Paste the text to related XFA widget.
XFA widget type: check button.
Definition: fs_xfa.h:1417
Header file for common definitions and classes.
Align the text to the top of the available region.
Definition: fs_xfa.h:1506
MsgBoxButtonType
Enumeration for button type of XFA message box.
Definition: fs_xfa.h:396
Presence property: Invisible. Participate in interaction and layout but not rendering.
Definition: fs_xfa.h:1462
WidgetType GetType()
Get type of XFA widget.
virtual void SetChangeMark(const XFADoc &doc)=0
A callback function used to set change mark flag to current XFA document.
String ID for case: Use string in local language for "January".
Definition: fs_xfa.h:327
Sample message: "Expected identifier instead of '%s'".
Definition: fs_xfa.h:219
Sample message: "Cannot find const '%s'".
Definition: fs_xfa.h:263
Type of exported data: Static XDP.
Definition: fs_xfa.h:931
BeepType
Enumeration for XFA beep type.
Definition: fs_xfa.h:141
XFA document type: Static.
Definition: fs_xfa.h:917
If set, show printing dialog box.
Definition: fs_xfa.h:583
Sample message: "Invalid append operation: %s cannot have a child element of %s".
Definition: fs_xfa.h:301
Sample message: "Unable to set the value for property 'className'".
Definition: fs_xfa.h:211
Hit test area: Client.
Definition: fs_xfa.h:1399
XFADoc & operator=(const XFADoc &other)
Assign operator.
Application information: type.
Definition: fs_xfa.h:133
XFAPage GetPage(int page_index)
Get XFA page by index.
virtual MsgBoxButtonID MsgBox(const wchar_t *message, const wchar_t *title, MsgBoxIconType icon_type, MsgBoxButtonType button_type)=0
A callback function used to set message box.
Text encoding: font specific.
Definition: fs_xfa.h:625
Text encoding: Big5.
Definition: fs_xfa.h:623
String ID for case: Use string in local language for "August".
Definition: fs_xfa.h:341
If set, print annotations.
Definition: fs_xfa.h:593
XFAWidget GetWidget(int widget_index) const
Get XFA widget by index.
virtual bool GetPopupPos(int page_index, float min_popup, float max_popup, const RectF &rect_widget, RectF &inout_rect_popup)=0
A callback function used to get the pop-up position.
Definition: fs_basictypes.h:375
int GetWidgetCount() const
Get the count of XFA widget.
Sample message: "Expected '%s' instead of '%s'".
Definition: fs_xfa.h:221
Sample message: "Unable to set the value for property 'version'".
Definition: fs_xfa.h:205
virtual void WidgetEvent(const XFAWidget &xfa_widget, WidgetEventType widget_event_type)=0
A callback function to execute XFA widget event.
bool selected
Used to indicate whether the option is selected or not.
Definition: fs_xfa.h:103
bool OnRButtonUp(const PointF &point, uint32 flags)
Call this function when right button is up.
bool DeSelect()
Cancel the selection of the text in related XFA widget.
bool operator==(const XFAPage &other) const
Equal operator.
XFA widget type: Exclusion Group for radio button only.
Definition: fs_xfa.h:1443
Sample message: "Compiler error".
Definition: fs_xfa.h:235
Sample message: "Value!".
Definition: fs_xfa.h:180
Sample message: "Invalidate expression '%s'".
Definition: fs_xfa.h:229
Message box button: OK.
Definition: fs_xfa.h:398
Sample message: "Cannot find method '%s'".
Definition: fs_xfa.h:261
String ID for case: Use string in local language for "April".
Definition: fs_xfa.h:333
virtual WStringArray ShowFileDialog(const wchar_t *string_title, const wchar_t *string_filter, bool is_openfile_dialog)=0
A callback function used to show file dialog.
bool operator!=(const XFAPage &other) const
Not equal operator.
Invalidate current page.
Definition: fs_xfa.h:573
Left-align the last line and spread-justify the rest.
Definition: fs_xfa.h:1488
Sample message: "Calculate Override".
Definition: fs_xfa.h:163
HitTestArea
Enumeration for hit test area of XFA widget.
Definition: fs_xfa.h:1395
Sample message: "Divide by zero".
Definition: fs_xfa.h:253
Sample message: "Message limit exceeded. Remaining %d validation errors not reported....
Definition: fs_xfa.h:353
String ID for case: Use string in local language for "March".
Definition: fs_xfa.h:331
WidgetChoiceOption & operator=(const WidgetChoiceOption &option)
Assign operator.
Definition: fs_xfa.h:79
XFADoc(const pdf::PDFDoc &document, DocProviderCallback *xfa_doc_provider_handler)
Constructor.
String ID for case: Some setting operation to property is invalid. Sample message: "Invalid property ...
Definition: fs_xfa.h:191
WidgetEdgePosition
Enumeration for the positon of XFA widget edge position.
Definition: fs_xfa.h:1518
Text encoding: UCS-2.
Definition: fs_xfa.h:639
String ID for case: Use string in local language for "June".
Definition: fs_xfa.h:337
Rotation
Enumeration for rotation.
Definition: fs_common.h:275
If set, that means printing process can be canceled.
Definition: fs_xfa.h:585
Foxit namespace.
Definition: fs_compare.h:27
Text encoding: KSC5601.
Definition: fs_xfa.h:635
Sample message: "Invalidate left-value '%s'".
Definition: fs_xfa.h:233
virtual common::file::ReaderCallback * DownLoadUrl(const wchar_t *url)=0
A callback function used to download from specified URL.
virtual void GotoURL(const XFADoc &doc, const WString &url)=0
A callback function used to go to a specified URL.
String ID for case: Filter for image files. Sample message: "Image Files(*.bmp;*.jpg;*....
Definition: fs_xfa.h:174
RectF GetRect()
Get rectangle of XFA widget.
virtual WString GetAppInfo(AppInfo app_info)=0
A callback function used to get application information for a specified information type.
WString Cut()
Cut the text of related XFA widget.
Event type: all page views are removed.
Definition: fs_xfa.h:657
virtual WString PostRequestURL(const wchar_t *url, const wchar_t *data, const wchar_t *content_type, const wchar_t *encode, const wchar_t *header)=0
A callback function used to post data to the given url.
Event type: Unknown.
Definition: fs_xfa.h:898
Application information: language.
Definition: fs_xfa.h:125
bool Superscript()
(Only useful for rich text) Make the rich text as superscript.
bool CanUndo()
Check if the operation of related XFA widget can be undone.
MsgBoxButtonID
Enumeration for button ID of XFA message box.
Definition: fs_xfa.h:412
Application information: platform.
Definition: fs_xfa.h:127
Application information: variation.
Definition: fs_xfa.h:129
Sample message: "'%s' function's %d argument cannot be array".
Definition: fs_xfa.h:283
ExportDataType
Enumeration for the type of exported data.
Definition: fs_xfa.h:927
String ID for case: Use string in local language for "February".
Definition: fs_xfa.h:329
Align the text to the bottom of the available region.
Definition: fs_xfa.h:1508
Egde position: left.
Definition: fs_xfa.h:1526
Spread-justify all lines to fill the available region.
Definition: fs_xfa.h:1490
Sample message: "%s cannot be left blank.".
Definition: fs_xfa.h:357
Sample message: "Expected number instead of '%s'".
Definition: fs_xfa.h:269
Sample message: "Undefined identifier '%s'".
Definition: fs_xfa.h:231
Sample message: "%s : %s".
Definition: fs_xfa.h:291
#define NULL
The null-pointer value.
Definition: fx_system.h:771
Definition: fs_signature.h:93
Hit test area: HyperLink.
Definition: fs_xfa.h:1403
bool ClearStyle()
(Only useful for rich text) Clear the style of the rich text.
Definition: fx_coordinates.h:1056
bool operator==(const XFADoc &other) const
Equal operator.
Event type: before an XFA widget is removed.
Definition: fs_xfa.h:669
XFA widget type: radio button.
Definition: fs_xfa.h:1435
bool operator!=(const XFAWidget &other) const
Not equal operator.
Sample message: "At least one required field was empty. Please fill in the required fields(highlighte...
Definition: fs_xfa.h:372
WidgetChoiceOption(const wchar_t *option_label, bool selected)
Constructor, with parameters.
Definition: fs_xfa.h:59
Sample message: "Cannot find container '%s'".
Definition: fs_xfa.h:257
bool CanRedo()
Check if the operation of related XFA widget can be redone.
void KillFocus()
Kill the focus of XFA widget.
Sample message: "Cannot directly assign the value to object".
Definition: fs_xfa.h:265
Text encoding: ShiftJIS.
Definition: fs_xfa.h:637
bool IsEmpty() const
Check whether current object is empty or not.
Sample message: "Cannot assign to '%s'".
Definition: fs_xfa.h:273
Sample message: "Function '%s' does not have %d parameters".
Definition: fs_xfa.h:239
Sample message: "'%s' doesn't have property '%s'".
Definition: fs_xfa.h:305
Message box icon: Warning.
Definition: fs_xfa.h:384
Beep type: status.
Definition: fs_xfa.h:149
Name type: caption name. Name in this type will be retrieved from caption entry.
Definition: fs_xfa.h:1474
Text encoding: ISO8859NN.
Definition: fs_xfa.h:633
void ProcessEvent(EventType event_type)
Process a kind of event for all the XFA widgets in current XFA document.
void SetFocus(XFAWidget xfa_widget)
Set the focus of XFA widget.
bool IsChecked() const
Check if current XFA widget is checked when it is a check box or a radio button.
Sample message: "Illegal value:cannot assign '%s' to %s.".
Definition: fs_xfa.h:363
bool operator==(const WidgetMenu &other) const
Equal operator.
Sample message: "Unable to set".
Definition: fs_xfa.h:178
virtual void Release()=0
A callback function used to release current callback object itself.
String ID for case: Use string in local language for "Today".
Definition: fs_xfa.h:351
Sample message: "Unexpected expression '%s'".
Definition: fs_xfa.h:243
Sample message: "Incorrect number of parameters are used when calling method '%s'".
Definition: fs_xfa.h:295
float GetWidth() const
Get the width.
bool IsEmpty() const
Check whether current object is empty or not.
The submit data is packaged in XDP format, as described in XDP Specification.
Definition: fs_xfa.h:603
XFAWidget GetLastWidget()
Get the last XFA widget in current tab order.
String ID for case: Some enumerate value is invalid. Sample message: "Invalid enumerate value:".
Definition: fs_xfa.h:182
Type GetType() const
Get the XFA document type.
SubmitFormat
Enumeration for XFA submit format.
Definition: fs_xfa.h:601
virtual bool PopupMenu(int page_index, const PointF &rect_popup)=0
A callback function used to pop up the context menu.
Definition: fx_coordinates.h:766
XFAWidget GetFirstWidget()
Get the first XFA widget in current tab order.
Hit test area: Unknown.
Definition: fs_xfa.h:1397
XFA document type: XDP, as Raw XML data.
Definition: fs_xfa.h:919
XFA widget type: choice list.
Definition: fs_xfa.h:1427
Event type: after a page view is added.
Definition: fs_xfa.h:653
Text encoding: UTF-8.
Definition: fs_xfa.h:643