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_annotcontext.h
Go to the documentation of this file.
1// Copyright 2018 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_ANNOTCONTEXT_H_
8#define CORE_FPDFAPI_PAGE_CPDF_ANNOTCONTEXT_H_
9
10#include <memory>
11
12#include "core/fxcrt/retain_ptr.h"
13#include "core/fxcrt/unowned_ptr.h"
14
15class CPDF_Dictionary;
16class CPDF_Form;
17class CPDF_Stream;
18class IPDF_Page;
19
20#ifdef SetForm
21#undef SetForm
22#endif
23
25 public:
26 CPDF_AnnotContext(RetainPtr<CPDF_Dictionary> pAnnotDict, IPDF_Page* pPage);
28
29 void SetForm(RetainPtr<CPDF_Stream> pStream);
30 bool HasForm() const { return !!m_pAnnotForm; }
31 CPDF_Form* GetForm() const { return m_pAnnotForm.get(); }
32
33 // Never nullptr.
34 RetainPtr<CPDF_Dictionary> GetMutableAnnotDict() { return m_pAnnotDict; }
35 const CPDF_Dictionary* GetAnnotDict() const { return m_pAnnotDict.Get(); }
36
37 // Never nullptr.
38 IPDF_Page* GetPage() const { return m_pPage; }
39
40 private:
41 std::unique_ptr<CPDF_Form> m_pAnnotForm;
42 RetainPtr<CPDF_Dictionary> const m_pAnnotDict;
43 UnownedPtr<IPDF_Page> const m_pPage;
44};
45
46#endif // CORE_FPDFAPI_PAGE_CPDF_ANNOTCONTEXT_H_
CFX_Matrix()=default
RetainPtr< CPDF_Dictionary > GetMutableAnnotDict()
void SetForm(RetainPtr< CPDF_Stream > pStream)
CPDF_AnnotContext(RetainPtr< CPDF_Dictionary > pAnnotDict, IPDF_Page *pPage)
CPDF_Form * GetForm() const
IPDF_Page * GetPage() const
const CPDF_Dictionary * GetAnnotDict() const