Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_viewerpreferences.h
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FPDFDOC_CPDF_VIEWERPREFERENCES_H_
8#define CORE_FPDFDOC_CPDF_VIEWERPREFERENCES_H_
9
10#include <stdint.h>
11
12#include <optional>
13
14#include "core/fxcrt/bytestring.h"
15#include "core/fxcrt/retain_ptr.h"
16#include "core/fxcrt/unowned_ptr.h"
17
18class CPDF_Array;
19class CPDF_Dictionary;
20class CPDF_Document;
21
23 public:
24 explicit CPDF_ViewerPreferences(const CPDF_Document* pDoc);
26
27 bool IsDirectionR2L() const;
28 bool PrintScaling() const;
29 int32_t NumCopies() const;
30 RetainPtr<const CPDF_Array> PrintPageRange() const;
31 ByteString Duplex() const;
32
33 // Gets the entry for |bsKey|.
34 std::optional<ByteString> GenericName(const ByteString& bsKey) const;
35
36 private:
37 RetainPtr<const CPDF_Dictionary> GetViewerPreferences() const;
38
39 UnownedPtr<const CPDF_Document> const m_pDoc;
40};
41
42#endif // CORE_FPDFDOC_CPDF_VIEWERPREFERENCES_H_
fxcrt::ByteString ByteString
Definition bytestring.h:180
std::vector< RetainPtr< CPDF_Object > >::const_iterator const_iterator
Definition cpdf_array.h:29
RetainPtr< const CPDF_Dictionary > GetDictFor(const ByteString &key) const
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
std::optional< ByteString > GenericName(const ByteString &bsKey) const
RetainPtr< const CPDF_Array > PrintPageRange() const
CPDF_ViewerPreferences(const CPDF_Document *pDoc)
ByteString(const char *ptr)