My Project
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/file/fs_file.h"
20 
26 namespace foxit {
30 namespace addon {
34 namespace xfa {
35 class XFADoc;
36 class XFAPage;
37 class XFAWidget;
38 
45  public:
51  typedef enum _AppInfo {
61  e_AppInfoName = 0x04,
64  } AppInfo;
65 
71  typedef enum _BeepType {
82  } BeepType;
83 
89  typedef enum _StringID {
303  } StringID;
304 
310  typedef enum _MsgBoxIconType {
319  } MsgBoxIconType;
320 
326  typedef enum _MsgBoxButtonType {
336 
342  typedef enum _MsgBoxButtonID {
351  } MsgBoxButtonID;
352 
353 
359  virtual void Release() = 0;
360 
370  virtual WString GetAppInfo(AppInfo app_info) = 0;
371 
380  virtual void Beep(BeepType type) = 0;
381 
395  virtual MsgBoxButtonID MsgBox(const wchar_t* message, const wchar_t* title, MsgBoxIconType icon_type,
396  MsgBoxButtonType button_type) = 0;
397 
410  virtual WString Response(const wchar_t* question, const wchar_t* title, const wchar_t* default_answer,
411  bool is_mask) = 0;
412 
420  virtual common::file::ReaderCallback* DownLoadUrl(const wchar_t* url) = 0;
421 
436  virtual WString PostRequestURL(const wchar_t* url, const wchar_t* data, const wchar_t* content_type,
437  const wchar_t* encode, const wchar_t* header) = 0;
438 
449  virtual bool PutRequestURL(const wchar_t* url, const wchar_t* data, const wchar_t* encode) = 0;
450 
468  virtual WString LoadString(StringID string_id) = 0;
469 
480  virtual WStringArray ShowFileDialog(const wchar_t* string_title, const wchar_t* string_filter,
481  bool is_openfile_dialog) = 0;
482 
483  protected:
484  ~AppProviderCallback() {}
485 };
486 
493  public:
499  typedef enum _InvalidateFlag {
504  } InvalidateFlag;
505 
511  typedef enum _PrintOption {
519  e_PrintOptionAsImage = 0x00000008,
524  } PrintOption;
525 
531  typedef enum _SubmitFormat {
542  } SubmitFormat;
543 
549  typedef enum _TextEncoding {
574  } TextEncoding;
575 
581  typedef enum _PageViewEventType {
589 
595  typedef enum _WidgetEventType {
600  } WidgetEventType;
601 
602 
608  virtual void Release() = 0;
609 
622  virtual void InvalidateRect(int page_index, const RectF& rect, InvalidateFlag flag) = 0;
623 
634  virtual void DisplayCaret(int page_index, bool is_visible, const RectF& rect) = 0;
635 
650  virtual bool GetPopupPos(int page_index, float min_popup, float max_popup,
651  const RectF& rect_widget, RectF& inout_rect_popup) = 0;
652 
661  virtual bool PopupMenu(int page_index, const PointF& rect_popup) = 0;
662 
670  virtual int GetCurrentPage(const XFADoc& doc) = 0;
671 
680  virtual void SetCurrentPage(const XFADoc& doc, int current_page_index) = 0;
681 
689  virtual void SetChangeMark(const XFADoc& doc) = 0;
690 
698  virtual WString GetTitle(const XFADoc& doc) = 0;
699 
707  virtual void SetFocus(XFAWidget& xfa_widget) = 0;
708 
719  virtual void ExportData(const XFADoc& doc, const WString& file_path) = 0;
720 
731  virtual void ImportData(const XFADoc& doc, const WString& file_path) = 0;
732 
741  virtual void GotoURL(const XFADoc& doc, const WString& url) = 0;
742 
755  virtual void Print(const XFADoc& doc, int start_page_index, int end_page_index, uint32 options) = 0;
756 
764  virtual ARGB GetHighlightColor(const XFADoc& doc) = 0;
765 
779  virtual bool SubmitData(const XFADoc& doc, const WString& target, SubmitFormat format, TextEncoding text_encoding,
780  const WString& content) = 0;
781 
792  virtual void PageViewEvent(int page_index, PageViewEventType page_view_event_type) = 0;
793 
804  virtual void WidgetEvent(const XFAWidget& xfa_widget,WidgetEventType widget_event_type) = 0;
805 
806  protected:
807  ~DocProviderCallback() {}
808 };
809 
819 class XFADoc FS_FINAL : public Base{
820  public:
826  typedef enum _EventType {
836  } EventType;
837 
843  typedef enum _Type {
847  e_Static = 1,
849  e_XDP = 2
850  } Type;
851 
857  typedef enum _ExportDataType {
864  } ExportDataType;
865 
866 
880  XFADoc(const pdf::PDFDoc& document, DocProviderCallback* xfa_doc_provider_handler);
881 
894  XFADoc(const foxit::pdf::PDFDoc& document);
895 
901  XFADoc(const XFADoc& other);
909  XFADoc& operator = (const XFADoc& other);
910 
918  bool operator == (const XFADoc& other) const;
919 
927  bool operator != (const XFADoc& other) const;
928 
936  bool IsEmpty() const;
937 
939  ~XFADoc();
940 
959 
971 
978  Type GetType() const;
979 
985  int GetPageCount() const;
986 
995  XFAPage GetPage(int page_index);
996 
1006  bool ExportData(const char* output_file_path, ExportDataType export_type);
1007 
1017  bool ExportData(const wchar_t* output_file_path, ExportDataType export_type);
1018 
1029  void SetPDFPath(const char* pdf_file_path);
1030 
1041  void SetPDFPath(const wchar_t* pdf_file_path);
1042 
1051  bool ImportData(const char* file_path);
1052 
1061  bool ImportData(const wchar_t* file_path);
1062 
1068  void ResetForm();
1069 
1077  void FlattenTo(const char* output_file_path);
1078 
1086  void FlattenTo(const wchar_t* output_file_path);
1087 
1096  void ProcessEvent(EventType event_type);
1097 
1105  void SetFocus(XFAWidget xfa_widget);
1106 
1112  void KillFocus();
1113 
1114  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1115  explicit XFADoc(FS_HANDLE handle = NULL);
1116 };
1117 
1124 class XFAPage FS_FINAL : public Base{
1125  public:
1131  XFAPage(const XFAPage& other);
1139  XFAPage& operator = (const XFAPage& other);
1140 
1148  bool operator == (const XFAPage& other) const;
1156  bool operator != (const XFAPage& other) const;
1157 
1159  ~XFAPage();
1160 
1168  bool IsEmpty() const;
1169 
1183  Matrix GetDisplayMatrix(int left, int top, int width, int height, common::Rotation rotate);
1184 
1190  float GetWidth() const;
1191 
1197  float GetHeight() const;
1198 
1209  XFAWidget GetWidgetAtDevicePoint(const Matrix& matrix, const PointF& device_point, float tolerance);
1210 
1216  int GetIndex() const;
1217 
1223  int GetWidgetCount() const;
1224 
1233  XFAWidget GetWidget(int widget_index) const;
1234 
1235  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1236  explicit XFAPage(FS_HANDLE handle = NULL);
1237 };
1238 
1245 class XFAWidget FS_FINAL : public Base{
1246  public:
1252  typedef enum _HitTestArea {
1261  } HitTestArea;
1262 
1268  typedef enum _WidgetType {
1299  } WidgetType;
1300 
1307  typedef enum _PresenceProperty {
1318  } PresenceProperty;
1319 
1320 
1326  XFAWidget(const XFAWidget& other);
1334  XFAWidget& operator = (const XFAWidget& other);
1335 
1343  bool operator == (const XFAWidget& other) const;
1351  bool operator != (const XFAWidget& other) const;
1352 
1360  bool IsEmpty() const;
1361 
1363  ~XFAWidget();
1364 
1370  XFAPage GetXFAPage();
1371 
1377  int GetIndex() const;
1378 
1384  void ResetData();
1385 
1391  RectF GetRect();
1392 
1398  WString GetValue();
1399 
1407  void SetValue(const wchar_t* value);
1408 
1417 
1423  bool OnMouseEnter();
1424 
1430  bool OnMouseExit();
1431 
1442  bool OnLButtonDown(const PointF& point, uint32 flags);
1443 
1454  bool OnLButtonUp(const PointF& point, uint32 flags);
1455 
1466  bool OnLButtonDoubleClick(const PointF& point, uint32 flags);
1467 
1478  bool OnMouseMove(const PointF& point, uint32 flags);
1479 
1490  bool OnRButtonDown(const PointF& point, uint32 flags);
1491 
1502  bool OnRButtonUp(const PointF& point, uint32 flags);
1503 
1516  bool OnKeyDown(uint32 key_code, uint32 flags);
1517 
1530  bool OnKeyUp(uint32 key_code, uint32 flags);
1531 
1542  bool OnChar(int input_char, uint32 flags);
1543 
1552  HitTestArea OnHitTest(const PointF& point);
1553 
1560  WidgetType GetType();
1561 
1562  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1563  explicit XFAWidget(FS_HANDLE handle = NULL);
1564 };
1565 
1569 class WidgetMenu FS_FINAL : public Base {
1570  public:
1576  explicit WidgetMenu(const XFAWidget& xfa_widget);
1577 
1583  WidgetMenu(const WidgetMenu& other);
1591  WidgetMenu& operator = (const WidgetMenu& other);
1592 
1600  bool operator == (const WidgetMenu& other) const;
1608  bool operator != (const WidgetMenu& other) const;
1609 
1611  ~WidgetMenu();
1612 
1620  bool IsEmpty() const;
1621 
1627  bool CanCopy();
1628 
1634  bool CanCut();
1635 
1641  bool CanPaste();
1642 
1648  bool CanSelectAll();
1649 
1655  bool CanDelete();
1656 
1663  bool CanDeSelect();
1664 
1670  WString Copy();
1671 
1677  WString Cut();
1678 
1686  bool Paste(const wchar_t* text);
1687 
1693  bool SelectAll();
1694 
1700  bool Delete();
1701 
1707  bool DeSelect();
1708 
1715  bool CanUndo();
1716 
1723  bool CanRedo();
1724 
1730  bool Undo();
1731 
1737  bool Redo();
1738 
1744  bool Bold();
1745 
1751  bool Italic();
1752 
1758  bool Underline();
1759 
1765  bool Superscript();
1766 
1772  bool Subscript();
1773 
1779  bool ClearStyle();
1780 
1781  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1782  explicit WidgetMenu(FS_HANDLE handle = NULL);
1783 };
1784 } // namespace xfa
1785 } // namespace addon
1786 } // namespace foxit
1787 #endif // namespace foxit
1788 
XFADoc(const pdf::PDFDoc &document, DocProviderCallback *xfa_doc_provider_handler)
Constructor.
WidgetType GetType()
Get type of XFA widget.
No text encoding.
Definition: fs_xfa.h:551
Sample message: "Illegal continue".
Definition: fs_xfa.h:179
bool CanSelectAll()
Check if the text of related XFA widget can be selected all.
bool Bold()
(Only useful for rich text) Make the rich text bold.
Sample message: "Invalidate expression '%s'".
Definition: fs_xfa.h:159
Sample message: "The value you entered for %s is invalid. To ignore validations for %s,...
Definition: fs_xfa.h:289
Sample message: "The element [%s] has violated its allowable number of occurrences".
Definition: fs_xfa.h:139
XFA widget type: choice list.
Definition: fs_xfa.h:1284
bool ExportData(const char *output_file_path, ExportDataType export_type)
Export data to a file.
PresenceProperty
Enumeration for presence attribute of XFA widget.
Definition: fs_xfa.h:1307
String ID for case: Use string in local language for "Thursday".
Definition: fs_xfa.h:251
common::Progressive StartLoad(common::PauseCallback *pause=0)
Start to load content for current XFA document.
virtual void SetFocus(XFAWidget &xfa_widget)=0
A callback function used to set focus widget.
Sample message: "Expected identifier instead of '%s'".
Definition: fs_xfa.h:149
Sample message: "Invalidate character '%c'".
Definition: fs_xfa.h:153
String ID for case: Use string in local language for "Saturday".
Definition: fs_xfa.h:255
Sample message: "Cannot directly assign the value to object".
Definition: fs_xfa.h:195
bool OnLButtonDown(const PointF &point, uint32 flags)
Call this function when left mouse button is down.
Sample message: "Function 's' is built-in.
Definition: fs_xfa.h:219
Sample message: "Cannot find function '%s'".
Definition: fs_xfa.h:205
String ID for case: Use string in local language for "Sunday".
Definition: fs_xfa.h:243
Sample message: "'%s' operator cannot support array calculation".
Definition: fs_xfa.h:211
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
MsgBoxIconType
Enumeration for icon type of XFA message box.
Definition: fs_xfa.h:310
RectF GetRect()
Get rectangle of XFA widget.
String ID for case: Use string in local language for "May".
Definition: fs_xfa.h:265
bool ClearStyle()
(Only useful for rich text) Clear the style of the rich text.
Type of exported data: Static XDP.
Definition: fs_xfa.h:861
XFA document type: XDP, as Raw XML data.
Definition: fs_xfa.h:849
The submit data is packaged in URL-encoded format as described in Uniform Resource Locator(URL).
Definition: fs_xfa.h:537
Sample message: "Bad suffix on number".
Definition: fs_xfa.h:147
Text encoding: GB2312.
Definition: fs_xfa.h:561
String ID for case: Use string in local language for "Today".
Definition: fs_xfa.h:281
Sample message: "Incorrect number of parameters are used when calling method '%s'".
Definition: fs_xfa.h:225
Text encoding: Big5.
Definition: fs_xfa.h:553
Sample message: "An attempt was made to reference property '%s' of a non-object in SOM expression %s"...
Definition: fs_xfa.h:217
Message box button: Yes and No.
Definition: fs_xfa.h:332
String ID for case: Some enumerate value is invalid. Sample message: "Invalid enumerate value:".
Definition: fs_xfa.h:112
Beep type: warning.
Definition: fs_xfa.h:75
If set, shrink page to fit within content area.
Definition: fs_xfa.h:517
PrintOption
Enumeration for XFA print options.
Definition: fs_xfa.h:511
bool OnKeyDown(uint32 key_code, uint32 flags)
Call this function when key on the keyboard is down.
virtual void Release()=0
A callback function used to release current callback object itself.
Sample message: "Index value is out of bounds".
Definition: fs_xfa.h:223
float GetWidth() const
Get the width.
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.
Sample message: "Unable to set the value for property 'variation'".
Definition: fs_xfa.h:133
String ID for case: Use string in local language for "Wednesday".
Definition: fs_xfa.h:249
bool CanCopy()
Check if the text of related XFA widget can be copied.
bool OnLButtonUp(const PointF &point, uint32 flags)
Call this function when left mouse button is up.
bool OnChar(int input_char, uint32 flags)
Call this function when a character code is being input.
Sample message: "Cannot find const '%s'".
Definition: fs_xfa.h:193
Message box button ID: OK.
Definition: fs_xfa.h:344
Definition: fs_common.h:385
Sample message: "Divide by zero".
Definition: fs_xfa.h:183
void KillFocus()
Kill the focus of XFA widget.
String ID for case: Use string in local language for "March".
Definition: fs_xfa.h:261
virtual bool PopupMenu(int page_index, const PointF &rect_popup)=0
A callback function used to pop up the context menu.
If set, show printing dialog box.
Definition: fs_xfa.h:513
String ID for case: Some setting operation to property is invalid. Sample message: "Invalid property ...
Definition: fs_xfa.h:121
Sample message: "Unable to set the value for property 'ready'".
Definition: fs_xfa.h:137
bool CanUndo()
Check if the operation of related XFA widget can be undone.
bool operator==(const WidgetMenu &other) const
Equal operator.
virtual void SetCurrentPage(const XFADoc &doc, int current_page_index)=0
A callback function used to set index of current page.
void ResetData()
Reset XFA Widget Data.
Application information: language.
Definition: fs_xfa.h:55
void SetFocus(XFAWidget xfa_widget)
Set the focus of XFA widget.
XFAWidget GetWidgetAtDevicePoint(const Matrix &matrix, const PointF &device_point, float tolerance)
Get the XFA widget at a specified point, in device coordination system.
XFAPage & operator=(const XFAPage &other)
Assign operator.
Application information: platform.
Definition: fs_xfa.h:57
Sample message: "Function '%s' does not have %d parameters".
Definition: fs_xfa.h:169
bool CanDeSelect()
Check if the selection of the text in related XFA widget can be canceled.
virtual void ExportData(const XFADoc &doc, const WString &file_path)=0
A callback function used to export data to file.
Message box button: OK.
Definition: fs_xfa.h:328
void FlattenTo(const char *output_file_path)
Flatten current XFA document to a file.
Hit test area: Unknown.
Definition: fs_xfa.h:1254
Sample message: "Value!".
Definition: fs_xfa.h:110
String ID for case: If to modify field. Sample message: "Do you want to modify this field?...
Definition: fs_xfa.h:95
The submit data is packaged in XFD format, as described in XFDF.
Definition: fs_xfa.h:539
virtual int GetCurrentPage(const XFADoc &doc)=0
A callback function used to get index of current page.
Hit test area: HyperLink.
Definition: fs_xfa.h:1260
Type GetType() const
Get the XFA document type.
XFA widget type: numeric edit.
Definition: fs_xfa.h:1280
void ResetForm()
Reset form.
This kind of event is triggered just before the rendering for printing begins.
Definition: fs_xfa.h:835
The submit data is packaged in XDP format, as described in XDP Specification.
Definition: fs_xfa.h:533
Text encoding: UCS-2.
Definition: fs_xfa.h:569
String ID for case: Use string in local language for "June".
Definition: fs_xfa.h:267
Application information: type.
Definition: fs_xfa.h:63
Sample message: "Unknown error is caught!".
Definition: fs_xfa.h:106
Type of exported data: XML.
Definition: fs_xfa.h:859
file reading interface.
Definition: fx_stream.h:555
bool OnMouseMove(const PointF &point, uint32 flags)
Call this function when mouse moves.
virtual void InvalidateRect(int page_index, const RectF &rect, InvalidateFlag flag)=0
A callback function used to invalidate rectangle according the flag.
Sample message: "%s : %s".
Definition: fs_xfa.h:221
Type of exported data: XDP.
Definition: fs_xfa.h:863
Header file for file operation related definitions and functions.
bool Undo()
Undo the operation of related XFA widget. (No effect for rich text)
Text encoding: KSC5601.
Definition: fs_xfa.h:565
XFA widget type: unknown.
Definition: fs_xfa.h:1298
Event type: after an xfa widget is added.
Definition: fs_xfa.h:597
Message box button: OK and Cancel.
Definition: fs_xfa.h:330
Presence property: Visible. Participate in interaction, layout, and rendering.
Definition: fs_xfa.h:1311
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:212
bool DeSelect()
Cancel the selection of the text in related XFA widget.
Sample message: "Unsupported property %s.".
Definition: fs_xfa.h:116
Invalidate all pages.
Definition: fs_xfa.h:501
bool operator==(const XFAPage &other) const
Equal operator.
bool Italic()
(Only useful for rich text) Make the rich text italic.
Sample message: "Compiler error".
Definition: fs_xfa.h:165
XFA widget type: push button.
Definition: fs_xfa.h:1272
virtual bool SubmitData(const XFADoc &doc, const WString &target, SubmitFormat format, TextEncoding text_encoding, const WString &content)=0
A callback function to submit data.
bool IsEmpty() const
Check whether current object is empty or not.
XFA document type: Dynamic.
Definition: fs_xfa.h:845
Sample message: "Out of the range of '%s' array".
Definition: fs_xfa.h:209
Hit test area: Title Bar.
Definition: fs_xfa.h:1258
Application information: variation.
Definition: fs_xfa.h:59
String ID for case: Use string in local language for "April".
Definition: fs_xfa.h:263
XFA widget type: password edit.
Definition: fs_xfa.h:1290
Sample message: "Cannot find property '%s'".
Definition: fs_xfa.h:189
XFAWidget & operator=(const XFAWidget &other)
Assign operator.
bool IsEmpty() const
Check whether current object is empty or not.
Sample message: "Illegal value:cannot assign '%s' to %s.".
Definition: fs_xfa.h:293
float GetHeight() const
Get the height of the XFA page.
If set, print page as image; otherwise, as text.
Definition: fs_xfa.h:519
Sample message: "'%s' is not an array".
Definition: fs_xfa.h:207
bool OnLButtonDoubleClick(const PointF &point, uint32 flags)
Call this function when left mouse button is double-clicked .
Sample message: "Message limit exceeded. Remaining %d validation errors not reported....
Definition: fs_xfa.h:283
virtual ARGB GetHighlightColor(const XFADoc &doc)=0
A callback function get the highlight color.
String ID for case: Use string in local language for "October".
Definition: fs_xfa.h:275
int GetWidgetCount() const
Get the count of XFA widget.
InvalidateFlag
Enumeration for XFA invalidate flag.
Definition: fs_xfa.h:499
void SetPDFPath(const char *pdf_file_path)
Set the path of related PDF document.
String ID for case: Not allow to modify field. Sample message: "You are not allowed to modify this fi...
Definition: fs_xfa.h:97
Sample message: "Invalidate left-value '%s'".
Definition: fs_xfa.h:163
bool IsEmpty() const
Check whether current object is empty or not.
MsgBoxButtonType
Enumeration for button type of XFA message box.
Definition: fs_xfa.h:326
XFA widget type: barcode.
Definition: fs_xfa.h:1270
HitTestArea
Enumeration for hit test area of XFA widget.
Definition: fs_xfa.h:1252
Message box icon: Status.
Definition: fs_xfa.h:318
Sample message: "Cannot find container '%s'".
Definition: fs_xfa.h:187
String ID for case: Use string in local language for "Monday".
Definition: fs_xfa.h:245
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.
bool SelectAll()
Select all the text of related XFA widget.
Text encoding: ShiftJIS.
Definition: fs_xfa.h:567
Sample message: "Cannot assign to '%s'".
Definition: fs_xfa.h:203
String ID for case: Server denies. Sample message: "Server does not permit".
Definition: fs_xfa.h:241
virtual void PageViewEvent(int page_index, PageViewEventType page_view_event_type)=0
A callback function to execute page view event.
Sample message: "Condition is null".
Definition: fs_xfa.h:175
bool CanCut()
Check if the text of related XFA widget can be cut.
BeepType
Enumeration for XFA beep type.
Definition: fs_xfa.h:71
Text encoding: ISO8859NN.
Definition: fs_xfa.h:563
bool Paste(const wchar_t *text)
Paste the text to related XFA widget.
bool operator !=(const XFAPage &other) const
Not equal operator.
WString Cut()
Cut the text of related XFA widget.
Sample message: "Unsupported method %s.".
Definition: fs_xfa.h:114
Sample message: "Expected number instead of '%s'".
Definition: fs_xfa.h:199
AppInfo
Enumeration for XFA application information type.
Definition: fs_xfa.h:51
XFA widget type: line.
Definition: fs_xfa.h:1288
Text encoding: GBK.
Definition: fs_xfa.h:557
Event type: before an xfa widget is removed.
Definition: fs_xfa.h:599
String ID for case: Application's name. Sample message: "Foxit Phantom".
Definition: fs_xfa.h:99
virtual void WidgetEvent(const XFAWidget &xfa_widget, WidgetEventType widget_event_type)=0
A callback function to execute xfa widget event.
bool operator==(const XFAWidget &other) const
Equal operator.
XFA widget type: text edit.
Definition: fs_xfa.h:1296
Definition: fs_xfa.h:1245
If set, that means printing process can be canceled.
Definition: fs_xfa.h:515
Sample message: "'%s' redefinition".
Definition: fs_xfa.h:155
Event type: Unknown.
Definition: fs_xfa.h:828
String ID for case: Filter for image files. Sample message: "Image Files(*.bmp;*.jpg;*....
Definition: fs_xfa.h:104
bool IsEmpty() const
Check whether current object is empty or not.
Sample message: "Cannot modify the '%s' value".
Definition: fs_xfa.h:167
Sample message: "%s.%s cannot covert to object".
Definition: fs_xfa.h:185
XFAWidget(const XFAWidget &other)
Constructor, with another XFA widget object.
EventType
Enumeration for XFA event type.
Definition: fs_xfa.h:826
Event type: all page views are removed.
Definition: fs_xfa.h:587
bool OnRButtonDown(const PointF &point, uint32 flags)
Call this function when right mouse is down.
Sample message: "Error:Invalid enumerated value:%s".
Definition: fs_xfa.h:297
Beep type: error.
Definition: fs_xfa.h:73
Definition: fx_coordinates.h:30
Message box icon: Question.
Definition: fs_xfa.h:316
Sample message: "The element [%s] has violated its allowable number of occurrences".
Definition: fs_xfa.h:239
Application information: name.
Definition: fs_xfa.h:61
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.
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.
Sample message: "Not have a default property".
Definition: fs_xfa.h:123
Rotation
Enumeration for rotation.
Definition: fs_common.h:221
int GetPageCount() const
Get XFA page count.
bool Redo()
Redo the operation of related XFA widget. (No effect for rich text)
String ID for case: Use string in local language for "August".
Definition: fs_xfa.h:271
Sample message: "Invalid append operation: %s cannot have a child element of %s".
Definition: fs_xfa.h:231
If set, print annotations.
Definition: fs_xfa.h:523
bool OnRButtonUp(const PointF &point, uint32 flags)
Call this function when right button is up.
virtual WString GetTitle(const XFADoc &doc)=0
A callback function used to get title of current XFA document.
XFAPage GetPage(int page_index)
Get XFA page by index.
virtual void Release()=0
A callback function used to release current callback object itself.
Definition: fs_xfa.h:1569
bool operator !=(const XFAWidget &other) const
Not equal operator.
XFA document type: Static.
Definition: fs_xfa.h:847
Sample message: "%s cannot be left blank.".
Definition: fs_xfa.h:287
Presence property: Unknown.
Definition: fs_xfa.h:1309
Text encoding: GB18030.
Definition: fs_xfa.h:559
Sample message: "Expected '%s' instead of '%s'".
Definition: fs_xfa.h:151
Application information: version.
Definition: fs_xfa.h:53
ExportDataType
Enumeration for the type of exported data.
Definition: fs_xfa.h:857
void SetValue(const wchar_t *value)
Set the value string.
StringID
Enumeration for string ID used to specify a case.
Definition: fs_xfa.h:89
Message box icon: Error.
Definition: fs_xfa.h:312
String ID for case: Use string in local language for "July".
Definition: fs_xfa.h:269
String ID for case: Use string in local language for "Friday".
Definition: fs_xfa.h:253
Foxit namespace.
Definition: fs_connectedpdf.h:26
Sample message: "Unable to set the value for property 'length'".
Definition: fs_xfa.h:143
Sample message: "Invalidate token '%s'".
Definition: fs_xfa.h:157
virtual common::file::ReaderCallback * DownLoadUrl(const wchar_t *url)=0
A callback function used to download from specified URL.
virtual WString GetAppInfo(AppInfo app_info)=0
A callback function used to get application information for a specified information type.
Sample message: "Validate failed".
Definition: fs_xfa.h:91
bool OnMouseExit()
Call this function when mouse exits.
bool operator==(const XFADoc &other) const
Equal operator.
HitTestArea OnHitTest(const PointF &point)
Call this function to do hit test for a specified point.
If set, print page in reverse order; otherwise, in normal order.
Definition: fs_xfa.h:521
Sample message: "Invalid node type: '%s'".
Definition: fs_xfa.h:237
Hit test area: Client.
Definition: fs_xfa.h:1256
Sample message: "Illegal break".
Definition: fs_xfa.h:177
Sample message: "Validate access index '%s' out of array".
Definition: fs_xfa.h:201
Definition: fs_xfa.h:819
Text encoding: font specific.
Definition: fs_xfa.h:555
Definition: fx_basic.h:3690
TextEncoding
Enumeration for text encoding for XFA submit.
Definition: fs_xfa.h:549
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: "Invalidate instruction".
Definition: fs_xfa.h:197
Presence property: Invisible. Participate in interaction and layout but not rendering.
Definition: fs_xfa.h:1317
bool OnMouseEnter()
Call this function when mouse enters current XFA widget.
Sample message: "Unable to set the value for property 'validationsEnabled'".
Definition: fs_xfa.h:131
bool operator !=(const XFADoc &other) const
Not equal operator.
XFA widget type: arc.
Definition: fs_xfa.h:1276
Message box button ID: Yes.
Definition: fs_xfa.h:350
XFAWidget GetWidget(int widget_index) const
Get XFA widget by index.
String ID for case: Use string in local language for "January".
Definition: fs_xfa.h:257
Sample message: "Unable to set the value for property 'language'".
Definition: fs_xfa.h:125
Message box button: Yes, No and Cancel.
Definition: fs_xfa.h:334
The submit data is packaged in PDF format as described in the PDF Reference.
Definition: fs_xfa.h:535
Event type: after a page view is removed.
Definition: fs_xfa.h:585
virtual WString LoadString(StringID string_id)=0
A callback function used to load a string in local language for a specified case.
WidgetMenu & operator=(const WidgetMenu &other)
Assign operator.
This kind of event is triggered just after the rendered form has been sent to the printer,...
Definition: fs_xfa.h:833
Message box button ID: No.
Definition: fs_xfa.h:348
#define NULL
The null-pointer value.
Definition: fx_system.h:773
Definition: fx_coordinates.h:763
Beep type: question.
Definition: fs_xfa.h:77
Sample message: "Argument mismatch in property or function argument".
Definition: fs_xfa.h:227
XFA widget type: radio button.
Definition: fs_xfa.h:1292
Definition: fs_pdfdoc.h:338
SubmitFormat
Enumeration for XFA submit format.
Definition: fs_xfa.h:531
bool operator !=(const WidgetMenu &other) const
Not equal operator.
Presence property: Hidden. Participate in interaction but not layout or rendering.
Definition: fs_xfa.h:1313
XFA widget type: check button.
Definition: fs_xfa.h:1274
virtual void DisplayCaret(int page_index, bool is_visible, const RectF &rect)=0
A callback function used to display or hide caret.
Type
Enumeration for XFA document type.
Definition: fs_xfa.h:843
Sample message: "Invalid enumerated value: %s".
Definition: fs_xfa.h:229
XFA widget type: rectangle.
Definition: fs_xfa.h:1294
virtual void Beep(BeepType type)=0
A callback function used to beep for specified beep type.
Sample message: "%s cannot be left blank. To ignore validations for %s, click Ignore....
Definition: fs_xfa.h:285
Sample message: "Unable to set the value for property 'platform'".
Definition: fs_xfa.h:129
void ProcessEvent(EventType event_type)
Process a kind of event for all the XFA widgets in current XFA document.
String ID for case: Use string in local language for "December".
Definition: fs_xfa.h:279
Definition: fs_xfa.h:1124
Sample message: "Cannot find method '%s'".
Definition: fs_xfa.h:191
bool Subscript()
(Only useful for rich text) Make the rich text as subscript.
Sample message: "Unable to set".
Definition: fs_xfa.h:108
WString Copy()
Copy the text of related XFA widget.
Text encoding: UTF-16.
Definition: fs_xfa.h:571
Sample message: "Calculate Override".
Definition: fs_xfa.h:93
virtual void SetChangeMark(const XFADoc &doc)=0
A callback function used to set change mark flag to current XFA document.
XFA widget type: signature.
Definition: fs_xfa.h:1282
virtual void ImportData(const XFADoc &doc, const WString &file_path)=0
A callback function used to import data from file.
Definition: fs_basictypes.h:226
virtual void Print(const XFADoc &doc, int start_page_index, int end_page_index, uint32 options)=0
A callback function used to print.
The submit data is translated and packaged into an URL-Encoded format.
Definition: fs_xfa.h:541
XFAPage(const XFAPage &other)
Constructor, with another XFA page object.
XFAPage GetXFAPage()
Get the related XFA page, to which current XFA widget belongs.
bool Underline()
(Only useful for rich text) Underline the rich text.
Event type: after a page view is added.
Definition: fs_xfa.h:583
Sample message: "Unsupported character '%c'".
Definition: fs_xfa.h:145
XFADoc & operator=(const XFADoc &other)
Assign operator.
Sample message: "Unable to set the value for property 'version'".
Definition: fs_xfa.h:135
Sample message: "Unable to set the value for property 'numPages'".
Definition: fs_xfa.h:127
WidgetMenu(const XFAWidget &xfa_widget)
Constructor, from XFA widget object.
int GetIndex() const
Get index of the XFA page.
Sample message: "At least one required field was empty. Please fill in the required fields(highlighte...
Definition: fs_xfa.h:302
Definition: fx_coordinates.h:1053
Sample message: "Script failed(language is %s;context is %s) script=%s".
Definition: fs_xfa.h:295
Sample message: "'%s' function's %d argument cannot be array".
Definition: fs_xfa.h:213
PageViewEventType
Enumeration for the event type of page view.
Definition: fs_xfa.h:581
Sample message: "'%s' doesn't have property '%s'".
Definition: fs_xfa.h:235
int GetIndex() const
Get the index of XFA Widget in related XFA page.
Message box button ID: Cancel.
Definition: fs_xfa.h:346
Sample message: "The value you entered for %s is invalid.".
Definition: fs_xfa.h:291
String ID for case: Use string in local language for "Tuesday".
Definition: fs_xfa.h:247
XFA widget type: date time edit.
Definition: fs_xfa.h:1278
void SetDocProviderCallback(foxit::addon::xfa::DocProviderCallback *doc_provider_callback)
Set XFA document provider callback.
Sample message: "Expected operator '%s' instead of '%s'".
Definition: fs_xfa.h:181
Beep type: status.
Definition: fs_xfa.h:79
XFA widget type: image edit.
Definition: fs_xfa.h:1286
WIDE STRING CLASS.
Definition: fx_string.h:1470
String ID for case: Use string in local language for "February".
Definition: fs_xfa.h:259
Beep type: default.
Definition: fs_xfa.h:81
bool ImportData(const char *file_path)
Import data from an XML or XDP file.
WidgetType
Enumeration for the type of xfa widget.
Definition: fs_xfa.h:1268
Invalidate current page.
Definition: fs_xfa.h:503
bool CanRedo()
Check if the operation of related XFA widget can be redone.
WidgetEventType
Enumeration for the type of xfa widget event.
Definition: fs_xfa.h:595
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.
WString GetValue()
Get the value string.
String ID for case: Use string in local language for "September".
Definition: fs_xfa.h:273
Text encoding: UTF-8.
Definition: fs_xfa.h:573
Sample message: "'%s' argument is expected to be a container".
Definition: fs_xfa.h:215
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:198
bool Delete()
Delete all the text of related XFA widget.
PresenceProperty GetPresence()
Get the presence property of the XFA widget.
virtual void GotoURL(const XFADoc &doc, const WString &url)=0
A callback function used to go to a specified URL.
Definition: fs_basictypes.h:342
Sample message: "Unable to set the value for property 'className'".
Definition: fs_xfa.h:141
Sample message: "SOM expression returned list when single result was expected".
Definition: fs_xfa.h:233
bool OnKeyUp(uint32 key_code, uint32 flags)
Call this function when key on the keyboard is up.
bool CanPaste()
Check if the text of related XFA widget can be pasted.
String ID for case: Use string in local language for "November".
Definition: fs_xfa.h:277
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.
Message box icon: Warning.
Definition: fs_xfa.h:314
Presence property: Inactive. Do not participate in interaction, layout, or rendering.
Definition: fs_xfa.h:1315
bool CanDelete()
Check if the text of related XFA widget can be deleted.
MsgBoxButtonID
Enumeration for button ID of XFA message box.
Definition: fs_xfa.h:342
bool Superscript()
(Only useful for rich text) Make the rich text as superscript.
Sample message: "Undefined identifier '%s'".
Definition: fs_xfa.h:161
Sample message: "Unexpected expression '%s'".
Definition: fs_xfa.h:173
Sample message: "Expected 'endif' instead of '%s'".
Definition: fs_xfa.h:171

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