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 CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 | 395 |
396 FX_DWORD GetFlags() const; | 396 FX_DWORD GetFlags() const; |
397 | 397 |
398 void GetRect(CFX_FloatRect& rect) const; | 398 void GetRect(CFX_FloatRect& rect) const; |
399 | 399 |
400 const CPDF_Dictionary* GetAnnotDict() const { return m_pAnnotDict; } | 400 const CPDF_Dictionary* GetAnnotDict() const { return m_pAnnotDict; } |
401 CPDF_Dictionary* GetAnnotDict() { return m_pAnnotDict; } | 401 CPDF_Dictionary* GetAnnotDict() { return m_pAnnotDict; } |
402 | 402 |
403 FX_BOOL DrawAppearance(const CPDF_Page* pPage, | 403 FX_BOOL DrawAppearance(const CPDF_Page* pPage, |
404 CFX_RenderDevice* pDevice, | 404 CFX_RenderDevice* pDevice, |
405 const CFX_AffineMatrix* pUser2Device, | 405 const CFX_Matrix* pUser2Device, |
406 AppearanceMode mode, | 406 AppearanceMode mode, |
407 const CPDF_RenderOptions* pOptions); | 407 const CPDF_RenderOptions* pOptions); |
408 | 408 |
409 FX_BOOL DrawInContext(const CPDF_Page* pPage, | 409 FX_BOOL DrawInContext(const CPDF_Page* pPage, |
410 const CPDF_RenderContext* pContext, | 410 const CPDF_RenderContext* pContext, |
411 const CFX_AffineMatrix* pUser2Device, | 411 const CFX_Matrix* pUser2Device, |
412 AppearanceMode mode); | 412 AppearanceMode mode); |
413 | 413 |
414 void ClearCachedAP(); | 414 void ClearCachedAP(); |
415 | 415 |
416 void DrawBorder(CFX_RenderDevice* pDevice, | 416 void DrawBorder(CFX_RenderDevice* pDevice, |
417 const CFX_AffineMatrix* pUser2Device, | 417 const CFX_Matrix* pUser2Device, |
418 const CPDF_RenderOptions* pOptions); | 418 const CPDF_RenderOptions* pOptions); |
419 | 419 |
420 CPDF_Form* GetAPForm(const CPDF_Page* pPage, AppearanceMode mode); | 420 CPDF_Form* GetAPForm(const CPDF_Page* pPage, AppearanceMode mode); |
421 | 421 |
422 private: | 422 private: |
423 CPDF_Dictionary* const m_pAnnotDict; | 423 CPDF_Dictionary* const m_pAnnotDict; |
424 | 424 |
425 CPDF_AnnotList* const m_pList; | 425 CPDF_AnnotList* const m_pList; |
426 | 426 |
427 const CFX_ByteString m_sSubtype; | 427 const CFX_ByteString m_sSubtype; |
428 | 428 |
429 CFX_MapPtrToPtr m_APMap; | 429 CFX_MapPtrToPtr m_APMap; |
430 }; | 430 }; |
431 | 431 |
432 class CPDF_AnnotList { | 432 class CPDF_AnnotList { |
433 public: | 433 public: |
434 explicit CPDF_AnnotList(CPDF_Page* pPage); | 434 explicit CPDF_AnnotList(CPDF_Page* pPage); |
435 ~CPDF_AnnotList(); | 435 ~CPDF_AnnotList(); |
436 | 436 |
437 void DisplayAnnots(const CPDF_Page* pPage, | 437 void DisplayAnnots(const CPDF_Page* pPage, |
438 CPDF_RenderContext* pContext, | 438 CPDF_RenderContext* pContext, |
439 FX_BOOL bPrinting, | 439 FX_BOOL bPrinting, |
440 CFX_AffineMatrix* pMatrix, | 440 CFX_Matrix* pMatrix, |
441 FX_BOOL bShowWidget, | 441 FX_BOOL bShowWidget, |
442 CPDF_RenderOptions* pOptions) { | 442 CPDF_RenderOptions* pOptions) { |
443 DisplayAnnots(pPage, nullptr, pContext, bPrinting, pMatrix, | 443 DisplayAnnots(pPage, nullptr, pContext, bPrinting, pMatrix, |
444 bShowWidget ? 3 : 1, pOptions, nullptr); | 444 bShowWidget ? 3 : 1, pOptions, nullptr); |
445 } | 445 } |
446 void DisplayAnnots(const CPDF_Page* pPage, | 446 void DisplayAnnots(const CPDF_Page* pPage, |
447 CFX_RenderDevice* pDevice, | 447 CFX_RenderDevice* pDevice, |
448 CPDF_RenderContext* pContext, | 448 CPDF_RenderContext* pContext, |
449 FX_BOOL bPrinting, | 449 FX_BOOL bPrinting, |
450 CFX_AffineMatrix* pMatrix, | 450 CFX_Matrix* pMatrix, |
451 FX_DWORD dwAnnotFlags, | 451 FX_DWORD dwAnnotFlags, |
452 CPDF_RenderOptions* pOptions, | 452 CPDF_RenderOptions* pOptions, |
453 FX_RECT* pClipRect); | 453 FX_RECT* pClipRect); |
454 size_t Count() const { return m_AnnotList.size(); } | 454 size_t Count() const { return m_AnnotList.size(); } |
455 CPDF_Annot* GetAt(size_t index) const { return m_AnnotList[index]; } | 455 CPDF_Annot* GetAt(size_t index) const { return m_AnnotList[index]; } |
456 const std::vector<CPDF_Annot*>& All() const { return m_AnnotList; } | 456 const std::vector<CPDF_Annot*>& All() const { return m_AnnotList; } |
457 CPDF_Document* GetDocument() const { return m_pDocument; } | 457 CPDF_Document* GetDocument() const { return m_pDocument; } |
458 | 458 |
459 protected: | 459 protected: |
460 void DisplayPass(const CPDF_Page* pPage, | 460 void DisplayPass(const CPDF_Page* pPage, |
461 CFX_RenderDevice* pDevice, | 461 CFX_RenderDevice* pDevice, |
462 CPDF_RenderContext* pContext, | 462 CPDF_RenderContext* pContext, |
463 FX_BOOL bPrinting, | 463 FX_BOOL bPrinting, |
464 CFX_AffineMatrix* pMatrix, | 464 CFX_Matrix* pMatrix, |
465 FX_BOOL bWidget, | 465 FX_BOOL bWidget, |
466 CPDF_RenderOptions* pOptions, | 466 CPDF_RenderOptions* pOptions, |
467 FX_RECT* clip_rect); | 467 FX_RECT* clip_rect); |
468 | 468 |
469 CPDF_Document* const m_pDocument; | 469 CPDF_Document* const m_pDocument; |
470 std::vector<CPDF_Annot*> m_AnnotList; | 470 std::vector<CPDF_Annot*> m_AnnotList; |
471 }; | 471 }; |
472 | 472 |
473 #define COLORTYPE_TRANSPARENT 0 | 473 #define COLORTYPE_TRANSPARENT 0 |
474 #define COLORTYPE_GRAY 1 | 474 #define COLORTYPE_GRAY 1 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 FX_BOOL bStrokingOperation = FALSE); | 510 FX_BOOL bStrokingOperation = FALSE); |
511 | 511 |
512 void GetColor(FX_ARGB& color, | 512 void GetColor(FX_ARGB& color, |
513 int& iColorType, | 513 int& iColorType, |
514 FX_BOOL bStrokingOperation = FALSE); | 514 FX_BOOL bStrokingOperation = FALSE); |
515 | 515 |
516 FX_BOOL HasTextMatrix(); | 516 FX_BOOL HasTextMatrix(); |
517 | 517 |
518 CFX_ByteString GetTextMatrixString(); | 518 CFX_ByteString GetTextMatrixString(); |
519 | 519 |
520 CFX_AffineMatrix GetTextMatrix(); | 520 CFX_Matrix GetTextMatrix(); |
521 | 521 |
522 protected: | 522 protected: |
523 CFX_ByteString m_csDA; | 523 CFX_ByteString m_csDA; |
524 }; | 524 }; |
525 #define FIELDTYPE_UNKNOWN 0 | 525 #define FIELDTYPE_UNKNOWN 0 |
526 #define FIELDTYPE_PUSHBUTTON 1 | 526 #define FIELDTYPE_PUSHBUTTON 1 |
527 #define FIELDTYPE_CHECKBOX 2 | 527 #define FIELDTYPE_CHECKBOX 2 |
528 #define FIELDTYPE_RADIOBUTTON 3 | 528 #define FIELDTYPE_RADIOBUTTON 3 |
529 #define FIELDTYPE_COMBOBOX 4 | 529 #define FIELDTYPE_COMBOBOX 4 |
530 #define FIELDTYPE_LISTBOX 5 | 530 #define FIELDTYPE_LISTBOX 5 |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 | 900 |
901 CPDF_InterForm* GetInterForm() const { return m_pForm; } | 901 CPDF_InterForm* GetInterForm() const { return m_pForm; } |
902 | 902 |
903 CPDF_FormField* GetField() const { return m_pField; } | 903 CPDF_FormField* GetField() const { return m_pField; } |
904 | 904 |
905 CPDF_Dictionary* GetWidget() const { return m_pWidgetDict; } | 905 CPDF_Dictionary* GetWidget() const { return m_pWidgetDict; } |
906 | 906 |
907 CFX_FloatRect GetRect() const; | 907 CFX_FloatRect GetRect() const; |
908 | 908 |
909 void DrawControl(CFX_RenderDevice* pDevice, | 909 void DrawControl(CFX_RenderDevice* pDevice, |
910 CFX_AffineMatrix* pMatrix, | 910 CFX_Matrix* pMatrix, |
911 CPDF_Page* pPage, | 911 CPDF_Page* pPage, |
912 CPDF_Annot::AppearanceMode mode, | 912 CPDF_Annot::AppearanceMode mode, |
913 const CPDF_RenderOptions* pOptions = NULL); | 913 const CPDF_RenderOptions* pOptions = NULL); |
914 | 914 |
915 CFX_ByteString GetCheckedAPState(); | 915 CFX_ByteString GetCheckedAPState(); |
916 | 916 |
917 CFX_WideString GetExportValue(); | 917 CFX_WideString GetExportValue(); |
918 | 918 |
919 FX_BOOL IsChecked(); | 919 FX_BOOL IsChecked(); |
920 | 920 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry) const; | 1149 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry) const; |
1150 | 1150 |
1151 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry) const; | 1151 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry) const; |
1152 | 1152 |
1153 CPDF_Dictionary* const m_pDict; | 1153 CPDF_Dictionary* const m_pDict; |
1154 }; | 1154 }; |
1155 | 1155 |
1156 CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath); | 1156 CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath); |
1157 | 1157 |
1158 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 1158 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
OLD | NEW |