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 {
305  } StringID;
306 
312  typedef enum _MsgBoxIconType {
321  } MsgBoxIconType;
322 
328  typedef enum _MsgBoxButtonType {
338 
344  typedef enum _MsgBoxButtonID {
353  } MsgBoxButtonID;
354 
355 
361  virtual void Release() = 0;
362 
372  virtual WString GetAppInfo(AppInfo app_info) = 0;
373 
382  virtual void Beep(BeepType type) = 0;
383 
397  virtual MsgBoxButtonID MsgBox(const wchar_t* message, const wchar_t* title, MsgBoxIconType icon_type,
398  MsgBoxButtonType button_type) = 0;
399 
412  virtual WString Response(const wchar_t* question, const wchar_t* title, const wchar_t* default_answer,
413  bool is_mask) = 0;
414 
422  virtual common::file::ReaderCallback* DownLoadUrl(const wchar_t* url) = 0;
423 
438  virtual WString PostRequestURL(const wchar_t* url, const wchar_t* data, const wchar_t* content_type,
439  const wchar_t* encode, const wchar_t* header) = 0;
440 
451  virtual bool PutRequestURL(const wchar_t* url, const wchar_t* data, const wchar_t* encode) = 0;
452 
470  virtual WString LoadString(StringID string_id) = 0;
471 
482  virtual WStringArray ShowFileDialog(const wchar_t* string_title, const wchar_t* string_filter,
483  bool is_openfile_dialog) = 0;
484 
485  protected:
486  ~AppProviderCallback() {}
487 };
488 
495  public:
501  typedef enum _InvalidateFlag {
506  } InvalidateFlag;
507 
513  typedef enum _PrintOption {
521  e_PrintOptionAsImage = 0x00000008,
526  } PrintOption;
527 
533  typedef enum _SubmitFormat {
544  } SubmitFormat;
545 
551  typedef enum _TextEncoding {
576  } TextEncoding;
577 
583  typedef enum _PageViewEventType {
591 
597  typedef enum _WidgetEventType {
602  } WidgetEventType;
603 
604 
610  virtual void Release() = 0;
611 
624  virtual void InvalidateRect(int page_index, const RectF& rect, InvalidateFlag flag) = 0;
625 
636  virtual void DisplayCaret(int page_index, bool is_visible, const RectF& rect) = 0;
637 
652  virtual bool GetPopupPos(int page_index, float min_popup, float max_popup,
653  const RectF& rect_widget, RectF& inout_rect_popup) = 0;
654 
663  virtual bool PopupMenu(int page_index, const PointF& rect_popup) = 0;
664 
672  virtual int GetCurrentPage(const XFADoc& doc) = 0;
673 
682  virtual void SetCurrentPage(const XFADoc& doc, int current_page_index) = 0;
683 
691  virtual void SetChangeMark(const XFADoc& doc) = 0;
692 
700  virtual WString GetTitle(const XFADoc& doc) = 0;
701 
709  virtual void SetFocus(XFAWidget& xfa_widget) = 0;
710 
721  virtual void ExportData(const XFADoc& doc, const WString& file_path) = 0;
722 
733  virtual void ImportData(const XFADoc& doc, const WString& file_path) = 0;
734 
743  virtual void GotoURL(const XFADoc& doc, const WString& url) = 0;
744 
757  virtual void Print(const XFADoc& doc, int start_page_index, int end_page_index, uint32 options) = 0;
758 
766  virtual ARGB GetHighlightColor(const XFADoc& doc) = 0;
767 
781  virtual bool SubmitData(const XFADoc& doc, const WString& target, SubmitFormat format, TextEncoding text_encoding,
782  const WString& content) = 0;
783 
794  virtual void PageViewEvent(int page_index, PageViewEventType page_view_event_type) = 0;
795 
806  virtual void WidgetEvent(const XFAWidget& xfa_widget,WidgetEventType widget_event_type) = 0;
807 
808  protected:
809  ~DocProviderCallback() {}
810 };
811 
821 class XFADoc FS_FINAL : public Base{
822  public:
828  typedef enum _EventType {
838  } EventType;
839 
845  typedef enum _Type {
849  e_Static = 1,
851  e_XDP = 2
852  } Type;
853 
859  typedef enum _ExportDataType {
866  } ExportDataType;
867 
868 
882  XFADoc(const pdf::PDFDoc& document, DocProviderCallback* xfa_doc_provider_handler);
883 
896  XFADoc(const foxit::pdf::PDFDoc& document);
897 
903  XFADoc(const XFADoc& other);
911  XFADoc& operator = (const XFADoc& other);
912 
920  bool operator == (const XFADoc& other) const;
921 
929  bool operator != (const XFADoc& other) const;
930 
938  bool IsEmpty() const;
939 
941  ~XFADoc();
942 
961 
973 
980  Type GetType() const;
981 
987  int GetPageCount() const;
988 
997  XFAPage GetPage(int page_index);
998 
1008  bool ExportData(const char* output_file_path, ExportDataType export_type);
1009 
1019  bool ExportData(const wchar_t* output_file_path, ExportDataType export_type);
1020 
1031  void SetPDFPath(const char* pdf_file_path);
1032 
1043  void SetPDFPath(const wchar_t* pdf_file_path);
1044 
1053  bool ImportData(const char* file_path);
1054 
1063  bool ImportData(const wchar_t* file_path);
1064 
1070  void ResetForm();
1071 
1079  void FlattenTo(const char* output_file_path);
1080 
1088  void FlattenTo(const wchar_t* output_file_path);
1089 
1098  void ProcessEvent(EventType event_type);
1099 
1107  void SetFocus(XFAWidget xfa_widget);
1108 
1114  void KillFocus();
1115 
1116  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1117  explicit XFADoc(FS_HANDLE handle = NULL);
1118 };
1119 
1126 class XFAPage FS_FINAL : public Base{
1127  public:
1133  XFAPage(const XFAPage& other);
1141  XFAPage& operator = (const XFAPage& other);
1142 
1150  bool operator == (const XFAPage& other) const;
1158  bool operator != (const XFAPage& other) const;
1159 
1161  ~XFAPage();
1162 
1170  bool IsEmpty() const;
1171 
1185  Matrix GetDisplayMatrix(int left, int top, int width, int height, common::Rotation rotate);
1186 
1192  float GetWidth() const;
1193 
1199  float GetHeight() const;
1200 
1211  XFAWidget GetWidgetAtDevicePoint(const Matrix& matrix, const PointF& device_point, float tolerance);
1212 
1218  int GetIndex() const;
1219 
1225  int GetWidgetCount() const;
1226 
1235  XFAWidget GetWidget(int widget_index) const;
1236 
1237  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1238  explicit XFAPage(FS_HANDLE handle = NULL);
1239 };
1240 
1247 class XFAWidget FS_FINAL : public Base{
1248  public:
1254  typedef enum _HitTestArea {
1263  } HitTestArea;
1264 
1270  typedef enum _WidgetType {
1301  } WidgetType;
1302 
1309  typedef enum _PresenceProperty {
1320  } PresenceProperty;
1321 
1322 
1328  XFAWidget(const XFAWidget& other);
1336  XFAWidget& operator = (const XFAWidget& other);
1337 
1345  bool operator == (const XFAWidget& other) const;
1353  bool operator != (const XFAWidget& other) const;
1354 
1362  bool IsEmpty() const;
1363 
1365  ~XFAWidget();
1366 
1372  XFAPage GetXFAPage();
1373 
1379  int GetIndex() const;
1380 
1386  void ResetData();
1387 
1393  RectF GetRect();
1394 
1400  WString GetValue();
1401 
1409  void SetValue(const wchar_t* value);
1410 
1419 
1425  bool OnMouseEnter();
1426 
1432  bool OnMouseExit();
1433 
1444  bool OnLButtonDown(const PointF& point, uint32 flags);
1445 
1456  bool OnLButtonUp(const PointF& point, uint32 flags);
1457 
1468  bool OnLButtonDoubleClick(const PointF& point, uint32 flags);
1469 
1480  bool OnMouseMove(const PointF& point, uint32 flags);
1481 
1492  bool OnRButtonDown(const PointF& point, uint32 flags);
1493 
1504  bool OnRButtonUp(const PointF& point, uint32 flags);
1505 
1518  bool OnKeyDown(uint32 key_code, uint32 flags);
1519 
1532  bool OnKeyUp(uint32 key_code, uint32 flags);
1533 
1544  bool OnChar(int input_char, uint32 flags);
1545 
1554  HitTestArea OnHitTest(const PointF& point);
1555 
1562  WidgetType GetType();
1563 
1564  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1565  explicit XFAWidget(FS_HANDLE handle = NULL);
1566 };
1567 
1571 class WidgetMenu FS_FINAL : public Base {
1572  public:
1578  explicit WidgetMenu(const XFAWidget& xfa_widget);
1579 
1585  WidgetMenu(const WidgetMenu& other);
1593  WidgetMenu& operator = (const WidgetMenu& other);
1594 
1602  bool operator == (const WidgetMenu& other) const;
1610  bool operator != (const WidgetMenu& other) const;
1611 
1613  ~WidgetMenu();
1614 
1622  bool IsEmpty() const;
1623 
1629  bool CanCopy();
1630 
1636  bool CanCut();
1637 
1643  bool CanPaste();
1644 
1650  bool CanSelectAll();
1651 
1657  bool CanDelete();
1658 
1665  bool CanDeSelect();
1666 
1672  WString Copy();
1673 
1679  WString Cut();
1680 
1688  bool Paste(const wchar_t* text);
1689 
1695  bool SelectAll();
1696 
1702  bool Delete();
1703 
1709  bool DeSelect();
1710 
1717  bool CanUndo();
1718 
1725  bool CanRedo();
1726 
1732  bool Undo();
1733 
1739  bool Redo();
1740 
1746  bool Bold();
1747 
1753  bool Italic();
1754 
1760  bool Underline();
1761 
1767  bool Superscript();
1768 
1774  bool Subscript();
1775 
1781  bool ClearStyle();
1782 
1783  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1784  explicit WidgetMenu(FS_HANDLE handle = NULL);
1785 };
1786 } // namespace xfa
1787 } // namespace addon
1788 } // namespace foxit
1789 #endif // namespace foxit
1790 
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:129
int GetIndex() const
Get the index of XFA Widget in related XFA page.
Message box icon: Question.
Definition: fs_xfa.h:318
Message box button ID: Cancel.
Definition: fs_xfa.h:348
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:297
Is set, print page in reverse order; otherwise, in normal order.
Definition: fs_xfa.h:523
XFA widget type: date time edit.
Definition: fs_xfa.h:1280
Sample message: "The element [%s] has violated its allowable number of occurrences".
Definition: fs_xfa.h:241
PresenceProperty
Enumeration for presence attribute of XFA widget.
Definition: fs_xfa.h:1309
void SetValue(const wchar_t *value)
Set the value string.
Sample message: "Bad suffix on number".
Definition: fs_xfa.h:149
Sample message: "SOM expression returned list when single result was expected".
Definition: fs_xfa.h:235
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:249
Sample message: "Condition is null".
Definition: fs_xfa.h:177
void SetDocProviderCallback(foxit::addon::xfa::DocProviderCallback *doc_provider_callback)
Set XFA document provider callback.
Sample message: "Unsupported method %s.".
Definition: fs_xfa.h:116
XFA widget type: rectangle.
Definition: fs_xfa.h:1296
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:835
The submit data is packaged in URL-encoded format as described in Uniform Resource Locator(URL).
Definition: fs_xfa.h:539
XFA widget type: barcode.
Definition: fs_xfa.h:1272
XFA widget type: unknown.
Definition: fs_xfa.h:1300
bool OnLButtonUp(const PointF &point, uint32 flags)
Call this function when left mouse button is up.
XFA widget type: arc.
Definition: fs_xfa.h:1278
virtual int GetCurrentPage(const XFADoc &doc)=0
A callback function used to get index of current page.
Sample message: "An attempt was made to reference property '%s' of a non-object in SOM expression %s"...
Definition: fs_xfa.h:219
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:291
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:181
Text encoding: GB18030.
Definition: fs_xfa.h:561
HitTestArea OnHitTest(const PointF &point)
Call this function to do hit test for a specified point.
XFA widget type: signature.
Definition: fs_xfa.h:1284
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:225
Sample message: "Unable to set the value for property 'length'".
Definition: fs_xfa.h:145
Sample message: "Invalidate token '%s'".
Definition: fs_xfa.h:159
PageViewEventType
Enumeration for the event type of page view.
Definition: fs_xfa.h:583
String ID for case: Use string in local language for "July".
Definition: fs_xfa.h:271
String ID for case: If to modify field. Sample message: "Do you want to modify this field?...
Definition: fs_xfa.h:95
WidgetEventType
Enumeration for the type of xfa widget event.
Definition: fs_xfa.h:597
Message box button ID: OK.
Definition: fs_xfa.h:346
Sample message: "Unable to set the value for property 'variation'".
Definition: fs_xfa.h:135
Sample message: "Cannot find function '%s'".
Definition: fs_xfa.h:207
WidgetType
Enumeration for the type of xfa widget.
Definition: fs_xfa.h:1270
Sample message: "Validate failed".
Definition: fs_xfa.h:91
The submit data is translated and packaged into an URL-Encoded format.
Definition: fs_xfa.h:543
XFA widget type: line.
Definition: fs_xfa.h:1290
Sample message: "Not have a default property".
Definition: fs_xfa.h:125
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:139
XFAPage GetXFAPage()
Get the related XFA page, to which current XFA widget belongs.
Definition: fs_xfa.h:1126
InvalidateFlag
Enumeration for XFA invalidate flag.
Definition: fs_xfa.h:501
Presence property: Inactive. Do not participate in interaction, layout, or rendering.
Definition: fs_xfa.h:1317
bool CanDelete()
Check if the text of related XFA widget can be deleted.
Sample message: "Out of the range of '%s' array".
Definition: fs_xfa.h:211
Sample message: "Unable to set the value for property 'validationsEnabled'".
Definition: fs_xfa.h:133
Definition: fs_basictypes.h:223
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:281
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:314
String ID for case: Use string in local language for "Thursday".
Definition: fs_xfa.h:253
Sample message: "Unable to set the value for property 'platform'".
Definition: fs_xfa.h:131
Message box button ID: Yes.
Definition: fs_xfa.h:352
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:277
Message box button: Yes, No and Cancel.
Definition: fs_xfa.h:336
Definition: fs_xfa.h:1247
Event type: after a page view is removed.
Definition: fs_xfa.h:587
Header file for file operation related definitions and functions.
bool Subscript()
(Only useful for rich text) Make the rich text as subscript.
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:1288
bool Underline()
(Only useful for rich text) Underline the rich text.
AppInfo
Enumeration for XFA application information type.
Definition: fs_xfa.h:51
Presence property: Visible. Participate in interaction, layout, and rendering.
Definition: fs_xfa.h:1313
MsgBoxIconType
Enumeration for icon type of XFA message box.
Definition: fs_xfa.h:312
bool OnMouseExit()
Call this function when mouse exits.
XFAPage(const XFAPage &other)
Constructor, with another XFAPage object.
void SetPDFPath(const char *pdf_file_path)
Set the path of related PDF document.
Beep type: warning.
Definition: fs_xfa.h:75
Text encoding: GB2312.
Definition: fs_xfa.h:563
WIDE STRING CLASS.
Definition: fx_string.h:1463
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.
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.
String ID for case: Use string in local language for "November".
Definition: fs_xfa.h:279
Hit test area: Title Bar.
Definition: fs_xfa.h:1260
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:191
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:127
Definition: fs_pdfdoc.h:338
XFA widget type: text edit.
Definition: fs_xfa.h:1298
XFA widget type: numeric edit.
Definition: fs_xfa.h:1282
bool Delete()
Delete all the text of related XFA widget.
Sample message: "'%s' redefinition".
Definition: fs_xfa.h:157
Event type: after an xfa widget is added.
Definition: fs_xfa.h:599
Sample message: "'%s' argument is expected to be a container".
Definition: fs_xfa.h:217
EventType
Enumeration for XFA event type.
Definition: fs_xfa.h:828
Sample message: "Argument mismatch in property or function argument".
Definition: fs_xfa.h:229
Sample message: "Unsupported character '%c'".
Definition: fs_xfa.h:147
String ID for case: Use string in local language for "September".
Definition: fs_xfa.h:275
bool OnMouseMove(const PointF &point, uint32 flags)
Call this function when mouse moves.
PrintOption
Enumeration for XFA print options.
Definition: fs_xfa.h:513
This kind of event is triggered just before the rendering for printing begins.
Definition: fs_xfa.h:837
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 DocProviderCallback object itself.
Message box icon: Status.
Definition: fs_xfa.h:320
Invalidate all pages.
Definition: fs_xfa.h:503
String ID for case: Use string in local language for "Monday".
Definition: fs_xfa.h:247
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:541
Sample message: "The value you entered for %s is invalid.".
Definition: fs_xfa.h:293
WString Copy()
Copy the text of related XFA widget.
void ResetForm()
Reset form.
Sample message: "'%s' is not an array".
Definition: fs_xfa.h:209
XFA widget type: password edit.
Definition: fs_xfa.h:1292
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:573
No text encoding.
Definition: fs_xfa.h:553
StringID
Enumeration for string ID used to specify a case.
Definition: fs_xfa.h:89
WidgetMenu(const XFAWidget &xfa_widget)
Constructor, from XFA widget object.
Sample message: "Unknown error is caught!".
Definition: fs_xfa.h:108
The submit data is packaged in PDF format as described in the PDF Reference.
Definition: fs_xfa.h:537
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:173
String ID for case: Application's name. Sample message: "Foxit Phantom".
Definition: fs_xfa.h:101
Presence property: Hidden. Participate in interaction but not layout or rendering.
Definition: fs_xfa.h:1315
virtual void SetCurrentPage(const XFADoc &doc, int current_page_index)=0
A callback function used to set index of current page.
Message box button ID: No.
Definition: fs_xfa.h:350
TextEncoding
Enumeration for text encoding for XFA submit.
Definition: fs_xfa.h:551
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:99
Definition: fs_xfa.h:1571
Definition: fs_xfa.h:821
String ID for case: Use string in local language for "Wednesday".
Definition: fs_xfa.h:251
uint32 ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:209
Sample message: "'%s' operator cannot support array calculation".
Definition: fs_xfa.h:213
Beep type: error.
Definition: fs_xfa.h:73
String ID for case: Use string in local language for "Friday".
Definition: fs_xfa.h:255
Sample message: "Invalid node type: '%s'".
Definition: fs_xfa.h:239
Sample message: "Error:Invalid enumerated value:%s".
Definition: fs_xfa.h:299
Sample message: "Expected operator '%s' instead of '%s'".
Definition: fs_xfa.h:183
bool operator!=(const XFADoc &other) const
Not equal operator.
Application information: name.
Definition: fs_xfa.h:61
virtual WString LoadString(StringID string_id)=0
A callback function used to load a string in local language for a specified case.
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:287
Sample message: "Validate access index '%s' out of array".
Definition: fs_xfa.h:203
Is set, print page as image; otherwise, as text.
Definition: fs_xfa.h:521
Beep type: default.
Definition: fs_xfa.h:81
int GetIndex() const
Get index of the XFA page.
bool OnMouseEnter()
Call this function when mouse enters current XFA widget.
CFX_PointF PointF
Point information, in float.
Definition: fs_basictypes.h:353
void FlattenTo(const char *output_file_path)
Flatten current XFA document to a file.
Is set, shrink page to fit within content area.
Definition: fs_xfa.h:519
void ResetData()
Reset XFA Widget Data.
Text encoding: GBK.
Definition: fs_xfa.h:559
Application information: version.
Definition: fs_xfa.h:53
bool Undo()
Undo the operation of related XFA widget. (No effect for rich text)
Definition: fx_basic.h:3566
Sample message: "Invalidate character '%c'".
Definition: fs_xfa.h:155
Type of exported data: XDP.
Definition: fs_xfa.h:865
virtual ARGB GetHighlightColor(const XFADoc &doc)=0
A callback function get the highlight color.
Sample message: "Function 's' is built-in.
Definition: fs_xfa.h:221
WString GetValue()
Get the value string.
String ID for case: Use string in local language for "Saturday".
Definition: fs_xfa.h:257
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 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:169
Sample message: "%s.%s cannot covert to object".
Definition: fs_xfa.h:187
String ID for case: Use string in local language for "Sunday".
Definition: fs_xfa.h:245
Beep type: question.
Definition: fs_xfa.h:77
Definition: fs_common.h:382
String ID for case: Server denies. Sample message: "Server does not permit".
Definition: fs_xfa.h:243
XFA document type: Dynamic.
Definition: fs_xfa.h:847
String ID for case: Use string in local language for "May".
Definition: fs_xfa.h:267
Sample message: "Illegal break".
Definition: fs_xfa.h:179
Type of exported data: XML.
Definition: fs_xfa.h:861
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:1274
Message box button: OK and Cancel.
Definition: fs_xfa.h:332
Message box button: Yes and No.
Definition: fs_xfa.h:334
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:118
Presence property: Unknown.
Definition: fs_xfa.h:1311
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
Type
Enumeration for XFA document type.
Definition: fs_xfa.h:845
Sample message: "Invalidate instruction".
Definition: fs_xfa.h:199
Sample message: "The element [%s] has violated its allowable number of occurrences".
Definition: fs_xfa.h:141
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:213
bool CanPaste()
Check if the text of related XFA widget can be pasted.
Sample message: "Invalid enumerated value: %s".
Definition: fs_xfa.h:231
bool Paste(const wchar_t *text)
Paste the text to related XFA widget.
XFA widget type: check button.
Definition: fs_xfa.h:1276
MsgBoxButtonType
Enumeration for button type of XFA message box.
Definition: fs_xfa.h:328
Presence property: Invisible. Participate in interaction and layout but not rendering.
Definition: fs_xfa.h:1319
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:259
Sample message: "Expected identifier instead of '%s'".
Definition: fs_xfa.h:151
Sample message: "Cannot find const '%s'".
Definition: fs_xfa.h:195
Type of exported data: Static XDP.
Definition: fs_xfa.h:863
BeepType
Enumeration for XFA beep type.
Definition: fs_xfa.h:71
XFA document type: Static.
Definition: fs_xfa.h:849
If set, show printing dialog box.
Definition: fs_xfa.h:515
Sample message: "Invalid append operation: %s cannot have a child element of %s".
Definition: fs_xfa.h:233
Sample message: "Unable to set the value for property 'className'".
Definition: fs_xfa.h:143
Hit test area: Client.
Definition: fs_xfa.h:1258
XFADoc & operator=(const XFADoc &other)
Assign operator.
Application information: type.
Definition: fs_xfa.h:63
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:557
Text encoding: Big5.
Definition: fs_xfa.h:555
String ID for case: Use string in local language for "August".
Definition: fs_xfa.h:273
Is set, print annotations.
Definition: fs_xfa.h:525
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:333
int GetWidgetCount() const
Get the count of XFA widget.
Sample message: "Expected '%s' instead of '%s'".
Definition: fs_xfa.h:153
Sample message: "Unable to set the value for property 'version'".
Definition: fs_xfa.h:137
virtual void WidgetEvent(const XFAWidget &xfa_widget, WidgetEventType widget_event_type)=0
A callback function to execute xfa widget event.
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.
Sample message: "Compiler error".
Definition: fs_xfa.h:167
Sample message: "Value!".
Definition: fs_xfa.h:112
Sample message: "Invalidate expression '%s'".
Definition: fs_xfa.h:161
Message box button: OK.
Definition: fs_xfa.h:330
Sample message: "Cannot find method '%s'".
Definition: fs_xfa.h:193
String ID for case: Use string in local language for "April".
Definition: fs_xfa.h:265
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:505
Sample message: "Calculate Override".
Definition: fs_xfa.h:93
HitTestArea
Enumeration for hit test area of XFA widget.
Definition: fs_xfa.h:1254
Sample message: "Divide by zero".
Definition: fs_xfa.h:185
Sample message: "Message limit exceeded. Remaining %d validation errors not reported....
Definition: fs_xfa.h:285
String ID for case: Use string in local language for "March".
Definition: fs_xfa.h:263
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:123
Text encoding: UCS-2.
Definition: fs_xfa.h:571
String ID for case: Use string in local language for "June".
Definition: fs_xfa.h:269
Rotation
Enumeration for rotation.
Definition: fs_common.h:219
Is set, that means printing process can be canceled.
Definition: fs_xfa.h:517
Foxit namespace.
Definition: fs_connectedpdf.h:26
Text encoding: KSC5601.
Definition: fs_xfa.h:567
Sample message: "Invalidate left-value '%s'".
Definition: fs_xfa.h:165
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:106
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:589
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:830
Application information: language.
Definition: fs_xfa.h:55
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:344
Application information: platform.
Definition: fs_xfa.h:57
Application information: variation.
Definition: fs_xfa.h:59
Sample message: "'%s' function's %d argument cannot be array".
Definition: fs_xfa.h:215
ExportDataType
Enumeration for the type of exported data.
Definition: fs_xfa.h:859
String ID for case: Use string in local language for "February".
Definition: fs_xfa.h:261
Sample message: "%s cannot be left blank.".
Definition: fs_xfa.h:289
Sample message: "Expected number instead of '%s'".
Definition: fs_xfa.h:201
Sample message: "Undefined identifier '%s'".
Definition: fs_xfa.h:163
Sample message: "%s : %s".
Definition: fs_xfa.h:223
#define NULL
The null-pointer value.
Definition: fx_system.h:767
Hit test area: HyperLink.
Definition: fs_xfa.h:1262
bool ClearStyle()
(Only useful for rich text) Clear the style of the rich text.
Definition: fx_coordinates.h:914
bool operator==(const XFADoc &other) const
Equal operator.
Event type: before an xfa widget is removed.
Definition: fs_xfa.h:601
XFA widget type: radio button.
Definition: fs_xfa.h:1294
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:304
Sample message: "Cannot find container '%s'".
Definition: fs_xfa.h:189
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:197
Text encoding: ShiftJIS.
Definition: fs_xfa.h:569
bool IsEmpty() const
Check whether current object is empty or not.
Sample message: "Cannot assign to '%s'".
Definition: fs_xfa.h:205
Sample message: "Function '%s' does not have %d parameters".
Definition: fs_xfa.h:171
Sample message: "'%s' doesn't have property '%s'".
Definition: fs_xfa.h:237
Message box icon: Warning.
Definition: fs_xfa.h:316
Beep type: status.
Definition: fs_xfa.h:79
Text encoding: ISO8859NN.
Definition: fs_xfa.h:565
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.
Sample message: "Illegal value:cannot assign '%s' to %s.".
Definition: fs_xfa.h:295
bool operator==(const WidgetMenu &other) const
Equal operator.
Sample message: "Unable to set".
Definition: fs_xfa.h:110
virtual void Release()=0
A callback function used to release current AppProviderCallback object itself.
String ID for case: Use string in local language for "Today".
Definition: fs_xfa.h:283
Sample message: "Unexpected expression '%s'".
Definition: fs_xfa.h:175
Sample message: "Incorrect number of parameters are used when calling method '%s'".
Definition: fs_xfa.h:227
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:535
String ID for case: Some enumerate value is invalid. Sample message: "Invalid enumerate value:".
Definition: fs_xfa.h:114
Type GetType() const
Get the XFA document type.
SubmitFormat
Enumeration for XFA submit format.
Definition: fs_xfa.h:533
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:627
Hit test area: Unknown.
Definition: fs_xfa.h:1256
XFA document type: XDP, as Raw XML data.
Definition: fs_xfa.h:851
XFA widget type: choice list.
Definition: fs_xfa.h:1286
Event type: after a page view is added.
Definition: fs_xfa.h:585
Text encoding: UTF-8.
Definition: fs_xfa.h:575

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