| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_INCLUDE_FSDK_ANNOTHANDLER_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ |
| 8 #define FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 | 11 |
| 12 #include "../../core/include/fxcrt/fx_basic.h" | 12 #include "../../core/include/fxcrt/fx_basic.h" |
| 13 | 13 |
| 14 class CFFL_IFormFiller; | 14 class CFFL_IFormFiller; |
| 15 class CFX_RenderDevice; | 15 class CFX_RenderDevice; |
| 16 class CPDFDoc_Environment; | 16 class CPDFDoc_Environment; |
| 17 class CPDFSDK_Annot; | 17 class CPDFSDK_Annot; |
| 18 class CPDFSDK_PageView; | 18 class CPDFSDK_PageView; |
| 19 class CPDF_Annot; | 19 class CPDF_Annot; |
| 20 class CPDF_Matrix; | 20 class CPDF_Matrix; |
| 21 class CPDF_Point; | 21 class CPDF_Point; |
| 22 class CPDF_Rect; | 22 class CPDF_Rect; |
| 23 | 23 |
| 24 class CPDFSDK_AnnotHandler { | 24 class IPDFSDK_AnnotHandler { |
| 25 public: | 25 public: |
| 26 explicit CPDFSDK_AnnotHandler(CPDFDoc_Environment* pApp) | 26 virtual ~IPDFSDK_AnnotHandler() {} |
| 27 : m_pApp(pApp), m_pFormFiller(nullptr) {} | |
| 28 | 27 |
| 29 ~CPDFSDK_AnnotHandler() {} | 28 virtual CFX_ByteString GetType() = 0; |
| 30 | 29 |
| 31 CFX_ByteString GetType() { return CFX_ByteString("Widget"); } | 30 virtual CFX_ByteString GetName() = 0; |
| 32 CFX_ByteString GetName() { return CFX_ByteString("WidgetHandler"); } | 31 |
| 33 FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot); | 32 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) = 0; |
| 34 CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage); | 33 |
| 35 void ReleaseAnnot(CPDFSDK_Annot* pAnnot); | 34 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, |
| 36 void DeleteAnnot(CPDFSDK_Annot* pAnnot) {} | 35 CPDFSDK_PageView* pPage) = 0; |
| 37 CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot); | 36 |
| 37 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot) = 0; |
| 38 |
| 39 virtual void DeleteAnnot(CPDFSDK_Annot* pAnnot) = 0; |
| 40 |
| 41 virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView, |
| 42 CPDFSDK_Annot* pAnnot) = 0; |
| 43 |
| 44 virtual FX_BOOL HitTest(CPDFSDK_PageView* pPageView, |
| 45 CPDFSDK_Annot* pAnnot, |
| 46 const CPDF_Point& point) = 0; |
| 47 |
| 48 virtual void OnDraw(CPDFSDK_PageView* pPageView, |
| 49 CPDFSDK_Annot* pAnnot, |
| 50 CFX_RenderDevice* pDevice, |
| 51 CPDF_Matrix* pUser2Device, |
| 52 FX_DWORD dwFlags) = 0; |
| 53 |
| 54 virtual void OnDrawSleep(CPDFSDK_PageView* pPageView, |
| 55 CPDFSDK_Annot* pAnnot, |
| 56 CFX_RenderDevice* pDevice, |
| 57 CPDF_Matrix* pUser2Device, |
| 58 const CPDF_Rect& rcWindow, |
| 59 FX_DWORD dwFlags) = 0; |
| 60 |
| 61 virtual void OnCreate(CPDFSDK_Annot* pAnnot) = 0; |
| 62 |
| 63 virtual void OnLoad(CPDFSDK_Annot* pAnnot) = 0; |
| 64 |
| 65 virtual void OnDelete(CPDFSDK_Annot* pAnnot) = 0; |
| 66 |
| 67 virtual void OnRelease(CPDFSDK_Annot* pAnnot) = 0; |
| 68 |
| 69 virtual void OnMouseEnter(CPDFSDK_PageView* pPageView, |
| 70 CPDFSDK_Annot* pAnnot, |
| 71 FX_DWORD nFlag) = 0; |
| 72 virtual void OnMouseExit(CPDFSDK_PageView* pPageView, |
| 73 CPDFSDK_Annot* pAnnot, |
| 74 FX_DWORD nFlag) = 0; |
| 75 |
| 76 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, |
| 77 CPDFSDK_Annot* pAnnot, |
| 78 FX_DWORD nFlags, |
| 79 const CPDF_Point& point) = 0; |
| 80 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, |
| 81 CPDFSDK_Annot* pAnnot, |
| 82 FX_DWORD nFlags, |
| 83 const CPDF_Point& point) = 0; |
| 84 virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, |
| 85 CPDFSDK_Annot* pAnnot, |
| 86 FX_DWORD nFlags, |
| 87 const CPDF_Point& point) = 0; |
| 88 virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, |
| 89 CPDFSDK_Annot* pAnnot, |
| 90 FX_DWORD nFlags, |
| 91 const CPDF_Point& point) = 0; |
| 92 virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, |
| 93 CPDFSDK_Annot* pAnnot, |
| 94 FX_DWORD nFlags, |
| 95 short zDelta, |
| 96 const CPDF_Point& point) = 0; |
| 97 virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, |
| 98 CPDFSDK_Annot* pAnnot, |
| 99 FX_DWORD nFlags, |
| 100 const CPDF_Point& point) = 0; |
| 101 virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, |
| 102 CPDFSDK_Annot* pAnnot, |
| 103 FX_DWORD nFlags, |
| 104 const CPDF_Point& point) = 0; |
| 105 virtual FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, |
| 106 CPDFSDK_Annot* pAnnot, |
| 107 FX_DWORD nFlags, |
| 108 const CPDF_Point& point) = 0; |
| 109 // by wjm. |
| 110 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, |
| 111 FX_DWORD nChar, |
| 112 FX_DWORD nFlags) = 0; |
| 113 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) = 0; |
| 114 virtual FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) = 0; |
| 115 |
| 116 virtual void OnDeSelected(CPDFSDK_Annot* pAnnot) = 0; |
| 117 virtual void OnSelected(CPDFSDK_Annot* pAnnot) = 0; |
| 118 |
| 119 virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0; |
| 120 virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) = 0; |
| 121 }; |
| 122 |
| 123 class CPDFSDK_BFAnnotHandler : public IPDFSDK_AnnotHandler { |
| 124 public: |
| 125 CPDFSDK_BFAnnotHandler(CPDFDoc_Environment* pApp) |
| 126 : m_pApp(pApp), m_pFormFiller(NULL) {} |
| 127 ~CPDFSDK_BFAnnotHandler() override {} |
| 128 |
| 129 // IPDFSDK_AnnotHandler |
| 130 CFX_ByteString GetType() override { return CFX_ByteString("Widget"); } |
| 131 CFX_ByteString GetName() override { return CFX_ByteString("WidgetHandler"); } |
| 132 FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override; |
| 133 CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) override; |
| 134 void ReleaseAnnot(CPDFSDK_Annot* pAnnot) override; |
| 135 void DeleteAnnot(CPDFSDK_Annot* pAnnot) override {} |
| 136 CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView, |
| 137 CPDFSDK_Annot* pAnnot) override; |
| 38 FX_BOOL HitTest(CPDFSDK_PageView* pPageView, | 138 FX_BOOL HitTest(CPDFSDK_PageView* pPageView, |
| 39 CPDFSDK_Annot* pAnnot, | 139 CPDFSDK_Annot* pAnnot, |
| 40 const CPDF_Point& point); | 140 const CPDF_Point& point) override; |
| 41 void OnDraw(CPDFSDK_PageView* pPageView, | 141 void OnDraw(CPDFSDK_PageView* pPageView, |
| 42 CPDFSDK_Annot* pAnnot, | 142 CPDFSDK_Annot* pAnnot, |
| 43 CFX_RenderDevice* pDevice, | 143 CFX_RenderDevice* pDevice, |
| 44 CPDF_Matrix* pUser2Device, | 144 CPDF_Matrix* pUser2Device, |
| 45 FX_DWORD dwFlags); | 145 FX_DWORD dwFlags) override; |
| 46 void OnDrawSleep(CPDFSDK_PageView* pPageView, | 146 void OnDrawSleep(CPDFSDK_PageView* pPageView, |
| 47 CPDFSDK_Annot* pAnnot, | 147 CPDFSDK_Annot* pAnnot, |
| 48 CFX_RenderDevice* pDevice, | 148 CFX_RenderDevice* pDevice, |
| 49 CPDF_Matrix* pUser2Device, | 149 CPDF_Matrix* pUser2Device, |
| 50 const CPDF_Rect& rcWindow, | 150 const CPDF_Rect& rcWindow, |
| 51 FX_DWORD dwFlags) {} | 151 FX_DWORD dwFlags) override {} |
| 52 void OnCreate(CPDFSDK_Annot* pAnnot); | 152 void OnCreate(CPDFSDK_Annot* pAnnot) override; |
| 53 void OnLoad(CPDFSDK_Annot* pAnnot); | 153 void OnLoad(CPDFSDK_Annot* pAnnot) override; |
| 54 void OnDelete(CPDFSDK_Annot* pAnnot) {} | 154 void OnDelete(CPDFSDK_Annot* pAnnot) override {} |
| 55 void OnRelease(CPDFSDK_Annot* pAnnot) {} | 155 void OnRelease(CPDFSDK_Annot* pAnnot) override {} |
| 56 void OnMouseEnter(CPDFSDK_PageView* pPageView, | 156 void OnMouseEnter(CPDFSDK_PageView* pPageView, |
| 57 CPDFSDK_Annot* pAnnot, | 157 CPDFSDK_Annot* pAnnot, |
| 58 FX_DWORD nFlag); | 158 FX_DWORD nFlag) override; |
| 59 void OnMouseExit(CPDFSDK_PageView* pPageView, | 159 void OnMouseExit(CPDFSDK_PageView* pPageView, |
| 60 CPDFSDK_Annot* pAnnot, | 160 CPDFSDK_Annot* pAnnot, |
| 61 FX_DWORD nFlag); | 161 FX_DWORD nFlag) override; |
| 62 FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, | 162 FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, |
| 63 CPDFSDK_Annot* pAnnot, | 163 CPDFSDK_Annot* pAnnot, |
| 64 FX_DWORD nFlags, | 164 FX_DWORD nFlags, |
| 65 const CPDF_Point& point); | 165 const CPDF_Point& point) override; |
| 66 FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, | 166 FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, |
| 67 CPDFSDK_Annot* pAnnot, | 167 CPDFSDK_Annot* pAnnot, |
| 68 FX_DWORD nFlags, | 168 FX_DWORD nFlags, |
| 69 const CPDF_Point& point); | 169 const CPDF_Point& point) override; |
| 70 FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, | 170 FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, |
| 71 CPDFSDK_Annot* pAnnot, | 171 CPDFSDK_Annot* pAnnot, |
| 72 FX_DWORD nFlags, | 172 FX_DWORD nFlags, |
| 73 const CPDF_Point& point); | 173 const CPDF_Point& point) override; |
| 74 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, | 174 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, |
| 75 CPDFSDK_Annot* pAnnot, | 175 CPDFSDK_Annot* pAnnot, |
| 76 FX_DWORD nFlags, | 176 FX_DWORD nFlags, |
| 77 const CPDF_Point& point); | 177 const CPDF_Point& point) override; |
| 78 FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, | 178 FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, |
| 79 CPDFSDK_Annot* pAnnot, | 179 CPDFSDK_Annot* pAnnot, |
| 80 FX_DWORD nFlags, | 180 FX_DWORD nFlags, |
| 81 short zDelta, | 181 short zDelta, |
| 82 const CPDF_Point& point); | 182 const CPDF_Point& point) override; |
| 83 FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, | 183 FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, |
| 84 CPDFSDK_Annot* pAnnot, | 184 CPDFSDK_Annot* pAnnot, |
| 85 FX_DWORD nFlags, | 185 FX_DWORD nFlags, |
| 86 const CPDF_Point& point); | 186 const CPDF_Point& point) override; |
| 87 FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, | 187 FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, |
| 88 CPDFSDK_Annot* pAnnot, | 188 CPDFSDK_Annot* pAnnot, |
| 89 FX_DWORD nFlags, | 189 FX_DWORD nFlags, |
| 90 const CPDF_Point& point); | 190 const CPDF_Point& point) override; |
| 91 FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, | 191 FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, |
| 92 CPDFSDK_Annot* pAnnot, | 192 CPDFSDK_Annot* pAnnot, |
| 93 FX_DWORD nFlags, | 193 FX_DWORD nFlags, |
| 94 const CPDF_Point& point) { | 194 const CPDF_Point& point) override { |
| 95 return FALSE; | 195 return FALSE; |
| 96 } | 196 } |
| 97 FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_DWORD nChar, FX_DWORD nFlags); | 197 FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, |
| 98 FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag); | 198 FX_DWORD nChar, |
| 99 FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag); | 199 FX_DWORD nFlags) override; |
| 100 void OnDeSelected(CPDFSDK_Annot* pAnnot) {} | 200 FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; |
| 101 void OnSelected(CPDFSDK_Annot* pAnnot) {} | 201 FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; |
| 102 FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); | 202 void OnDeSelected(CPDFSDK_Annot* pAnnot) override {} |
| 103 FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); | 203 void OnSelected(CPDFSDK_Annot* pAnnot) override {} |
| 204 FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) override; |
| 205 FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) override; |
| 104 | 206 |
| 105 void SetFormFiller(CFFL_IFormFiller* pFiller) { m_pFormFiller = pFiller; } | 207 void SetFormFiller(CFFL_IFormFiller* pFiller) { m_pFormFiller = pFiller; } |
| 106 CFFL_IFormFiller* GetFormFiller() { return m_pFormFiller; } | 208 CFFL_IFormFiller* GetFormFiller() { return m_pFormFiller; } |
| 107 | 209 |
| 108 private: | 210 private: |
| 109 CPDFDoc_Environment* m_pApp; | 211 CPDFDoc_Environment* m_pApp; |
| 110 CFFL_IFormFiller* m_pFormFiller; | 212 CFFL_IFormFiller* m_pFormFiller; |
| 111 }; | 213 }; |
| 112 | 214 |
| 113 using CBA_AnnotHandlerArray = CFX_ArrayTemplate<CPDFSDK_AnnotHandler*>; | 215 #define CBA_AnnotHandlerArray CFX_ArrayTemplate<IPDFSDK_AnnotHandler*> |
| 114 | |
| 115 class CPDFSDK_AnnotHandlerMgr { | 216 class CPDFSDK_AnnotHandlerMgr { |
| 116 public: | 217 public: |
| 117 // Destroy the handler | 218 // Destroy the handler |
| 118 explicit CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp); | 219 explicit CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp); |
| 119 virtual ~CPDFSDK_AnnotHandlerMgr(); | 220 virtual ~CPDFSDK_AnnotHandlerMgr(); |
| 120 | 221 |
| 121 void RegisterAnnotHandler(CPDFSDK_AnnotHandler* pAnnotHandler); | 222 public: |
| 122 void UnRegisterAnnotHandler(CPDFSDK_AnnotHandler* pAnnotHandler); | 223 void RegisterAnnotHandler(IPDFSDK_AnnotHandler* pAnnotHandler); |
| 224 void UnRegisterAnnotHandler(IPDFSDK_AnnotHandler* pAnnotHandler); |
| 123 | 225 |
| 124 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, | 226 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, |
| 125 CPDFSDK_PageView* pPageView); | 227 CPDFSDK_PageView* pPageView); |
| 126 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot); | 228 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot); |
| 127 | 229 |
| 128 virtual void Annot_OnCreate(CPDFSDK_Annot* pAnnot); | 230 virtual void Annot_OnCreate(CPDFSDK_Annot* pAnnot); |
| 129 virtual void Annot_OnLoad(CPDFSDK_Annot* pAnnot); | 231 virtual void Annot_OnLoad(CPDFSDK_Annot* pAnnot); |
| 130 | 232 |
| 131 CPDFSDK_AnnotHandler* GetAnnotHandler(CPDFSDK_Annot* pAnnot) const; | 233 public: |
| 234 IPDFSDK_AnnotHandler* GetAnnotHandler(CPDFSDK_Annot* pAnnot) const; |
| 132 virtual void Annot_OnDraw(CPDFSDK_PageView* pPageView, | 235 virtual void Annot_OnDraw(CPDFSDK_PageView* pPageView, |
| 133 CPDFSDK_Annot* pAnnot, | 236 CPDFSDK_Annot* pAnnot, |
| 134 CFX_RenderDevice* pDevice, | 237 CFX_RenderDevice* pDevice, |
| 135 CPDF_Matrix* pUser2Device, | 238 CPDF_Matrix* pUser2Device, |
| 136 FX_DWORD dwFlags); | 239 FX_DWORD dwFlags); |
| 137 | 240 |
| 138 virtual void Annot_OnMouseEnter(CPDFSDK_PageView* pPageView, | 241 virtual void Annot_OnMouseEnter(CPDFSDK_PageView* pPageView, |
| 139 CPDFSDK_Annot* pAnnot, | 242 CPDFSDK_Annot* pAnnot, |
| 140 FX_DWORD nFlags); | 243 FX_DWORD nFlags); |
| 141 virtual void Annot_OnMouseExit(CPDFSDK_PageView* pPageView, | 244 virtual void Annot_OnMouseExit(CPDFSDK_PageView* pPageView, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 virtual FX_BOOL Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); | 287 virtual FX_BOOL Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); |
| 185 virtual FX_BOOL Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); | 288 virtual FX_BOOL Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); |
| 186 | 289 |
| 187 virtual CPDF_Rect Annot_OnGetViewBBox(CPDFSDK_PageView* pPageView, | 290 virtual CPDF_Rect Annot_OnGetViewBBox(CPDFSDK_PageView* pPageView, |
| 188 CPDFSDK_Annot* pAnnot); | 291 CPDFSDK_Annot* pAnnot); |
| 189 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView, | 292 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView, |
| 190 CPDFSDK_Annot* pAnnot, | 293 CPDFSDK_Annot* pAnnot, |
| 191 const CPDF_Point& point); | 294 const CPDF_Point& point); |
| 192 | 295 |
| 193 private: | 296 private: |
| 194 CPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const; | 297 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const; |
| 195 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext); | 298 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext); |
| 196 | 299 |
| 300 private: |
| 197 CBA_AnnotHandlerArray m_Handlers; | 301 CBA_AnnotHandlerArray m_Handlers; |
| 198 std::map<CFX_ByteString, CPDFSDK_AnnotHandler*> m_mapType2Handler; | 302 std::map<CFX_ByteString, IPDFSDK_AnnotHandler*> m_mapType2Handler; |
| 199 CPDFDoc_Environment* m_pApp; | 303 CPDFDoc_Environment* m_pApp; |
| 200 }; | 304 }; |
| 201 | 305 |
| 202 typedef int (*AI_COMPARE)(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2); | 306 typedef int (*AI_COMPARE)(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2); |
| 203 | 307 |
| 204 class CPDFSDK_AnnotIterator { | 308 class CPDFSDK_AnnotIterator { |
| 205 public: | 309 public: |
| 206 CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView, | 310 CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView, |
| 207 FX_BOOL bReverse, | 311 FX_BOOL bReverse, |
| 208 FX_BOOL bIgnoreTopmost = FALSE, | 312 FX_BOOL bIgnoreTopmost = FALSE, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 227 CPDFSDK_Annot* NextAnnot(int& index); | 331 CPDFSDK_Annot* NextAnnot(int& index); |
| 228 CPDFSDK_Annot* PrevAnnot(int& index); | 332 CPDFSDK_Annot* PrevAnnot(int& index); |
| 229 | 333 |
| 230 CFX_PtrArray m_pIteratorAnnotList; | 334 CFX_PtrArray m_pIteratorAnnotList; |
| 231 FX_BOOL m_bReverse; | 335 FX_BOOL m_bReverse; |
| 232 FX_BOOL m_bIgnoreTopmost; | 336 FX_BOOL m_bIgnoreTopmost; |
| 233 FX_BOOL m_bCircle; | 337 FX_BOOL m_bCircle; |
| 234 }; | 338 }; |
| 235 | 339 |
| 236 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ | 340 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ |
| OLD | NEW |