1 // Copyright 2016 PDFium Authors. All rights reserved. 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 <memory> 11 #include <vector> 12 13 #include "core/fxcrt/fx_coordinates.h" 14 #include "core/fxcrt/fx_system.h" 15 16 class CFX_RenderDevice; 17 class CPDF_Annot; 18 class CPDF_Document; 19 class CPDF_Page; 20 class CPDF_RenderContext; 21 class CPDF_RenderOptions; 22 23 class CPDF_AnnotList { 24 public: 25 explicit CPDF_AnnotList(CPDF_Page* pPage); 26 ~CPDF_AnnotList(); 27 28 void DisplayAnnots(CPDF_Page* pPage, 29 CPDF_RenderContext* pContext, 30 bool bPrinting, 31 const CFX_Matrix* pMatrix, 32 bool bShowWidget, 33 CPDF_RenderOptions* pOptions); 34 35 void DisplayAnnots(CPDF_Page* pPage, 36 CFX_RenderDevice* pDevice, 37 CPDF_RenderContext* pContext, 38 bool bPrinting, 39 const CFX_Matrix* pMatrix, 40 uint32_t dwAnnotFlags, 41 CPDF_RenderOptions* pOptions, 42 FX_RECT* pClipRect); 43 Count()44 size_t Count() const { return m_AnnotList.size(); } GetAt(size_t index)45 CPDF_Annot* GetAt(size_t index) const { return m_AnnotList[index].get(); } All()46 const std::vector<std::unique_ptr<CPDF_Annot>>& All() const { 47 return m_AnnotList; 48 } 49 50 private: 51 void DisplayPass(CPDF_Page* pPage, 52 CFX_RenderDevice* pDevice, 53 CPDF_RenderContext* pContext, 54 bool bPrinting, 55 const CFX_Matrix* pMatrix, 56 bool bWidget, 57 CPDF_RenderOptions* pOptions, 58 FX_RECT* clip_rect); 59 60 CPDF_Document* const m_pDocument; 61 std::vector<std::unique_ptr<CPDF_Annot>> m_AnnotList; 62 }; 63 64 #endif // CORE_FPDFDOC_CPDF_ANNOTLIST_H_ 65