fs_actioncallback.h
Go to the documentation of this file.
1 
15 #ifndef FS_ACTIONCALLBACK_H_
16 #define FS_ACTIONCALLBACK_H_
17 
18 #include "common/fs_common.h"
24 namespace foxit {
26 class MenuList FS_FINAL : public Object {
27  public:
29  MenuList() : level(0) {}
30 
37  MenuList(int level, const wchar_t* name) {
38  this->level = level;
39  if (name)
40  this->name = name;
41  }
42 
48  MenuList(const MenuList& menu_list) {
49  level = menu_list.level;
50  name = menu_list.name;
51  }
52 
61  void Set(int level, const wchar_t* name) {
62  this->level = level;
63  if (name)
64  this->name = name;
65  }
66 
68  int level;
71 };
72 
74 FSDK_DEFINE_ARRAY(MenuListArray, MenuList)
75 
76 
80 class IdentityProperties FS_FINAL : public Object {
81  public:
84 
93  IdentityProperties(const wchar_t* corporation, const wchar_t* email, const wchar_t* login_name, const wchar_t* name)
94  : corporation(corporation)
95  , email(email)
96  , login_name(login_name)
97  , name(name) {}
98 
104  IdentityProperties(const IdentityProperties& id_properities)
105  : corporation(id_properities.corporation)
106  , email(id_properities.email)
107  , login_name(id_properities.login_name)
108  , name(id_properities.name) {}
109 
120  void Set(const wchar_t* corporation, const wchar_t* email, const wchar_t* login_name, const wchar_t* name) {
121  this->corporation = corporation;
122  this->email = email;
123  this->login_name = login_name;
124  this->name = name;
125  }
126 
135 };
136 
143  public:
149  typedef enum _Language {
182  } Language;
183 
189  typedef enum _AppInfoType {
200  } AppInfoType;
201 
207  typedef enum _MailType {
214  } MailType;
215 
216 
222  virtual void Release() = 0;
223 
236  virtual bool InvalidateRect(const pdf::PDFDoc& document, int page_index, const RectF& pdf_rect) = 0;
237 
248  virtual int GetCurrentPage(const pdf::PDFDoc& document) = 0;
249 
261  virtual void SetCurrentPage(const pdf::PDFDoc& document, int page_index) = 0;
262 
276  virtual common::Rotation GetPageRotation(const pdf::PDFDoc& document, int page_index) = 0;
277 
291  virtual bool SetPageRotation(const pdf::PDFDoc& document, int page_index, common::Rotation rotation) = 0;
292 
305  virtual bool ExecuteNamedAction(const pdf::PDFDoc& document, const char* named_action) = 0;
306 
319  virtual bool SetDocChangeMark(const pdf::PDFDoc& document, bool change_mark) = 0;
320 
332  virtual bool GetDocChangeMark(const pdf::PDFDoc& document) = 0;
333 
342  virtual int GetOpenedDocCount() = 0;
343 
355  virtual pdf::PDFDoc GetOpenedDoc(int index) = 0;
356 
374  virtual bool Beep(int type) = 0;
375 
395  virtual WString Response(const wchar_t* question, const wchar_t* title, const wchar_t* default_value,
396  const wchar_t* label, bool is_password) = 0;
397 
408  virtual WString GetFilePath(const pdf::PDFDoc& document) = 0;
409 
433  virtual bool Print(const pdf::PDFDoc& document, bool is_ui,
434  const common::Range& page_range, bool is_silent ,
435  bool is_shrunk_to_fit, bool is_printed_as_image,
436  bool is_reversed, bool is_to_print_annots) = 0;
437 
451  virtual bool SubmitForm(const pdf::PDFDoc& document, void* form_data, uint32 length, const char* url) = 0;
452 
463  virtual bool LaunchURL(const char* url) = 0;
464 
473  virtual WString BrowseFile() = 0;
474 
484  virtual Language GetLanguage() = 0;
485 
517  virtual int Alert(const wchar_t* msg, const wchar_t* title, int type, int icon) = 0;
518 
528 
540  virtual WString PopupMenu(const MenuListArray& menus) = 0;
541 
556  virtual WString GetAppInfo(AppInfoType type) = 0;
557 
590  virtual bool MailData(void* data, MailType data_type, bool is_ui, const wchar_t* to,
591  const wchar_t* subject, const wchar_t* cc, const wchar_t* bcc, const wchar_t* message) = 0;
592 
593  protected:
594  ~ActionCallback() {}
595 };
596 } // namespace foxit
597 
598 #endif // FS_ACTIONCALLBACK_H_
599 
virtual void Release()=0
A callback function used to release current ActionCallback object itself.
MailType
Enumeration for data type to be mailed.
Definition: fs_actioncallback.h:207
virtual int Alert(const wchar_t *msg, const wchar_t *title, int type, int icon)=0
A callback function used to pop up a dialog to show warnings or hints.
virtual bool Beep(int type)=0
A callback function to cause the system to play a sound.
Mailed data type: string message.
Definition: fs_actioncallback.h:213
French.
Definition: fs_actioncallback.h:165
virtual int GetOpenedDocCount()=0
A callback function to receive the count of opened documents.
Definition: fs_common.h:1026
WString name
The title of menu.
Definition: fs_actioncallback.h:70
Definition: fs_actioncallback.h:74
CFX_Object Object
Object type.
Definition: fs_basictypes.h:216
virtual WString GetFilePath(const pdf::PDFDoc &document)=0
A callback function to get the file path of current PDF document.
virtual Language GetLanguage()=0
A callback function to get the language of the running viewer application.
int level
The level of menu.
Definition: fs_actioncallback.h:68
Unknown language.
Definition: fs_actioncallback.h:151
Definition: fs_actioncallback.h:80
IdentityProperties()
Constructor.
Definition: fs_actioncallback.h:83
Application's app version information.
Definition: fs_actioncallback.h:199
Brazilian Portuguese.
Definition: fs_actioncallback.h:177
Mailed data type: document.
Definition: fs_actioncallback.h:209
Application's forms version information.
Definition: fs_actioncallback.h:191
virtual void SetCurrentPage(const pdf::PDFDoc &document, int page_index)=0
A callback function used to set the current page by index.
virtual bool SetPageRotation(const pdf::PDFDoc &document, int page_index, common::Rotation rotation)=0
A callback function used to set the rotation value of a page on PDF viewer.
German.
Definition: fs_actioncallback.h:159
virtual common::Rotation GetPageRotation(const pdf::PDFDoc &document, int page_index)=0
A callback function used to receive current displaying rotation of a page on PDF viewer.
MenuList(int level, const wchar_t *name)
Constructor, with parameters.
Definition: fs_actioncallback.h:37
virtual WString Response(const wchar_t *question, const wchar_t *title, const wchar_t *default_value, const wchar_t *label, bool is_password)=0
A callback function to display a dialog box containing a question and an entry field for the user to ...
Norwegian.
Definition: fs_actioncallback.h:175
WIDE STRING CLASS.
Definition: fx_string.h:1463
Definition: fs_pdfdoc.h:338
Chinese Simplified.
Definition: fs_actioncallback.h:153
Language
Enumeration for language.
Definition: fs_actioncallback.h:149
WString corporation
The corporation name.
Definition: fs_actioncallback.h:128
void Set(const wchar_t *corporation, const wchar_t *email, const wchar_t *login_name, const wchar_t *name)
Set values.
Definition: fs_actioncallback.h:120
AppInfoType
Enumeration for application's information type.
Definition: fs_actioncallback.h:189
void Set(int level, const wchar_t *name)
Set values.
Definition: fs_actioncallback.h:61
MenuList(const MenuList &menu_list)
Constructor, with another MenuList.
Definition: fs_actioncallback.h:48
Definition: fs_actioncallback.h:142
virtual bool ExecuteNamedAction(const pdf::PDFDoc &document, const char *named_action)=0
A callback function to execute a named action.
WString name
The user name.
Definition: fs_actioncallback.h:134
virtual WString PopupMenu(const MenuListArray &menus)=0
A callback function to pop up a menu window.
Dutch.
Definition: fs_actioncallback.h:173
virtual bool InvalidateRect(const pdf::PDFDoc &document, int page_index, const RectF &pdf_rect)=0
A callback function to invalidate the client area within the specified rectangle.
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
IdentityProperties(const wchar_t *corporation, const wchar_t *email, const wchar_t *login_name, const wchar_t *name)
Constructor, with parameters.
Definition: fs_actioncallback.h:93
Header file for common definitions and classes.
Definition: fs_actioncallback.h:26
Danish.
Definition: fs_actioncallback.h:157
virtual bool SetDocChangeMark(const pdf::PDFDoc &document, bool change_mark)=0
A callback function to set the change mark which indicates whether the content of document is changed...
virtual bool GetDocChangeMark(const pdf::PDFDoc &document)=0
A callback function to receive the change mark which indicates whether the content of document is cha...
IdentityProperties(const IdentityProperties &id_properities)
Constructor, with another IdentityProperties.
Definition: fs_actioncallback.h:104
virtual pdf::PDFDoc GetOpenedDoc(int index)=0
A callback function to receive an opened PDF document object by index.
Mailed data type: form.
Definition: fs_actioncallback.h:211
virtual IdentityProperties GetIdentityProperties()=0
A callback function used to get identity properties of current user.
virtual bool MailData(void *data, MailType data_type, bool is_ui, const wchar_t *to, const wchar_t *subject, const wchar_t *cc, const wchar_t *bcc, const wchar_t *message)=0
A callback function to mail data or message, with or without user interaction.
WString login_name
The login name. Usually, this is the name used to log in current operating system.
Definition: fs_actioncallback.h:132
Korean.
Definition: fs_actioncallback.h:169
Rotation
Enumeration for rotation.
Definition: fs_common.h:219
Foxit namespace.
Definition: fs_connectedpdf.h:26
virtual bool Print(const pdf::PDFDoc &document, bool is_ui, const common::Range &page_range, bool is_silent, bool is_shrunk_to_fit, bool is_printed_as_image, bool is_reversed, bool is_to_print_annots)=0
A callback function to print pages within a specified index range.
MenuList()
Constructor.
Definition: fs_actioncallback.h:29
virtual WString GetAppInfo(AppInfoType type)=0
A callback function to get application information.
Italian.
Definition: fs_actioncallback.h:167
Spanish.
Definition: fs_actioncallback.h:163
Application's viewer version information.
Definition: fs_actioncallback.h:197
virtual bool SubmitForm(const pdf::PDFDoc &document, void *form_data, uint32 length, const char *url)=0
A callback function to submit the form data to a specified url.
Swedish.
Definition: fs_actioncallback.h:181
English.
Definition: fs_actioncallback.h:161
virtual bool LaunchURL(const char *url)=0
A callback function to launch to a specified url.
Finnish.
Definition: fs_actioncallback.h:179
Application's viewer variation information.
Definition: fs_actioncallback.h:195
Application's viewer type information.
Definition: fs_actioncallback.h:193
WString email
The email address.
Definition: fs_actioncallback.h:130
virtual int GetCurrentPage(const pdf::PDFDoc &document)=0
A callback function used to receive current page index.
virtual WString BrowseFile()=0
A callback function to show a file selection dialog, and the selected file path should be returned.
Chinese Traditional.
Definition: fs_actioncallback.h:155
Japanese.
Definition: fs_actioncallback.h:171
Definition: fx_coordinates.h:627

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