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_annotlist.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_ANNOTLIST_H_
8#define CORE_FPDFDOC_CPDF_ANNOTLIST_H_
9
10#include <stddef.h>
11#include <stdint.h>
12
13#include <memory>
14#include <vector>
15
16#include "core/fpdfapi/render/cpdf_pagerendercontext.h"
17#include "core/fxcrt/fx_coordinates.h"
18#include "core/fxcrt/unowned_ptr.h"
19
21class CPDF_Annot;
22class CPDF_Document;
23class CPDF_Page;
25
26class CPDF_AnnotList final : public CPDF_PageRenderContext::AnnotListIface {
27 public:
28 explicit CPDF_AnnotList(CPDF_Page* pPage);
29 ~CPDF_AnnotList() override;
30
31 void DisplayAnnots(CPDF_Page* pPage,
32 CFX_RenderDevice* pDevice,
33 CPDF_RenderContext* pContext,
34 bool bPrinting,
35 const CFX_Matrix& mtUser2Device,
36 bool bShowWidget);
37
38 size_t Count() const { return m_AnnotList.size(); }
39 CPDF_Annot* GetAt(size_t index) const { return m_AnnotList[index].get(); }
40 bool Contains(const CPDF_Annot* pAnnot) const;
41
42 private:
43 void DisplayPass(CPDF_Page* pPage,
44 CFX_RenderDevice* pDevice,
45 CPDF_RenderContext* pContext,
46 bool bPrinting,
47 const CFX_Matrix& mtMatrix,
48 bool bWidget);
49
50 UnownedPtr<CPDF_Document> const m_pDocument;
51
52 // The first |m_nAnnotCount| elements are from the PDF itself. The rest are
53 // generated pop-up annotations.
54 std::vector<std::unique_ptr<CPDF_Annot>> m_AnnotList;
55 size_t m_nAnnotCount = 0;
56};
57
58#endif // CORE_FPDFDOC_CPDF_ANNOTLIST_H_
constexpr CFX_FloatRect(float l, float b, float r, float t)
float Width() const
float Height() const
void Translate(float e, float f)
CPDF_Annot * GetAt(size_t index) const
size_t Count() const
bool Contains(const CPDF_Annot *pAnnot) const
void DisplayAnnots(CPDF_Page *pPage, CFX_RenderDevice *pDevice, CPDF_RenderContext *pContext, bool bPrinting, const CFX_Matrix &mtUser2Device, bool bShowWidget)
~CPDF_AnnotList() override
CPDF_AnnotList(CPDF_Page *pPage)
Subtype GetSubtype() const
const CPDF_Dictionary * GetAnnotDict() const
Definition cpdf_annot.h:83
void SetPopupAnnot(CPDF_Annot *pAnnot)
Definition cpdf_annot.h:103
bool KeyExist(const ByteString &key) const
ByteString GetByteStringFor(const ByteString &key) const
CFX_FloatRect GetRectFor(const ByteString &key) const
static void GenerateFormAP(CPDF_Document *pDoc, CPDF_Dictionary *pAnnotDict, FormType type)
float GetPageWidth() const override
Definition cpdf_page.cpp:55
bool operator==(const char *ptr) const
bool operator!=(const char *ptr) const
Definition bytestring.h:130
constexpr uint32_t kButtonPushbutton
Definition form_flags.h:21
constexpr uint32_t kChoiceCombo
Definition form_flags.h:36