Foxit PDF SDK
fs_pdfdocviewerprefs.h
Go to the documentation of this file.
1 
15 #ifndef FS_PDFDOCVIEWERPREFS_H_
16 #define FS_PDFDOCVIEWERPREFS_H_
17 
18 #include "common/fs_common.h"
19 #include "fs_pdfdoc.h"
20 #include "objects/fs_pdfobject.h"
21 
27 namespace foxit {
31 namespace pdf {
41 class DocViewerPrefs FS_FINAL : public Base {
42  public:
48  typedef enum _PrintScale {
53  } PrintScale;
54 
60  typedef enum _ViewerPref {
80  } ViewerPref;
81 
82 
100  explicit DocViewerPrefs(const PDFDoc& document, objects::PDFDictionary* pdf_dict = NULL);
101 
103  ~DocViewerPrefs();
109  DocViewerPrefs(const DocViewerPrefs& other);
118 
126  bool operator == (const DocViewerPrefs& other) const;
134  bool operator != (const DocViewerPrefs& other) const;
142  bool IsEmpty() const;
151  bool GetUIDisplayStatus(ViewerPref pref) const;
152 
165  void SetUIDisplayStatus(ViewerPref pref, bool value);
166 
183 
202 
212  bool GetReadingDirection() const;
213 
226  void SetReadingDirection(bool is_left_to_right);
227 
236 
246  void SetViewArea(PDFPage::BoxType box_type);
247 
256 
266  void SetViewClip(PDFPage::BoxType box_type);
267 
275 
284  void SetPrintArea(PDFPage::BoxType box_type);
285 
293 
302  void SetPrintClip(PDFPage::BoxType box_type);
303 
310  PrintScale GetPrintScale() const;
311 
320  void SetPrintScale(PrintScale print_scale);
321 
327  int GetPrintCopies() const;
328 
337  void SetPrintCopies(int print_copies);
338 
350 
362  void SetPrintRange(const common::Range& page_range);
363 
370 
371  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
372  explicit DocViewerPrefs(FS_HANDLE handle = NULL);
373 };
374 } // namespace pdf
375 } // namespace foxit
376 #endif // FS_PDFDOCVIEWERPREFS_H_
377 
void SetPrintClip(PDFPage::BoxType box_type)
Set the page boundary to which the contents of a page are to be clipped when printing the document.
A flag specifying whether to position the document's window in the center of the screen.
Definition: fs_pdfdocviewerprefs.h:73
Definition: fs_common.h:1160
A flag specifying whether to hide the viewer application's tool bars when the document is active.
Definition: fs_pdfdocviewerprefs.h:62
common::Range GetPrintRange() const
Get page range information which is used to initialize the print dialog when the print dialog is open...
DocViewerPrefs & operator=(const DocViewerPrefs &other)
Assign operator.
PDFPage::BoxType GetPrintClip()
Get the page boundary to which the contents of a page are to be clipped when printing the document.
Header file for PDF document related definitions and classes.
ViewerPref
Enumeration for how various GUI elements should behave when the document is opened.
Definition: fs_pdfdocviewerprefs.h:60
A flag specifying whether to hide the viewer application's menu bar when the document is active.
Definition: fs_pdfdocviewerprefs.h:64
PrintScale
Enumeration for page scaling option.
Definition: fs_pdfdocviewerprefs.h:48
void SetViewClip(PDFPage::BoxType box_type)
Set the page boundary to which the contents of a page are to be clipped when viewing the document on ...
PrintScale GetPrintScale() const
Get page scaling option to be selected when a print dialog is displayed for PDF document.
DocViewerPrefs(const PDFDoc &document, objects::PDFDictionary *pdf_dict=0)
Constructor, with parameters.
objects::PDFDictionary * GetDict() const
Get PDF dictionary from current object.
BoxType
Enumeration for page box type.
Definition: fs_pdfpage.h:358
Definition: fs_pdfdoc.h:352
A flag specifying whether to resize the document's window to fit the size of the first displayed page...
Definition: fs_pdfdocviewerprefs.h:71
This means the print dialog should reflect no page scaling.
Definition: fs_pdfdocviewerprefs.h:50
A flag specifying whether the window's title bar should display the document title taken from the "Ti...
Definition: fs_pdfdocviewerprefs.h:79
void SetPrintArea(PDFPage::BoxType box_type)
Set the page boundary representing the area of a page to be rendered when printing the document.
This means applications should use the current print scaling.
Definition: fs_pdfdocviewerprefs.h:52
bool operator!=(const DocViewerPrefs &other) const
Not equal operator.
PDFPage::BoxType GetPrintArea()
Get the page boundary representing the area of a page to be rendered when printing the document.
void SetReadingDirection(bool is_left_to_right)
Set the predominant reading direction for text.
DisplayMode
Enumeration for display mode which specifies how the document should be displayed when opened.
Definition: fs_pdfdoc.h:548
Definition: fs_pdfdocviewerprefs.h:41
PDFPage::BoxType GetViewArea()
Get the page boundary representing the area of a page to be displayed when viewing the document on th...
bool IsEmpty() const
Check whether current object is empty or not.
bool operator==(const DocViewerPrefs &other) const
Equal operator.
PDFDoc::DisplayMode GetNonFullScreenPageMode() const
Get display mode which specifies how to display the document on exiting full-screen mode when documen...
int GetPrintCopies() const
Get the number of copies to be printed when the print dialog is opened for PDF document.
PDFPage::BoxType GetViewClip()
Get the page boundary to which the contents of a page are to be clipped when viewing the document on ...
void SetPrintCopies(int print_copies)
Set the number of copies to be printed when the print dialog is opened for PDF document.
void SetViewArea(PDFPage::BoxType box_type)
Set the page boundary representing the area of a page to be displayed when viewing the document on th...
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
void SetNonFullScreenPageMode(PDFDoc::DisplayMode display_mode)
Set display mode which specifies how to display the document on exiting full-screen mode when documen...
Header file for common definitions and classes.
A flag specifying whether to hide user interface elements in the document's window (such as scroll ba...
Definition: fs_pdfdocviewerprefs.h:69
Header file for PDF object related definitions and classes.
Definition: fs_basictypes.h:393
bool GetReadingDirection() const
Get the predominant reading direction for text.
Definition: fs_pdfobject.h:763
Foxit namespace.
Definition: fs_compare.h:27
#define NULL
The null-pointer value.
Definition: fx_system.h:767
bool GetUIDisplayStatus(ViewerPref pref) const
Get UI display status of a specified viewer preference item type.
void SetPrintRange(const common::Range &page_range)
Set the page range which is used to initialize the print dialog when the print dialog is opened for t...
void SetPrintScale(PrintScale print_scale)
Set page scaling option to be selected when a print dialog is displayed for PDF document.
void SetUIDisplayStatus(ViewerPref pref, bool value)
Set UI display status of a specified viewer preference item type.