| 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_MGR_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_ |
| 8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 CPDF_OCContext* m_pOccontent; | 284 CPDF_OCContext* m_pOccontent; |
| 285 FX_BOOL m_bChangeMask; | 285 FX_BOOL m_bChangeMask; |
| 286 }; | 286 }; |
| 287 class CPDFSDK_PageView final { | 287 class CPDFSDK_PageView final { |
| 288 public: | 288 public: |
| 289 CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc, CPDF_Page* page); | 289 CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc, CPDF_Page* page); |
| 290 ~CPDFSDK_PageView(); | 290 ~CPDFSDK_PageView(); |
| 291 void PageView_OnDraw(CFX_RenderDevice* pDevice, | 291 void PageView_OnDraw(CFX_RenderDevice* pDevice, |
| 292 CPDF_Matrix* pUser2Device, | 292 CPDF_Matrix* pUser2Device, |
| 293 CPDF_RenderOptions* pOptions); | 293 CPDF_RenderOptions* pOptions); |
| 294 CPDF_Annot* GetPDFAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); | 294 const CPDF_Annot* GetPDFAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); |
| 295 CPDFSDK_Annot* GetFXAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); | 295 CPDFSDK_Annot* GetFXAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); |
| 296 CPDF_Annot* GetPDFWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); | 296 const CPDF_Annot* GetPDFWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); |
| 297 CPDFSDK_Annot* GetFXWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); | 297 CPDFSDK_Annot* GetFXWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); |
| 298 CPDFSDK_Annot* GetFocusAnnot(); | 298 CPDFSDK_Annot* GetFocusAnnot(); |
| 299 void SetFocusAnnot(CPDFSDK_Annot* pSDKAnnot, FX_UINT nFlag = 0) { | 299 void SetFocusAnnot(CPDFSDK_Annot* pSDKAnnot, FX_UINT nFlag = 0) { |
| 300 m_pSDKDoc->SetFocusAnnot(pSDKAnnot, nFlag); | 300 m_pSDKDoc->SetFocusAnnot(pSDKAnnot, nFlag); |
| 301 } | 301 } |
| 302 FX_BOOL KillFocusAnnot(FX_UINT nFlag = 0) { | 302 FX_BOOL KillFocusAnnot(FX_UINT nFlag = 0) { |
| 303 return m_pSDKDoc->KillFocusAnnot(nFlag); | 303 return m_pSDKDoc->KillFocusAnnot(nFlag); |
| 304 } | 304 } |
| 305 FX_BOOL Annot_HasAppearance(CPDF_Annot* pAnnot); | 305 FX_BOOL Annot_HasAppearance(CPDF_Annot* pAnnot); |
| 306 | 306 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 318 FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_UINT nFlag); | 318 FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_UINT nFlag); |
| 319 FX_BOOL OnChar(int nChar, FX_UINT nFlag); | 319 FX_BOOL OnChar(int nChar, FX_UINT nFlag); |
| 320 FX_BOOL OnKeyDown(int nKeyCode, int nFlag); | 320 FX_BOOL OnKeyDown(int nKeyCode, int nFlag); |
| 321 FX_BOOL OnKeyUp(int nKeyCode, int nFlag); | 321 FX_BOOL OnKeyUp(int nKeyCode, int nFlag); |
| 322 | 322 |
| 323 FX_BOOL OnMouseMove(const CPDF_Point& point, int nFlag); | 323 FX_BOOL OnMouseMove(const CPDF_Point& point, int nFlag); |
| 324 FX_BOOL OnMouseWheel(double deltaX, | 324 FX_BOOL OnMouseWheel(double deltaX, |
| 325 double deltaY, | 325 double deltaY, |
| 326 const CPDF_Point& point, | 326 const CPDF_Point& point, |
| 327 int nFlag); | 327 int nFlag); |
| 328 FX_BOOL IsValidAnnot(CPDF_Annot* p) const; | 328 bool IsValidAnnot(const CPDF_Annot* p) const; |
| 329 void GetCurrentMatrix(CPDF_Matrix& matrix) { matrix = m_curMatrix; } | 329 void GetCurrentMatrix(CPDF_Matrix& matrix) { matrix = m_curMatrix; } |
| 330 void UpdateRects(CFX_RectArray& rects); | 330 void UpdateRects(CFX_RectArray& rects); |
| 331 void UpdateView(CPDFSDK_Annot* pAnnot); | 331 void UpdateView(CPDFSDK_Annot* pAnnot); |
| 332 const std::vector<CPDFSDK_Annot*>& GetAnnotList() const { | 332 const std::vector<CPDFSDK_Annot*>& GetAnnotList() const { |
| 333 return m_fxAnnotArray; | 333 return m_fxAnnotArray; |
| 334 } | 334 } |
| 335 | 335 |
| 336 int GetPageIndex(); | 336 int GetPageIndex(); |
| 337 void LoadFXAnnots(); | 337 void LoadFXAnnots(); |
| 338 void SetValid(FX_BOOL bValid) { m_bValid = bValid; } | 338 void SetValid(FX_BOOL bValid) { m_bValid = bValid; } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 } | 426 } |
| 427 | 427 |
| 428 if (nStartPos < m) | 428 if (nStartPos < m) |
| 429 QuickSort(nStartPos, m, bAscend, pCompare); | 429 QuickSort(nStartPos, m, bAscend, pCompare); |
| 430 if (nStopPos > m) | 430 if (nStopPos > m) |
| 431 QuickSort(m, nStopPos, bAscend, pCompare); | 431 QuickSort(m, nStopPos, bAscend, pCompare); |
| 432 } | 432 } |
| 433 }; | 433 }; |
| 434 | 434 |
| 435 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ | 435 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ |
| OLD | NEW |