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
cpdfsdk_annotiterator.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 FPDFSDK_CPDFSDK_ANNOTITERATOR_H_
8#define FPDFSDK_CPDFSDK_ANNOTITERATOR_H_
9
10#include <vector>
11
12#include "core/fpdfdoc/cpdf_annot.h"
13#include "core/fxcrt/fx_coordinates.h"
14#include "core/fxcrt/unowned_ptr.h"
15#include "third_party/base/containers/span.h"
16
17class CPDFSDK_Annot;
18class CPDFSDK_PageView;
19
21 public:
23 CPDFSDK_PageView* pPageView,
24 const std::vector<CPDF_Annot::Subtype>& subtypes_to_iterate);
26
31
32 private:
33 enum class TabOrder : uint8_t { kStructure = 0, kRow, kColumn };
34
35 static TabOrder GetTabOrder(CPDFSDK_PageView* pPageView);
36
37 void GenerateResults();
38 void CollectAnnots(std::vector<UnownedPtr<CPDFSDK_Annot>>* pArray);
39 CFX_FloatRect AddToAnnotsList(std::vector<UnownedPtr<CPDFSDK_Annot>>& sa,
40 size_t idx);
41 void AddSelectedToAnnots(std::vector<UnownedPtr<CPDFSDK_Annot>>& sa,
42 pdfium::span<const size_t> aSelect);
43
44 UnownedPtr<CPDFSDK_PageView> const m_pPageView;
45 const std::vector<CPDF_Annot::Subtype> m_subtypes;
46 const TabOrder m_eTabOrder;
47 std::vector<UnownedPtr<CPDFSDK_Annot>> m_Annots;
48};
49
50#endif // FPDFSDK_CPDFSDK_ANNOTITERATOR_H_
CPDFSDK_AnnotIterator(CPDFSDK_PageView *pPageView, const std::vector< CPDF_Annot::Subtype > &subtypes_to_iterate)
CPDFSDK_Annot * GetNextAnnot(CPDFSDK_Annot *pAnnot)
CPDFSDK_Annot * GetPrevAnnot(CPDFSDK_Annot *pAnnot)
virtual CPDF_Annot * GetPDFAnnot() const
CPDF_Page * GetPDFPage() const
CFX_FloatRect GetRect() const
bool operator==(const char *ptr) const