OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef FPDFSDK_CBA_ANNOTITERATOR_H_ | 7 #ifndef FPDFSDK_CBA_ANNOTITERATOR_H_ |
8 #define FPDFSDK_CBA_ANNOTITERATOR_H_ | 8 #define FPDFSDK_CBA_ANNOTITERATOR_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 13 matching lines...) Expand all Loading... |
24 CPDF_Annot::Subtype nAnnotSubtype); | 24 CPDF_Annot::Subtype nAnnotSubtype); |
25 ~CBA_AnnotIterator(); | 25 ~CBA_AnnotIterator(); |
26 | 26 |
27 CPDFSDK_Annot* GetFirstAnnot(); | 27 CPDFSDK_Annot* GetFirstAnnot(); |
28 CPDFSDK_Annot* GetLastAnnot(); | 28 CPDFSDK_Annot* GetLastAnnot(); |
29 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pAnnot); | 29 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pAnnot); |
30 CPDFSDK_Annot* GetPrevAnnot(CPDFSDK_Annot* pAnnot); | 30 CPDFSDK_Annot* GetPrevAnnot(CPDFSDK_Annot* pAnnot); |
31 | 31 |
32 private: | 32 private: |
33 void GenerateResults(); | 33 void GenerateResults(); |
34 static CFX_FloatRect GetAnnotRect(const CPDFSDK_Annot* pAnnot); | 34 void CollectAnnots(std::vector<CPDFSDK_Annot*>* pArray); |
35 | 35 CFX_FloatRect AddToAnnotsList(std::vector<CPDFSDK_Annot*>* sa, size_t idx); |
36 // Function signature compatible with std::sort(). | 36 void AddSelectedToAnnots(std::vector<CPDFSDK_Annot*>* sa, |
37 static bool CompareByLeftAscending(const CPDFSDK_Annot* p1, | 37 std::vector<size_t>* aSelect); |
38 const CPDFSDK_Annot* p2); | |
39 static bool CompareByTopDescending(const CPDFSDK_Annot* p1, | |
40 const CPDFSDK_Annot* p2); | |
41 | 38 |
42 TabOrder m_eTabOrder; | 39 TabOrder m_eTabOrder; |
43 CPDFSDK_PageView* m_pPageView; | 40 CPDFSDK_PageView* m_pPageView; |
44 CPDF_Annot::Subtype m_nAnnotSubtype; | 41 CPDF_Annot::Subtype m_nAnnotSubtype; |
45 std::vector<CPDFSDK_Annot*> m_Annots; | 42 std::vector<CPDFSDK_Annot*> m_Annots; |
46 }; | 43 }; |
47 | 44 |
48 #endif // FPDFSDK_CBA_ANNOTITERATOR_H_ | 45 #endif // FPDFSDK_CBA_ANNOTITERATOR_H_ |
OLD | NEW |