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

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

Issue 2062313002: Make code compile with clang_use_chrome_plugin (part IV) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove unused file Created 4 years, 6 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 | « fpdfsdk/include/fsdk_annothandler.h ('k') | fpdfsdk/include/fsdk_baseform.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 FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ 7 #ifndef FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_
8 #define FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ 8 #define FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_
9 9
10 #if _FX_OS_ == _FX_ANDROID_ 10 #if _FX_OS_ == _FX_ANDROID_
(...skipping 11 matching lines...) Expand all
22 class CPDFSDK_PageView; 22 class CPDFSDK_PageView;
23 class CPDF_Annot; 23 class CPDF_Annot;
24 class CPDF_Page; 24 class CPDF_Page;
25 class CFX_Matrix; 25 class CFX_Matrix;
26 class CPDF_RenderOptions; 26 class CPDF_RenderOptions;
27 class CFX_RenderDevice; 27 class CFX_RenderDevice;
28 28
29 class CPDFSDK_DateTime { 29 class CPDFSDK_DateTime {
30 public: 30 public:
31 CPDFSDK_DateTime(); 31 CPDFSDK_DateTime();
32 CPDFSDK_DateTime(const CFX_ByteString& dtStr); 32 explicit CPDFSDK_DateTime(const CFX_ByteString& dtStr);
33 explicit CPDFSDK_DateTime(const FX_SYSTEMTIME& st);
33 CPDFSDK_DateTime(const CPDFSDK_DateTime& datetime); 34 CPDFSDK_DateTime(const CPDFSDK_DateTime& datetime);
34 CPDFSDK_DateTime(const FX_SYSTEMTIME& st);
35 35
36 CPDFSDK_DateTime& operator=(const CPDFSDK_DateTime& datetime); 36 CPDFSDK_DateTime& operator=(const CPDFSDK_DateTime& datetime);
37 CPDFSDK_DateTime& operator=(const FX_SYSTEMTIME& st); 37 CPDFSDK_DateTime& operator=(const FX_SYSTEMTIME& st);
38 bool operator==(const CPDFSDK_DateTime& datetime) const; 38 bool operator==(const CPDFSDK_DateTime& datetime) const;
39 bool operator!=(const CPDFSDK_DateTime& datetime) const; 39 bool operator!=(const CPDFSDK_DateTime& datetime) const;
40 40
41 CPDFSDK_DateTime& FromPDFDateTimeString(const CFX_ByteString& dtStr); 41 CPDFSDK_DateTime& FromPDFDateTimeString(const CFX_ByteString& dtStr);
42 CFX_ByteString ToCommonDateTimeString(); 42 CFX_ByteString ToCommonDateTimeString();
43 CFX_ByteString ToPDFDateTimeString(); 43 CFX_ByteString ToPDFDateTimeString();
44 void ToSystemTime(FX_SYSTEMTIME& st); 44 void ToSystemTime(FX_SYSTEMTIME& st);
(...skipping 12 matching lines...) Expand all
57 uint8_t minute; 57 uint8_t minute;
58 uint8_t second; 58 uint8_t second;
59 int8_t tzHour; 59 int8_t tzHour;
60 uint8_t tzMinute; 60 uint8_t tzMinute;
61 } dt; 61 } dt;
62 }; 62 };
63 63
64 class CPDFSDK_Annot { 64 class CPDFSDK_Annot {
65 public: 65 public:
66 explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView); 66 explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView);
67 virtual ~CPDFSDK_Annot() {} 67 virtual ~CPDFSDK_Annot();
68 68
69 #ifdef PDF_ENABLE_XFA 69 #ifdef PDF_ENABLE_XFA
70 virtual FX_BOOL IsXFAField() { return FALSE; } 70 virtual FX_BOOL IsXFAField();
71 virtual CXFA_FFWidget* GetXFAWidget() const;
71 #endif // PDF_ENABLE_XFA 72 #endif // PDF_ENABLE_XFA
72 73
73 virtual FX_FLOAT GetMinWidth() const; 74 virtual FX_FLOAT GetMinWidth() const;
74 virtual FX_FLOAT GetMinHeight() const; 75 virtual FX_FLOAT GetMinHeight() const;
75 // define layout order to 5. 76 // define layout order to 5.
76 virtual int GetLayoutOrder() const { return 5; } 77 virtual int GetLayoutOrder() const;
78 virtual CPDF_Annot* GetPDFAnnot() const;
79 virtual CFX_ByteString GetType() const;
80 virtual CFX_ByteString GetSubType() const;
81 virtual CFX_FloatRect GetRect() const;
77 82
78 virtual CPDF_Annot* GetPDFAnnot() const { return nullptr; } 83 virtual void SetRect(const CFX_FloatRect& rect);
79
80 #ifdef PDF_ENABLE_XFA
81 virtual CXFA_FFWidget* GetXFAWidget() const { return nullptr; }
82 #endif // PDF_ENABLE_XFA
83
84 virtual CFX_ByteString GetType() const { return ""; }
85 virtual CFX_ByteString GetSubType() const { return ""; }
86
87 virtual void SetRect(const CFX_FloatRect& rect) {}
88 virtual CFX_FloatRect GetRect() const { return CFX_FloatRect(); }
89
90 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, 84 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice,
91 CFX_Matrix* pUser2Device, 85 CFX_Matrix* pUser2Device,
92 CPDF_RenderOptions* pOptions) {} 86 CPDF_RenderOptions* pOptions);
93 87
94 UnderlyingPageType* GetUnderlyingPage(); 88 UnderlyingPageType* GetUnderlyingPage();
95 CPDF_Page* GetPDFPage(); 89 CPDF_Page* GetPDFPage();
96 #ifdef PDF_ENABLE_XFA 90 #ifdef PDF_ENABLE_XFA
97 CPDFXFA_Page* GetPDFXFAPage(); 91 CPDFXFA_Page* GetPDFXFAPage();
98 #endif // PDF_ENABLE_XFA 92 #endif // PDF_ENABLE_XFA
99 93
100 void SetPage(CPDFSDK_PageView* pPageView) { m_pPageView = pPageView; } 94 void SetPage(CPDFSDK_PageView* pPageView);
101 CPDFSDK_PageView* GetPageView() const { return m_pPageView; } 95 CPDFSDK_PageView* GetPageView() const { return m_pPageView; }
102 96
103 // Tab Order 97 // Tab Order
104 int GetTabOrder(); 98 int GetTabOrder();
105 void SetTabOrder(int iTabOrder); 99 void SetTabOrder(int iTabOrder);
106 100
107 // Selection 101 // Selection
108 FX_BOOL IsSelected(); 102 FX_BOOL IsSelected();
109 void SetSelected(FX_BOOL bSelected); 103 void SetSelected(FX_BOOL bSelected);
110 104
111 protected: 105 protected:
112 CPDFSDK_PageView* m_pPageView; 106 CPDFSDK_PageView* m_pPageView;
113 FX_BOOL m_bSelected; 107 FX_BOOL m_bSelected;
114 int m_nTabOrder; 108 int m_nTabOrder;
115 }; 109 };
116 110
117 class CPDFSDK_BAAnnot : public CPDFSDK_Annot { 111 class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
118 public: 112 public:
119 CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView); 113 CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView);
120 ~CPDFSDK_BAAnnot() override {} 114 ~CPDFSDK_BAAnnot() override;
121 115
122 #ifdef PDF_ENABLE_XFA 116 // CPDFSDK_Annot
123 FX_BOOL IsXFAField() override;
124 #endif // PDF_ENABLE_XFA
125
126 CFX_ByteString GetType() const override; 117 CFX_ByteString GetType() const override;
127 CFX_ByteString GetSubType() const override; 118 CFX_ByteString GetSubType() const override;
128 void SetRect(const CFX_FloatRect& rect) override; 119 void SetRect(const CFX_FloatRect& rect) override;
129 CFX_FloatRect GetRect() const override; 120 CFX_FloatRect GetRect() const override;
130 CPDF_Annot* GetPDFAnnot() const override; 121 CPDF_Annot* GetPDFAnnot() const override;
131 void Annot_OnDraw(CFX_RenderDevice* pDevice, 122 void Annot_OnDraw(CFX_RenderDevice* pDevice,
132 CFX_Matrix* pUser2Device, 123 CFX_Matrix* pUser2Device,
133 CPDF_RenderOptions* pOptions) override; 124 CPDF_RenderOptions* pOptions) override;
134 125
135 CPDF_Dictionary* GetAnnotDict() const; 126 CPDF_Dictionary* GetAnnotDict() const;
(...skipping 30 matching lines...) Expand all
166 157
167 CPDF_Action GetAction() const; 158 CPDF_Action GetAction() const;
168 void SetAction(const CPDF_Action& a); 159 void SetAction(const CPDF_Action& a);
169 void RemoveAction(); 160 void RemoveAction();
170 161
171 CPDF_AAction GetAAction() const; 162 CPDF_AAction GetAAction() const;
172 void SetAAction(const CPDF_AAction& aa); 163 void SetAAction(const CPDF_AAction& aa);
173 void RemoveAAction(); 164 void RemoveAAction();
174 165
175 virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT); 166 virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT);
176
177 virtual FX_BOOL IsAppearanceValid(); 167 virtual FX_BOOL IsAppearanceValid();
178 virtual FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode); 168 virtual FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode);
179 virtual void DrawAppearance(CFX_RenderDevice* pDevice, 169 virtual void DrawAppearance(CFX_RenderDevice* pDevice,
180 const CFX_Matrix* pUser2Device, 170 const CFX_Matrix* pUser2Device,
181 CPDF_Annot::AppearanceMode mode, 171 CPDF_Annot::AppearanceMode mode,
182 const CPDF_RenderOptions* pOptions); 172 const CPDF_RenderOptions* pOptions);
173
183 void DrawBorder(CFX_RenderDevice* pDevice, 174 void DrawBorder(CFX_RenderDevice* pDevice,
184 const CFX_Matrix* pUser2Device, 175 const CFX_Matrix* pUser2Device,
185 const CPDF_RenderOptions* pOptions); 176 const CPDF_RenderOptions* pOptions);
186 177
187 void ClearCachedAP(); 178 void ClearCachedAP();
188 179
189 void WriteAppearance(const CFX_ByteString& sAPType, 180 void WriteAppearance(const CFX_ByteString& sAPType,
190 const CFX_FloatRect& rcBBox, 181 const CFX_FloatRect& rcBBox,
191 const CFX_Matrix& matrix, 182 const CFX_Matrix& matrix,
192 const CFX_ByteString& sContents, 183 const CFX_ByteString& sContents,
193 const CFX_ByteString& sAPState = ""); 184 const CFX_ByteString& sAPState = "");
194 185
195 protected: 186 protected:
196 CPDF_Annot* m_pAnnot; 187 CPDF_Annot* m_pAnnot;
197 188
198 private: 189 private:
199 FX_BOOL CreateFormFiller(); 190 FX_BOOL CreateFormFiller();
200 }; 191 };
201 192
202 #endif // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ 193 #endif // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_annothandler.h ('k') | fpdfsdk/include/fsdk_baseform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698