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_occontext.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_FPDFAPI_PAGE_CPDF_OCCONTEXT_H_
8#define CORE_FPDFAPI_PAGE_CPDF_OCCONTEXT_H_
9
10#include <functional>
11#include <map>
12
13#include "core/fxcrt/bytestring.h"
14#include "core/fxcrt/retain_ptr.h"
15#include "core/fxcrt/unowned_ptr.h"
16
17class CPDF_Array;
18class CPDF_Dictionary;
19class CPDF_Document;
20class CPDF_PageObject;
21
22class CPDF_OCContext final : public Retainable {
23 public:
25
27
28 bool CheckOCGDictVisible(const CPDF_Dictionary* pOCGDict) const;
29 bool CheckPageObjectVisible(const CPDF_PageObject* pObj) const;
30
31 private:
32 CPDF_OCContext(CPDF_Document* pDoc, UsageType eUsageType);
33 ~CPDF_OCContext() override;
34
35 bool LoadOCGStateFromConfig(const ByteString& csConfig,
36 const CPDF_Dictionary* pOCGDict) const;
37 bool LoadOCGState(const CPDF_Dictionary* pOCGDict) const;
38 bool GetOCGVisible(const CPDF_Dictionary* pOCGDict) const;
39 bool GetOCGVE(const CPDF_Array* pExpression, int nLevel) const;
40 bool LoadOCMDState(const CPDF_Dictionary* pOCMDDict) const;
41
42 UnownedPtr<CPDF_Document> const m_pDocument;
43 const UsageType m_eUsageType;
44 mutable std::map<RetainPtr<const CPDF_Dictionary>, bool, std::less<>>
45 m_OGCStateCache;
46};
47
48#endif // CORE_FPDFAPI_PAGE_CPDF_OCCONTEXT_H_
const ByteString & GetName() const
ParamType GetParamType() const
RetainPtr< const CPDF_Dictionary > GetParam() const
ByteString GetByteStringFor(const ByteString &key, const ByteString &default_str) const
bool CheckPageObjectVisible(const CPDF_PageObject *pObj) const
bool CheckOCGDictVisible(const CPDF_Dictionary *pOCGDict) const
~CPDF_OCContext() override
const CPDF_ContentMarks * GetContentMarks() const
bool operator==(const char *ptr) const
ByteString & operator=(const char *str)
bool operator!=(const char *ptr) const
Definition bytestring.h:130
ByteString operator+(const ByteString &str1, const char *str2)
Definition bytestring.h:279
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224