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
20class CPDF_Annot;
21class CPDF_Document;
22class CPDF_Page;
24
25class CPDF_AnnotList final : public CPDF_PageRenderContext::AnnotListIface {
26 public:
27 explicit CPDF_AnnotList(CPDF_Page* pPage);
28 ~CPDF_AnnotList() override;
29
30 void DisplayAnnots(CPDF_RenderContext* pContext,
31 bool bPrinting,
32 const CFX_Matrix& mtUser2Device,
33 bool bShowWidget);
34
35 size_t Count() const { return m_AnnotList.size(); }
36 CPDF_Annot* GetAt(size_t index) const { return m_AnnotList[index].get(); }
37 bool Contains(const CPDF_Annot* pAnnot) const;
38
39 private:
40 void DisplayPass(CPDF_RenderContext* pContext,
41 bool bPrinting,
42 const CFX_Matrix& mtMatrix,
43 bool bWidget);
44
45 UnownedPtr<CPDF_Page> const m_pPage;
46 UnownedPtr<CPDF_Document> const m_pDocument;
47
48 // The first |m_nAnnotCount| elements are from the PDF itself. The rest are
49 // generated pop-up annotations.
50 std::vector<std::unique_ptr<CPDF_Annot>> m_AnnotList;
51 size_t m_nAnnotCount = 0;
52};
53
54#endif // CORE_FPDFDOC_CPDF_ANNOTLIST_H_
fxcrt::ByteString ByteString
Definition bytestring.h:180
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
void DisplayAnnots(CPDF_RenderContext *pContext, bool bPrinting, const CFX_Matrix &mtUser2Device, bool bShowWidget)
size_t Count() const
bool Contains(const CPDF_Annot *pAnnot) const
~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
std::vector< RetainPtr< CPDF_Object > >::const_iterator const_iterator
Definition cpdf_array.h:29
bool KeyExist(const ByteString &key) const
ByteString GetByteStringFor(const ByteString &key) const
std::map< ByteString, RetainPtr< CPDF_Object >, std::less<> > DictMap
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:65
constexpr uint32_t kButtonPushbutton
Definition form_flags.h:21
constexpr uint32_t kChoiceCombo
Definition form_flags.h:36
#define CHECK(cvref)