K. Moon | 832a694 | 2022-10-31 20:11:31 +0000 | [diff] [blame] | 1 | // Copyright 2017 The PDFium Authors |
tsepez | d805eec | 2017-01-11 14:03:54 -0800 | [diff] [blame] | 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_ANNOTITERATION_H_ |
| 8 | #define FPDFSDK_CPDFSDK_ANNOTITERATION_H_ |
| 9 | |
| 10 | #include <vector> |
| 11 | |
| 12 | #include "fpdfsdk/cpdfsdk_annot.h" |
| 13 | |
| 14 | class CPDFSDK_PageView; |
| 15 | |
| 16 | class CPDFSDK_AnnotIteration { |
| 17 | public: |
| 18 | using const_iterator = |
Tom Sepez | d8ae8f8 | 2019-06-12 17:58:33 +0000 | [diff] [blame] | 19 | std::vector<ObservedPtr<CPDFSDK_Annot>>::const_iterator; |
tsepez | d805eec | 2017-01-11 14:03:54 -0800 | [diff] [blame] | 20 | |
Lei Zhang | 9e4521d | 2022-10-10 18:14:58 +0000 | [diff] [blame] | 21 | 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 Zhang | ad9ec04 | 2022-10-05 22:41:21 +0000 | [diff] [blame] | 26 | ~CPDFSDK_AnnotIteration(); |
| 27 | |
Lei Zhang | 9e4521d | 2022-10-10 18:14:58 +0000 | [diff] [blame] | 28 | const_iterator begin() const { return list_.begin(); } |
| 29 | const_iterator end() const { return list_.end(); } |
tsepez | d805eec | 2017-01-11 14:03:54 -0800 | [diff] [blame] | 30 | |
| 31 | private: |
Lei Zhang | 9e4521d | 2022-10-10 18:14:58 +0000 | [diff] [blame] | 32 | CPDFSDK_AnnotIteration(CPDFSDK_PageView* page_view, |
| 33 | bool put_focused_annot_at_end); |
| 34 | |
| 35 | std::vector<ObservedPtr<CPDFSDK_Annot>> list_; |
tsepez | d805eec | 2017-01-11 14:03:54 -0800 | [diff] [blame] | 36 | }; |
| 37 | |
tsepez | d805eec | 2017-01-11 14:03:54 -0800 | [diff] [blame] | 38 | #endif // FPDFSDK_CPDFSDK_ANNOTITERATION_H_ |