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

Side by Side Diff: core/include/fpdfdoc/fpdf_doc.h

Issue 1653253002: Kill CFX_ByteArray in master. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: ... and its gone. Created 4 years, 10 months 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 | « no previous file | core/include/fxcrt/fx_basic.h » ('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 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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 Text, 727 Text,
728 RichText, 728 RichText,
729 File, 729 File,
730 ListBox, 730 ListBox,
731 ComboBox, 731 ComboBox,
732 Sign 732 Sign
733 }; 733 };
734 734
735 CFX_WideString GetFullName(); 735 CFX_WideString GetFullName();
736 736
737 Type GetType() { return m_Type; } 737 Type GetType() const { return m_Type; }
738 738 FX_DWORD GetFlags() const { return m_Flags; }
739 FX_DWORD GetFlags() { return m_Flags; }
740 739
741 CPDF_Dictionary* GetFieldDict() const { return m_pDict; } 740 CPDF_Dictionary* GetFieldDict() const { return m_pDict; }
742
743 void SetFieldDict(CPDF_Dictionary* pDict) { m_pDict = pDict; } 741 void SetFieldDict(CPDF_Dictionary* pDict) { m_pDict = pDict; }
744 742
745 FX_BOOL ResetField(FX_BOOL bNotify = FALSE); 743 FX_BOOL ResetField(FX_BOOL bNotify = FALSE);
746 744
747 int CountControls() { return m_ControlList.GetSize(); } 745 int CountControls() { return m_ControlList.GetSize(); }
748 746
749 CPDF_FormControl* GetControl(int index) { return m_ControlList.GetAt(index); } 747 CPDF_FormControl* GetControl(int index) { return m_ControlList.GetAt(index); }
750 748
751 int GetControlIndex(const CPDF_FormControl* pControl); 749 int GetControlIndex(const CPDF_FormControl* pControl);
752 750
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 CPDF_Dictionary* m_pDict; 878 CPDF_Dictionary* m_pDict;
881 }; 879 };
882 880
883 #define TEXTPOS_CAPTION 0 881 #define TEXTPOS_CAPTION 0
884 #define TEXTPOS_ICON 1 882 #define TEXTPOS_ICON 1
885 #define TEXTPOS_BELOW 2 883 #define TEXTPOS_BELOW 2
886 #define TEXTPOS_ABOVE 3 884 #define TEXTPOS_ABOVE 3
887 #define TEXTPOS_RIGHT 4 885 #define TEXTPOS_RIGHT 4
888 #define TEXTPOS_LEFT 5 886 #define TEXTPOS_LEFT 5
889 #define TEXTPOS_OVERLAID 6 887 #define TEXTPOS_OVERLAID 6
888
890 class CPDF_FormControl { 889 class CPDF_FormControl {
891 public: 890 public:
892 CPDF_FormField::Type GetType() { return m_pField->GetType(); } 891 enum HighlightingMode { None = 0, Invert, Outline, Push, Toggle };
893 892
893 CPDF_FormField::Type GetType() const { return m_pField->GetType(); }
894 CPDF_InterForm* GetInterForm() const { return m_pForm; } 894 CPDF_InterForm* GetInterForm() const { return m_pForm; }
895
896 CPDF_FormField* GetField() const { return m_pField; } 895 CPDF_FormField* GetField() const { return m_pField; }
897
898 CPDF_Dictionary* GetWidget() const { return m_pWidgetDict; } 896 CPDF_Dictionary* GetWidget() const { return m_pWidgetDict; }
899
900 CFX_FloatRect GetRect() const; 897 CFX_FloatRect GetRect() const;
901 898
902 void DrawControl(CFX_RenderDevice* pDevice, 899 void DrawControl(CFX_RenderDevice* pDevice,
903 CFX_Matrix* pMatrix, 900 CFX_Matrix* pMatrix,
904 CPDF_Page* pPage, 901 CPDF_Page* pPage,
905 CPDF_Annot::AppearanceMode mode, 902 CPDF_Annot::AppearanceMode mode,
906 const CPDF_RenderOptions* pOptions = NULL); 903 const CPDF_RenderOptions* pOptions = NULL);
907 904
908 CFX_ByteString GetCheckedAPState(); 905 CFX_ByteString GetCheckedAPState();
909
910 CFX_WideString GetExportValue(); 906 CFX_WideString GetExportValue();
911 907
912 FX_BOOL IsChecked(); 908 bool IsChecked() const;
913 909 bool IsDefaultChecked() const;
914 FX_BOOL IsDefaultChecked();
915
916 enum HighlightingMode { None = 0, Invert, Outline, Push, Toggle };
917 910
918 HighlightingMode GetHighlightingMode(); 911 HighlightingMode GetHighlightingMode();
919
920 bool HasMKEntry(CFX_ByteString csEntry) const; 912 bool HasMKEntry(CFX_ByteString csEntry) const;
921
922 int GetRotation(); 913 int GetRotation();
923 914
924 inline FX_ARGB GetBorderColor(int& iColorType) { 915 inline FX_ARGB GetBorderColor(int& iColorType) {
925 return GetColor(iColorType, "BC"); 916 return GetColor(iColorType, "BC");
926 } 917 }
927 918
928 FX_FLOAT GetOriginalBorderColor(int index) { 919 FX_FLOAT GetOriginalBorderColor(int index) {
929 return GetOriginalColor(index, "BC"); 920 return GetOriginalColor(index, "BC");
930 } 921 }
931 922
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 958
968 CPDF_DefaultAppearance GetDefaultAppearance(); 959 CPDF_DefaultAppearance GetDefaultAppearance();
969 960
970 CPDF_Font* GetDefaultControlFont(); 961 CPDF_Font* GetDefaultControlFont();
971 962
972 int GetControlAlignment(); 963 int GetControlAlignment();
973 964
974 protected: 965 protected:
975 CPDF_FormControl(CPDF_FormField* pField, CPDF_Dictionary* pWidgetDict); 966 CPDF_FormControl(CPDF_FormField* pField, CPDF_Dictionary* pWidgetDict);
976 967
977 CFX_ByteString GetOnStateName(); 968 CFX_ByteString GetOnStateName() const;
978
979 void SetOnStateName(const CFX_ByteString& csOn); 969 void SetOnStateName(const CFX_ByteString& csOn);
980 970
981 void CheckControl(FX_BOOL bChecked); 971 void CheckControl(FX_BOOL bChecked);
982 972
983 FX_ARGB GetColor(int& iColorType, CFX_ByteString csEntry); 973 FX_ARGB GetColor(int& iColorType, CFX_ByteString csEntry);
984 974
985 FX_FLOAT GetOriginalColor(int index, CFX_ByteString csEntry); 975 FX_FLOAT GetOriginalColor(int index, CFX_ByteString csEntry);
986 976
987 void GetOriginalColor(int& iColorType, 977 void GetOriginalColor(int& iColorType,
988 FX_FLOAT fc[4], 978 FX_FLOAT fc[4],
989 CFX_ByteString csEntry); 979 CFX_ByteString csEntry);
990 980
991 CFX_WideString GetCaption(CFX_ByteString csEntry); 981 CFX_WideString GetCaption(CFX_ByteString csEntry);
992 982
993 CPDF_Stream* GetIcon(CFX_ByteString csEntry); 983 CPDF_Stream* GetIcon(CFX_ByteString csEntry);
994 984
995 CPDF_ApSettings GetMK() const; 985 CPDF_ApSettings GetMK() const;
996 986
997 CPDF_InterForm* m_pForm; 987 CPDF_InterForm* m_pForm;
998 988
999 CPDF_FormField* m_pField; 989 CPDF_FormField* m_pField;
1000 990
1001 CPDF_Dictionary* m_pWidgetDict; 991 CPDF_Dictionary* m_pWidgetDict;
1002 friend class CPDF_InterForm; 992 friend class CPDF_InterForm;
1003 friend class CPDF_FormField; 993 friend class CPDF_FormField;
1004 }; 994 };
995
1005 class CPDF_FormNotify { 996 class CPDF_FormNotify {
1006 public: 997 public:
1007 virtual ~CPDF_FormNotify() {} 998 virtual ~CPDF_FormNotify() {}
1008 999
1009 virtual int BeforeValueChange(const CPDF_FormField* pField, 1000 virtual int BeforeValueChange(const CPDF_FormField* pField,
1010 CFX_WideString& csValue) { 1001 CFX_WideString& csValue) {
1011 return 0; 1002 return 0;
1012 } 1003 }
1013
1014 virtual int AfterValueChange(const CPDF_FormField* pField) { return 0; } 1004 virtual int AfterValueChange(const CPDF_FormField* pField) { return 0; }
1015 1005
1016 virtual int BeforeSelectionChange(const CPDF_FormField* pField, 1006 virtual int BeforeSelectionChange(const CPDF_FormField* pField,
1017 CFX_WideString& csValue) { 1007 CFX_WideString& csValue) {
1018 return 0; 1008 return 0;
1019 } 1009 }
1020
1021 virtual int AfterSelectionChange(const CPDF_FormField* pField) { return 0; } 1010 virtual int AfterSelectionChange(const CPDF_FormField* pField) { return 0; }
1022 1011
1023 virtual int AfterCheckedStatusChange(const CPDF_FormField* pField, 1012 virtual void AfterCheckedStatusChange(CPDF_FormField* pField) {}
1024 const CFX_ByteArray& statusArray) {
1025 return 0;
1026 }
1027
1028 virtual int BeforeFormReset(const CPDF_InterForm* pForm) { return 0; } 1013 virtual int BeforeFormReset(const CPDF_InterForm* pForm) { return 0; }
1029
1030 virtual int AfterFormReset(const CPDF_InterForm* pForm) { return 0; } 1014 virtual int AfterFormReset(const CPDF_InterForm* pForm) { return 0; }
1031
1032 virtual int BeforeFormImportData(const CPDF_InterForm* pForm) { return 0; } 1015 virtual int BeforeFormImportData(const CPDF_InterForm* pForm) { return 0; }
1033
1034 virtual int AfterFormImportData(const CPDF_InterForm* pForm) { return 0; } 1016 virtual int AfterFormImportData(const CPDF_InterForm* pForm) { return 0; }
1035 }; 1017 };
1018
1036 FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict); 1019 FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
1037 class CPDF_PageLabel { 1020 class CPDF_PageLabel {
1038 public: 1021 public:
1039 explicit CPDF_PageLabel(CPDF_Document* pDocument) { m_pDocument = pDocument; } 1022 explicit CPDF_PageLabel(CPDF_Document* pDocument) { m_pDocument = pDocument; }
1040 1023
1041 CFX_WideString GetLabel(int nPage) const; 1024 CFX_WideString GetLabel(int nPage) const;
1042 1025
1043 int32_t GetPageByLabel(const CFX_ByteStringC& bsLabel) const; 1026 int32_t GetPageByLabel(const CFX_ByteStringC& bsLabel) const;
1044 1027
1045 int32_t GetPageByLabel(const CFX_WideStringC& wsLabel) const; 1028 int32_t GetPageByLabel(const CFX_WideStringC& wsLabel) const;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry) const; 1123 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry) const;
1141 1124
1142 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry) const; 1125 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry) const;
1143 1126
1144 CPDF_Dictionary* const m_pDict; 1127 CPDF_Dictionary* const m_pDict;
1145 }; 1128 };
1146 1129
1147 CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath); 1130 CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath);
1148 1131
1149 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ 1132 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_
OLDNEW
« no previous file with comments | « no previous file | core/include/fxcrt/fx_basic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698