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