My Project
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 
A flag specifying whether to hide the viewer application's menu bar when the document is active.
Definition: fs_pdfdocviewerprefs.h:64
PDFDoc::DisplayMode GetNonFullScreenPageMode() const
Get display mode which specifies how to display the document on exiting full-screen mode when documen...
A flag specifying whether to position the document's window in the center of the screen.
Definition: fs_pdfdocviewerprefs.h:73
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
PDFPage::BoxType GetPrintArea()
Get the page boundary representing the area of a page to be rendered when printing the document.
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 ...
PDFPage::BoxType GetViewClip()
Get the page boundary to which the contents of a page are to be clipped when viewing the document on ...
bool operator !=(const DocViewerPrefs &other) const
Not equal operator.
A flag specifying whether to resize the document's window to fit the size of the first displayed page...
Definition: fs_pdfdocviewerprefs.h:71
common::Range GetPrintRange() const
Get page range information which is used to initialize the print dialog when the print dialog is open...
Header file for common definitions and classes.
DisplayMode
Enumeration for display mode which specifies how the document should be displayed when opened.
Definition: fs_pdfdoc.h:495
A flag specifying whether the window's title bar should display the document title taken from the "Ti...
Definition: fs_pdfdocviewerprefs.h:79
void SetPrintScale(PrintScale print_scale)
Set page scaling option to be selected when a print dialog is displayed for PDF document.
PrintScale GetPrintScale() const
Get page scaling option to be selected when a print dialog is displayed for PDF document.
A flag specifying whether to hide the viewer application's tool bars when the document is active.
Definition: fs_pdfdocviewerprefs.h:62
ViewerPref
Enumeration for how various GUI elements should behave when the document is opened.
Definition: fs_pdfdocviewerprefs.h:60
DocViewerPrefs(const PDFDoc &document, objects::PDFDictionary *pdf_dict=0)
Constructor, with parameters.
Definition: fs_pdfdocviewerprefs.h:41
int GetPrintCopies() const
Get the number of copies to be printed when the print dialog is opened for PDF document.
void SetUIDisplayStatus(ViewerPref pref, bool value)
Set 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...
Header file for PDF object related definitions and classes.
PDFPage::BoxType GetPrintClip()
Get the page boundary to which the contents of a page are to be clipped when printing the document.
Foxit namespace.
Definition: fs_connectedpdf.h:26
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.
void SetNonFullScreenPageMode(PDFDoc::DisplayMode display_mode)
Set display mode which specifies how to display the document on exiting full-screen mode when documen...
This means applications should use the current print scaling.
Definition: fs_pdfdocviewerprefs.h:52
Definition: fs_pdfobject.h:763
Header file for PDF document related definitions and classes.
bool GetUIDisplayStatus(ViewerPref pref) const
Get UI display status of a specified viewer preference item type.
#define NULL
The null-pointer value.
Definition: fx_system.h:773
Definition: fs_pdfdoc.h:338
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 GetReadingDirection() const
Get the predominant reading direction for text.
objects::PDFDictionary * GetDict() const
Get PDF dictionary from current object.
A flag specifying whether to hide user interface elements in the document's window (such as scroll ba...
Definition: fs_pdfdocviewerprefs.h:69
void SetReadingDirection(bool is_left_to_right)
Set the predominant reading direction for text.
Definition: fs_common.h:1033
void SetPrintArea(PDFPage::BoxType box_type)
Set the page boundary representing the area of a page to be rendered when printing the document.
BoxType
Enumeration for page box type.
Definition: fs_pdfpage.h:352
DocViewerPrefs & operator=(const DocViewerPrefs &other)
Assign operator.
Definition: fs_basictypes.h:342
bool operator==(const DocViewerPrefs &other) const
Equal operator.
This means the print dialog should reflect no page scaling.
Definition: fs_pdfdocviewerprefs.h:50

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