blob: ff6c2d71009ddc9721932ba4257371205b2d518d [file] [log] [blame]
K. Moon832a6942022-10-31 20:11:31 +00001// Copyright 2017 The PDFium Authors
tsepezd805eec2017-01-11 14:03:54 -08002// 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_ANNOTITERATION_H_
8#define FPDFSDK_CPDFSDK_ANNOTITERATION_H_
9
10#include <vector>
11
12#include "fpdfsdk/cpdfsdk_annot.h"
13
14class CPDFSDK_PageView;
15
16class CPDFSDK_AnnotIteration {
17 public:
18 using const_iterator =
Tom Sepezd8ae8f82019-06-12 17:58:33 +000019 std::vector<ObservedPtr<CPDFSDK_Annot>>::const_iterator;
tsepezd805eec2017-01-11 14:03:54 -080020
Lei Zhang9e4521d2022-10-10 18:14:58 +000021 static CPDFSDK_AnnotIteration CreateForDrawing(CPDFSDK_PageView* page_view);
22
23 explicit CPDFSDK_AnnotIteration(CPDFSDK_PageView* page_view);
24 CPDFSDK_AnnotIteration(const CPDFSDK_AnnotIteration&) = delete;
25 CPDFSDK_AnnotIteration& operator=(const CPDFSDK_AnnotIteration&) = delete;
Lei Zhangad9ec042022-10-05 22:41:21 +000026 ~CPDFSDK_AnnotIteration();
27
Lei Zhang9e4521d2022-10-10 18:14:58 +000028 const_iterator begin() const { return list_.begin(); }
29 const_iterator end() const { return list_.end(); }
tsepezd805eec2017-01-11 14:03:54 -080030
31 private:
Lei Zhang9e4521d2022-10-10 18:14:58 +000032 CPDFSDK_AnnotIteration(CPDFSDK_PageView* page_view,
33 bool put_focused_annot_at_end);
34
35 std::vector<ObservedPtr<CPDFSDK_Annot>> list_;
tsepezd805eec2017-01-11 14:03:54 -080036};
37
tsepezd805eec2017-01-11 14:03:54 -080038#endif // FPDFSDK_CPDFSDK_ANNOTITERATION_H_