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 common {
28  class Bitmap;
29 }
30 
31 namespace pdf{
32 class Signature;
33 class PDFDoc;
34 }
35 
39 namespace addon {
43 namespace xfa {
44 class XFADoc;
45 class XFAPage;
46 class XFAWidget;
47 
49 class WidgetChoiceOption FS_FINAL : public Object {
50  public:
54  , selected(false){}
55 
65  , selected(selected){}
66 
73  : option_label(option.option_label)
74  , selected(option.selected){}
75 
84  option_label = option.option_label;
85  selected = option.selected;
86  return *this;
87  }
88 
98  void Set( const wchar_t* option_label, bool selected) {
99  this->option_label = option_label;
100  this->selected = selected;
101  }
102 
105 
107  bool selected;
108 };
109 
112 
119  public:
125  typedef enum _AppInfo {
138  } AppInfo;
139 
145  typedef enum _BeepType {
156  } BeepType;
157 
163  typedef enum _StringID {
381  } StringID;
382 
388  typedef enum _MsgBoxIconType {
397  } MsgBoxIconType;
398 
404  typedef enum _MsgBoxButtonType {
414 
420  typedef enum _MsgBoxButtonID {
429  } MsgBoxButtonID;
430 
431 
437  virtual void Release() = 0;
438 
448  virtual WString GetAppInfo(AppInfo app_info) = 0;
449 
458  virtual void Beep(BeepType type) = 0;
459 
473  virtual MsgBoxButtonID MsgBox(const wchar_t* message, const wchar_t* title, MsgBoxIconType icon_type,
474  MsgBoxButtonType button_type) = 0;
475 
488  virtual WString Response(const wchar_t* question, const wchar_t* title, const wchar_t* default_answer,
489  bool is_mask) = 0;
490 
498  virtual common::file::ReaderCallback* DownLoadUrl(const wchar_t* url) = 0;
499 
514  virtual WString PostRequestURL(const wchar_t* url, const wchar_t* data, const wchar_t* content_type,
515  const wchar_t* encode, const wchar_t* header) = 0;
516 
527  virtual bool PutRequestURL(const wchar_t* url, const wchar_t* data, const wchar_t* encode) = 0;
528 
546  virtual WString LoadString(StringID string_id) = 0;
547 
558  virtual WStringArray ShowFileDialog(const wchar_t* string_title, const wchar_t* string_filter,
559  bool is_openfile_dialog) = 0;
560 
561  protected:
562  ~AppProviderCallback() {}
563 };
564 
571  public:
577  typedef enum _InvalidateFlag {
582  } InvalidateFlag;
583 
589  typedef enum _PrintOption {
597  e_PrintOptionAsImage = 0x00000008,
602  } PrintOption;
603 
609  typedef enum _SubmitFormat {
620  } SubmitFormat;
621 
627  typedef enum _TextEncoding {
652  } TextEncoding;
653 
659  typedef enum _PageViewEventType {
667 
673  typedef enum _WidgetEventType {
678  } WidgetEventType;
679 
680 
686  virtual void Release() = 0;
687 
700  virtual void InvalidateRect(int page_index, const RectF& rect, InvalidateFlag flag) = 0;
701 
712  virtual void DisplayCaret(int page_index, bool is_visible, const RectF& rect) = 0;
713 
728  virtual bool GetPopupPos(int page_index, float min_popup, float max_popup,
729  const RectF& rect_widget, RectF& inout_rect_popup) = 0;
730 
739  virtual bool PopupMenu(int page_index, const PointF& rect_popup) = 0;
740 
748  virtual int GetCurrentPage(const XFADoc& doc) = 0;
749 
758  virtual void SetCurrentPage(const XFADoc& doc, int current_page_index) = 0;
759 
767  virtual void SetChangeMark(const XFADoc& doc) = 0;
768 
776  virtual WString GetTitle(const XFADoc& doc) = 0;
777 
785  virtual void SetFocus(XFAWidget& xfa_widget) = 0;
786 
797  virtual void ExportData(const XFADoc& doc, const WString& file_path) = 0;
798 
809  virtual void ImportData(const XFADoc& doc, const WString& file_path) = 0;
810 
819  virtual void GotoURL(const XFADoc& doc, const WString& url) = 0;
820 
833  virtual void Print(const XFADoc& doc, int start_page_index, int end_page_index, uint32 options) = 0;
834 
842  virtual ARGB GetHighlightColor(const XFADoc& doc) = 0;
843 
857  virtual bool SubmitData(const XFADoc& doc, const WString& target, SubmitFormat format, TextEncoding text_encoding,
858  const WString& content) = 0;
859 
870  virtual void PageViewEvent(int page_index, PageViewEventType page_view_event_type) = 0;
871 
882  virtual void WidgetEvent(const XFAWidget& xfa_widget,WidgetEventType widget_event_type) = 0;
883 
884  protected:
885  ~DocProviderCallback() {}
886 };
887 
897 class XFADoc FS_FINAL : public Base{
898  public:
904  typedef enum _EventType {
914  } EventType;
915 
921  typedef enum _Type {
925  e_Static = 1,
927  e_XDP = 2
928  } Type;
929 
935  typedef enum _ExportDataType {
942  } ExportDataType;
943 
944 
958  XFADoc(const pdf::PDFDoc& document, DocProviderCallback* xfa_doc_provider_handler);
959 
972  XFADoc(const foxit::pdf::PDFDoc& document);
973 
979  XFADoc(const XFADoc& other);
987  XFADoc& operator = (const XFADoc& other);
988 
996  bool operator == (const XFADoc& other) const;
997 
1005  bool operator != (const XFADoc& other) const;
1006 
1014  bool IsEmpty() const;
1015 
1017  ~XFADoc();
1018 
1037 
1049 
1056  Type GetType() const;
1057 
1063  int GetPageCount() const;
1064 
1073  XFAPage GetPage(int page_index);
1074 
1084  bool ExportData(const char* output_file_path, ExportDataType export_type);
1085 
1095  bool ExportData(const wchar_t* output_file_path, ExportDataType export_type);
1096 
1107  void SetPDFPath(const char* pdf_file_path);
1108 
1119  void SetPDFPath(const wchar_t* pdf_file_path);
1120 
1129  bool ImportData(const char* file_path);
1130 
1139  bool ImportData(const wchar_t* file_path);
1140 
1146  void ResetForm();
1147 
1155  void FlattenTo(const char* output_file_path);
1156 
1164  void FlattenTo(const wchar_t* output_file_path);
1165 
1174 
1183  void ProcessEvent(EventType event_type);
1184 
1192  void SetFocus(XFAWidget xfa_widget);
1193 
1199  void KillFocus();
1200 
1214  XFAWidget GetWidgetByFullName(const WString& full_name);
1215 
1216  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1217  explicit XFADoc(FS_HANDLE handle = NULL);
1218 };
1219 
1226 class XFAPage FS_FINAL : public Base{
1227  public:
1233  XFAPage(const XFAPage& other);
1241  XFAPage& operator = (const XFAPage& other);
1242 
1250  bool operator == (const XFAPage& other) const;
1258  bool operator != (const XFAPage& other) const;
1259 
1261  ~XFAPage();
1262 
1270  bool IsEmpty() const;
1271 
1285  Matrix GetDisplayMatrix(int left, int top, int width, int height, common::Rotation rotate);
1286 
1292  float GetWidth() const;
1293 
1299  float GetHeight() const;
1300 
1311  XFAWidget GetWidgetAtDevicePoint(const Matrix& matrix, const PointF& device_point, float tolerance);
1312 
1318  int GetIndex() const;
1319 
1325  int GetWidgetCount() const;
1326 
1335  XFAWidget GetWidget(int widget_index) const;
1336 
1346  XFAWidget GetWidgetByFullName(const WString& full_name);
1347 
1355 
1363 
1373  XFAWidget GetNextWidget(const XFAWidget& widget);
1374 
1384  XFAWidget GetPrevWidget(const XFAWidget& widget);
1385 
1386  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1387  explicit XFAPage(FS_HANDLE handle = NULL);
1388 };
1389 
1396 class XFAWidget FS_FINAL : public Base{
1397  public:
1403  typedef enum _HitTestArea {
1412  } HitTestArea;
1413 
1419  typedef enum _WidgetType {
1454  } WidgetType;
1455 
1462  typedef enum _PresenceProperty {
1473  } PresenceProperty;
1474 
1480  typedef enum _WidgetNameType {
1487  } WidgetNameType;
1488 
1494  typedef enum _WidgetHAlignType {
1507  } WidgetHAlignType;
1508 
1514  typedef enum _WidgetVAlignType {
1521  } WidgetVAlignType;
1522 
1528  typedef enum _WidgetEdgePosition {
1538 
1539 
1545  XFAWidget(const XFAWidget& other);
1553  XFAWidget& operator = (const XFAWidget& other);
1554 
1562  bool operator == (const XFAWidget& other) const;
1570  bool operator != (const XFAWidget& other) const;
1571 
1579  bool IsEmpty() const;
1580 
1582  ~XFAWidget();
1583 
1589  XFAPage GetXFAPage();
1590 
1596  int GetIndex() const;
1597 
1603  void ResetData();
1604 
1613  RectF GetRect();
1614 
1620  WString GetValue();
1621 
1629  void SetValue(const wchar_t* value);
1630 
1640 
1650 
1659  bool IsChecked() const;
1660 
1669 
1675  bool OnMouseEnter();
1676 
1682  bool OnMouseExit();
1683 
1694  bool OnLButtonDown(const PointF& point, uint32 flags);
1695 
1706  bool OnLButtonUp(const PointF& point, uint32 flags);
1707 
1718  bool OnLButtonDoubleClick(const PointF& point, uint32 flags);
1719 
1730  bool OnMouseMove(const PointF& point, uint32 flags);
1731 
1742  bool OnRButtonDown(const PointF& point, uint32 flags);
1743 
1754  bool OnRButtonUp(const PointF& point, uint32 flags);
1755 
1768  bool OnKeyDown(uint32 key_code, uint32 flags);
1769 
1782  bool OnKeyUp(uint32 key_code, uint32 flags);
1783 
1794  bool OnChar(int input_char, uint32 flags);
1795 
1804  HitTestArea OnHitTest(const PointF& point);
1805 
1812  WidgetType GetType();
1813 
1821 
1829 
1838  bool HasEdge(WidgetEdgePosition edge_pos);
1839 
1849 
1855  WString GetToolTip();
1856 
1867 
1868  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1869  explicit XFAWidget(FS_HANDLE handle = NULL);
1870 };
1871 
1875 class WidgetMenu FS_FINAL : public Base {
1876  public:
1882  explicit WidgetMenu(const XFAWidget& xfa_widget);
1883 
1889  WidgetMenu(const WidgetMenu& other);
1897  WidgetMenu& operator = (const WidgetMenu& other);
1898 
1906  bool operator == (const WidgetMenu& other) const;
1914  bool operator != (const WidgetMenu& other) const;
1915 
1917  ~WidgetMenu();
1918 
1926  bool IsEmpty() const;
1927 
1933  bool CanCopy();
1934 
1940  bool CanCut();
1941 
1947  bool CanPaste();
1948 
1954  bool CanSelectAll();
1955 
1961  bool CanDelete();
1962 
1969  bool CanDeSelect();
1970 
1976  WString Copy();
1977 
1983  WString Cut();
1984 
1992  bool Paste(const wchar_t* text);
1993 
1999  bool SelectAll();
2000 
2006  bool Delete();
2007 
2013  bool DeSelect();
2014 
2021  bool CanUndo();
2022 
2029  bool CanRedo();
2030 
2036  bool Undo();
2037 
2043  bool Redo();
2044 
2050  bool Bold();
2051 
2057  bool Italic();
2058 
2064  bool Underline();
2065 
2071  bool Superscript();
2072 
2078  bool Subscript();
2079 
2085  bool ClearStyle();
2086 
2087  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2088  explicit WidgetMenu(FS_HANDLE handle = NULL);
2089 };
2090 } // namespace XFA
2091 } // namespace addon
2092 } // namespace foxit
2093 #endif // namespace foxit
2094 
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:201
int GetIndex() const
Get the index of XFA Widget in related XFA page.
Message box icon: Question.
Definition: fs_xfa.h:394
Message box button ID: Cancel.
Definition: fs_xfa.h:424
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:369
If set, print page in reverse order; otherwise, in normal order.
Definition: fs_xfa.h:599
XFA widget type: date time edit.
Definition: fs_xfa.h:1429
Sample message: "The element [%s] has violated its allowable number of occurrences".
Definition: fs_xfa.h:313
PresenceProperty
Enumeration for presence attribute of XFA widget.
Definition: fs_xfa.h:1462
void SetValue(const wchar_t *value)
Set the value string.
Sample message: "Bad suffix on number".
Definition: fs_xfa.h:221
Sample message: "SOM expression returned list when single result was expected".
Definition: fs_xfa.h:307
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:321
Sample message: "Condition is null".
Definition: fs_xfa.h:249
void SetDocProviderCallback(foxit::addon::xfa::DocProviderCallback *doc_provider_callback)
Set XFA document provider callback.
Sample message: "Unsupported method %s.".
Definition: fs_xfa.h:188
XFA widget type: rectangle.
Definition: fs_xfa.h:1445
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:911
The submit data is packaged in URL-encoded format as described in Uniform Resource Locator(URL).
Definition: fs_xfa.h:615
XFA widget type: barcode.
Definition: fs_xfa.h:1421
XFA widget type: unknown.
Definition: fs_xfa.h:1449
bool OnLButtonUp(const PointF &point, uint32 flags)
Call this function when left mouse button is up.
XFA widget type: arc.
Definition: fs_xfa.h:1427
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:1480
Sample message: "An attempt was made to reference property '%s' of a non-object in SOM expression %s"...
Definition: fs_xfa.h:291
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:363
void Set(const wchar_t *option_label, bool selected)
Set value.
Definition: fs_xfa.h:98
Definition: fs_image.h:36
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:253
WidgetHAlignType
Enumeration for the type of text horizontal alignment of XFA widget.
Definition: fs_xfa.h:1494
Text encoding: GB18030.
Definition: fs_xfa.h:637
HitTestArea OnHitTest(const PointF &point)
Call this function to do hit test for a specified point.
XFA widget type: signature.
Definition: fs_xfa.h:1433
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:297
Sample message: "Unable to set the value for property 'length'".
Definition: fs_xfa.h:217
Sample message: "Invalidate token '%s'".
Definition: fs_xfa.h:231
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:659
String ID for case: Use string in local language for "July".
Definition: fs_xfa.h:343
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:169
WidgetEventType
Enumeration for the type of XFA widget event.
Definition: fs_xfa.h:673
Message box button ID: OK.
Definition: fs_xfa.h:422
CFX_Object Object
Object type.
Definition: fs_basictypes.h:217
Sample message: "Unable to set the value for property 'variation'".
Definition: fs_xfa.h:207
Sample message: "Cannot find function '%s'".
Definition: fs_xfa.h:279
WidgetType
Enumeration for the type of XFA widget.
Definition: fs_xfa.h:1419
Sample message: "Validate failed".
Definition: fs_xfa.h:165
The submit data is translated and packaged into an URL-Encoded format.
Definition: fs_xfa.h:619
XFA widget type: line.
Definition: fs_xfa.h:1439
bool HasEdge(WidgetEdgePosition edge_pos)
Check if the edge for specified position exists.
Sample message: "Not have a default property".
Definition: fs_xfa.h:197
WidgetVAlignType
Enumeration for the type of text vertical alignment of XFA widget.
Definition: fs_xfa.h:1514
bool Redo()
Redo the operation of related XFA widget. (No effect for rich text)
Sample message: "Unable to set the value for property 'ready'".
Definition: fs_xfa.h:211
XFAPage GetXFAPage()
Get the related XFA page, to which current XFA widget belongs.
Definition: fs_xfa.h:1226
InvalidateFlag
Enumeration for XFA invalidate flag.
Definition: fs_xfa.h:577
foxit::common::Bitmap GetBitmap()
Get the bitmap of current XFA widget.
Presence property: Inactive. Do not participate in interaction, layout, or rendering.
Definition: fs_xfa.h:1470
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:104
Sample message: "Out of the range of '%s' array".
Definition: fs_xfa.h:283
Sample message: "Unable to set the value for property 'validationsEnabled'".
Definition: fs_xfa.h:205
Definition: fs_basictypes.h:224
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:353
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:390
Egde position: top.
Definition: fs_xfa.h:1530
String ID for case: Use string in local language for "Thursday".
Definition: fs_xfa.h:325
Definition: fx_coordinates.h:30
Sample message: "Unable to set the value for property 'platform'".
Definition: fs_xfa.h:203
Message box button ID: Yes.
Definition: fs_xfa.h:428
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:349
Message box button: Yes, No and Cancel.
Definition: fs_xfa.h:412
Align the radix indicator.
Definition: fs_xfa.h:1504
Definition: fs_xfa.h:1396
Event type: after a page view is removed.
Definition: fs_xfa.h:663
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:1502
File reading interface.
Definition: fx_stream.h:566
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:1437
bool Underline()
(Only useful for rich text) Underline the rich text.
AppInfo
Enumeration for XFA application information type.
Definition: fs_xfa.h:125
Sample message: "Error:Argument mismatch in property or function argument.".
Definition: fs_xfa.h:380
Presence property: Visible. Participate in interaction, layout, and rendering.
Definition: fs_xfa.h:1466
MsgBoxIconType
Enumeration for icon type of XFA message box.
Definition: fs_xfa.h:388
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:149
Text encoding: GB2312.
Definition: fs_xfa.h:639
WidgetChoiceOption()
Constructor.
Definition: fs_xfa.h:52
WIDE STRING CLASS.
Definition: fx_string.h:1452
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:1534
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:1486
String ID for case: Use string in local language for "November".
Definition: fs_xfa.h:351
Hit test area: Title Bar.
Definition: fs_xfa.h:1409
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:263
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:199
Definition: fs_pdfdoc.h:389
XFA widget type: text edit.
Definition: fs_xfa.h:1447
bool operator !=(const WidgetMenu &other) const
Not equal operator.
XFA widget type: numeric edit.
Definition: fs_xfa.h:1431
bool Delete()
Delete all the text of related XFA widget.
Sample message: "'%s' redefinition".
Definition: fs_xfa.h:229
Event type: after an XFA widget is added.
Definition: fs_xfa.h:675
Sample message: "'%s' argument is expected to be a container".
Definition: fs_xfa.h:289
Name type: field name. Name in this type will be retrieved from XFA widget's name entry and this may ...
Definition: fs_xfa.h:1482
EventType
Enumeration for XFA event type.
Definition: fs_xfa.h:904
Sample message: "Argument mismatch in property or function argument".
Definition: fs_xfa.h:301
Sample message: "Unsupported character '%c'".
Definition: fs_xfa.h:219
Align the text so that it is centered between the top and bottom of the available region.
Definition: fs_xfa.h:1520
String ID for case: Use string in local language for "September".
Definition: fs_xfa.h:347
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:589
This kind of event is triggered just before the rendering for printing begins.
Definition: fs_xfa.h:913
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:396
Invalidate all pages.
Definition: fs_xfa.h:579
String ID for case: Use string in local language for "Monday".
Definition: fs_xfa.h:319
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:617
Align the text to the right edge of the available region.
Definition: fs_xfa.h:1506
WString GetName(WidgetNameType type)
Get Widget name.
Sample message: "The value you entered for %s is invalid.".
Definition: fs_xfa.h:365
WString Copy()
Copy the text of related XFA widget.
void ResetForm()
Reset form.
Sample message: "'%s' is not an array".
Definition: fs_xfa.h:281
XFA widget type: password edit.
Definition: fs_xfa.h:1441
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:649
No text encoding.
Definition: fs_xfa.h:629
StringID
Enumeration for string ID used to specify a case.
Definition: fs_xfa.h:163
WidgetMenu(const XFAWidget &xfa_widget)
Constructor, from XFA widget object.
Sample message: "Unknown error is caught!".
Definition: fs_xfa.h:180
The submit data is packaged in PDF format as described in the PDF Reference.
Definition: fs_xfa.h:613
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:245
String ID for case: Application's name. Sample message: "Foxit Phantom".
Definition: fs_xfa.h:173
Presence property: Hidden. Participate in interaction but not layout or rendering.
Definition: fs_xfa.h:1468
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:426
TextEncoding
Enumeration for text encoding for XFA submit.
Definition: fs_xfa.h:627
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:171
Definition: fs_xfa.h:1875
Definition: fs_xfa.h:897
String ID for case: Use string in local language for "Wednesday".
Definition: fs_xfa.h:323
bool operator !=(const XFADoc &other) const
Not equal operator.
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:210
Sample message: "'%s' operator cannot support array calculation".
Definition: fs_xfa.h:285
Beep type: error.
Definition: fs_xfa.h:147
String ID for case: Use string in local language for "Friday".
Definition: fs_xfa.h:327
Sample message: "Invalid node type: '%s'".
Definition: fs_xfa.h:311
Sample message: "Error:Invalid enumerated value:%s".
Definition: fs_xfa.h:371
Sample message: "Expected operator '%s' instead of '%s'".
Definition: fs_xfa.h:255
Application information: name.
Definition: fs_xfa.h:135
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:669
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:359
Sample message: "Validate access index '%s' out of array".
Definition: fs_xfa.h:275
WidgetChoiceOption(const WidgetChoiceOption &option)
Constructor, with another choice option object.
Definition: fs_xfa.h:72
If set, print page as image; otherwise, as text.
Definition: fs_xfa.h:597
Beep type: default.
Definition: fs_xfa.h:155
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:595
void ResetData()
Reset XFA Widget Data.
Text encoding: GBK.
Definition: fs_xfa.h:635
Application information: version.
Definition: fs_xfa.h:127
bool Undo()
Undo the operation of related XFA widget. (No effect for rich text)
Definition: fx_basic.h:3752
Sample message: "Invalidate character '%c'".
Definition: fs_xfa.h:227
Type of exported data: XDP.
Definition: fs_xfa.h:941
Egde position: right.
Definition: fs_xfa.h:1532
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:293
WString GetValue()
Get the value string.
String ID for case: Use string in local language for "Saturday".
Definition: fs_xfa.h:329
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:1496
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:241
Sample message: "%s.%s cannot covert to object".
Definition: fs_xfa.h:259
String ID for case: Use string in local language for "Sunday".
Definition: fs_xfa.h:317
Beep type: question.
Definition: fs_xfa.h:151
Definition: fs_common.h:281
String ID for case: Server denies. Sample message: "Server does not permit".
Definition: fs_xfa.h:315
foxit::pdf::Signature GetSignature()
Get the signature object from current XFA widget.
XFA document type: Dynamic.
Definition: fs_xfa.h:923
String ID for case: Use string in local language for "May".
Definition: fs_xfa.h:339
Sample message: "Illegal break".
Definition: fs_xfa.h:251
Type of exported data: XML.
Definition: fs_xfa.h:937
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:1423
Message box button: OK and Cancel.
Definition: fs_xfa.h:408
Message box button: Yes and No.
Definition: fs_xfa.h:410
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:190
Presence property: Unknown.
Definition: fs_xfa.h:1464
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:196
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:921
Sample message: "Invalidate instruction".
Definition: fs_xfa.h:271
Sample message: "The element [%s] has violated its allowable number of occurrences".
Definition: fs_xfa.h:213
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:214
bool CanPaste()
Check if the text of related XFA widget can be pasted.
Sample message: "Invalid enumerated value: %s".
Definition: fs_xfa.h:303
bool Paste(const wchar_t *text)
Paste the text to related XFA widget.
XFA widget type: check button.
Definition: fs_xfa.h:1425
Header file for common definitions and classes.
Align the text to the top of the available region.
Definition: fs_xfa.h:1516
MsgBoxButtonType
Enumeration for button type of XFA message box.
Definition: fs_xfa.h:404
Presence property: Invisible. Participate in interaction and layout but not rendering.
Definition: fs_xfa.h:1472
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:331
bool operator !=(const XFAWidget &other) const
Not equal operator.
Sample message: "Expected identifier instead of '%s'".
Definition: fs_xfa.h:223
Sample message: "Cannot find const '%s'".
Definition: fs_xfa.h:267
Type of exported data: Static XDP.
Definition: fs_xfa.h:939
BeepType
Enumeration for XFA beep type.
Definition: fs_xfa.h:145
XFA document type: Static.
Definition: fs_xfa.h:925
If set, show printing dialog box.
Definition: fs_xfa.h:591
Sample message: "Invalid Barcode Value: %s is an invalid value for barcodes of type %s....
Definition: fs_xfa.h:378
bool operator !=(const XFAPage &other) const
Not equal operator.
Sample message: "Invalid append operation: %s cannot have a child element of %s".
Definition: fs_xfa.h:305
Sample message: "Unable to set the value for property 'className'".
Definition: fs_xfa.h:215
Hit test area: Client.
Definition: fs_xfa.h:1407
XFADoc & operator=(const XFADoc &other)
Assign operator.
Application information: type.
Definition: fs_xfa.h:137
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:633
Text encoding: Big5.
Definition: fs_xfa.h:631
String ID for case: Use string in local language for "August".
Definition: fs_xfa.h:345
If set, print annotations.
Definition: fs_xfa.h:601
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:397
int GetWidgetCount() const
Get the count of XFA widget.
Sample message: "Expected '%s' instead of '%s'".
Definition: fs_xfa.h:225
Sample message: "Unable to set the value for property 'version'".
Definition: fs_xfa.h:209
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:107
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:1451
Sample message: "Compiler error".
Definition: fs_xfa.h:239
Sample message: "Value!".
Definition: fs_xfa.h:184
Sample message: "Invalidate expression '%s'".
Definition: fs_xfa.h:233
Message box button: OK.
Definition: fs_xfa.h:406
Sample message: "Cannot find method '%s'".
Definition: fs_xfa.h:265
String ID for case: Use string in local language for "April".
Definition: fs_xfa.h:337
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.
Invalidate current page.
Definition: fs_xfa.h:581
Left-align the last line and spread-justify the rest.
Definition: fs_xfa.h:1498
Sample message: "Calculate Override".
Definition: fs_xfa.h:167
HitTestArea
Enumeration for hit test area of XFA widget.
Definition: fs_xfa.h:1403
Sample message: "Divide by zero".
Definition: fs_xfa.h:257
Sample message: "Message limit exceeded. Remaining %d validation errors not reported....
Definition: fs_xfa.h:357
String ID for case: Use string in local language for "March".
Definition: fs_xfa.h:335
WidgetChoiceOption & operator=(const WidgetChoiceOption &option)
Assign operator.
Definition: fs_xfa.h:83
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:195
WidgetEdgePosition
Enumeration for the positon of XFA widget edge position.
Definition: fs_xfa.h:1528
Text encoding: UCS-2.
Definition: fs_xfa.h:647
String ID for case: Use string in local language for "June".
Definition: fs_xfa.h:341
Rotation
Enumeration for rotation.
Definition: fs_common.h:56
If set, that means printing process can be canceled.
Definition: fs_xfa.h:593
Foxit namespace.
Definition: fs_compare.h:27
Text encoding: KSC5601.
Definition: fs_xfa.h:643
Sample message: "Invalidate left-value '%s'".
Definition: fs_xfa.h:237
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:178
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:665
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:906
Application information: language.
Definition: fs_xfa.h:129
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:420
Application information: platform.
Definition: fs_xfa.h:131
Application information: variation.
Definition: fs_xfa.h:133
Sample message: "'%s' function's %d argument cannot be array".
Definition: fs_xfa.h:287
ExportDataType
Enumeration for the type of exported data.
Definition: fs_xfa.h:935
String ID for case: Use string in local language for "February".
Definition: fs_xfa.h:333
Align the text to the bottom of the available region.
Definition: fs_xfa.h:1518
Egde position: left.
Definition: fs_xfa.h:1536
Spread-justify all lines to fill the available region.
Definition: fs_xfa.h:1500
Sample message: "%s cannot be left blank.".
Definition: fs_xfa.h:361
Sample message: "Expected number instead of '%s'".
Definition: fs_xfa.h:273
Sample message: "Undefined identifier '%s'".
Definition: fs_xfa.h:235
Sample message: "%s : %s".
Definition: fs_xfa.h:295
#define NULL
The null-pointer value.
Definition: fx_system.h:767
Definition: fs_signature.h:93
Hit test area: HyperLink.
Definition: fs_xfa.h:1411
bool ClearStyle()
(Only useful for rich text) Clear the style of the rich text.
Definition: fx_coordinates.h:1076
bool operator==(const XFADoc &other) const
Equal operator.
Event type: before an XFA widget is removed.
Definition: fs_xfa.h:677
XFA widget type: radio button.
Definition: fs_xfa.h:1443
Sample message: "At least one required field was empty. Please fill in the required fields(highlighte...
Definition: fs_xfa.h:376
WidgetChoiceOption(const wchar_t *option_label, bool selected)
Constructor, with parameters.
Definition: fs_xfa.h:63
Sample message: "Cannot find container '%s'".
Definition: fs_xfa.h:261
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:269
Text encoding: ShiftJIS.
Definition: fs_xfa.h:645
bool IsEmpty() const
Check whether current object is empty or not.
Sample message: "Cannot assign to '%s'".
Definition: fs_xfa.h:277
Sample message: "Function '%s' does not have %d parameters".
Definition: fs_xfa.h:243
Sample message: "'%s' doesn't have property '%s'".
Definition: fs_xfa.h:309
Message box icon: Warning.
Definition: fs_xfa.h:392
Beep type: status.
Definition: fs_xfa.h:153
Name type: caption name. Name in this type will be retrieved from caption entry.
Definition: fs_xfa.h:1484
Text encoding: ISO8859NN.
Definition: fs_xfa.h:641
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:367
bool operator==(const WidgetMenu &other) const
Equal operator.
Sample message: "Unable to set".
Definition: fs_xfa.h:182
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:355
Sample message: "Unexpected expression '%s'".
Definition: fs_xfa.h:247
Sample message: "Incorrect number of parameters are used when calling method '%s'".
Definition: fs_xfa.h:299
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:611
XFA widget type: image.
Definition: fs_xfa.h:1453
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:186
Type GetType() const
Get the XFA document type.
SubmitFormat
Enumeration for XFA submit format.
Definition: fs_xfa.h:609
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:771
XFAWidget GetFirstWidget()
Get the first XFA widget in current tab order.
Hit test area: Unknown.
Definition: fs_xfa.h:1405
XFA document type: XDP, as Raw XML data.
Definition: fs_xfa.h:927
XFA widget type: choice list.
Definition: fs_xfa.h:1435
Event type: after a page view is added.
Definition: fs_xfa.h:661
Text encoding: UTF-8.
Definition: fs_xfa.h:651