Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: fpdfsdk/include/fsdk_mgr.h

Issue 1425093003: Clean up CPDF_AnnotList. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: revert error Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/include/fsdk_define.h ('k') | fpdfsdk/src/fpdf_ext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_define.h ('k') | fpdfsdk/src/fpdf_ext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698