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

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

Issue 1418043007: Cleanup after syncing CPDFSDK_BAAnnot (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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 | « no previous file | fpdfsdk/src/fsdk_annothandler.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_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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 uint8_t hour; 61 uint8_t hour;
62 uint8_t minute; 62 uint8_t minute;
63 uint8_t second; 63 uint8_t second;
64 int8_t tzHour; 64 int8_t tzHour;
65 uint8_t tzMinute; 65 uint8_t tzMinute;
66 } dt; 66 } dt;
67 }; 67 };
68 68
69 class CPDFSDK_Annot { 69 class CPDFSDK_Annot {
70 public: 70 public:
71 CPDFSDK_Annot(CPDFSDK_PageView* pPageView); 71 explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView);
72 virtual ~CPDFSDK_Annot(){}; 72 virtual ~CPDFSDK_Annot() {}
73 73
74 virtual FX_FLOAT GetMinWidth() const; 74 virtual FX_FLOAT GetMinWidth() const;
75 virtual FX_FLOAT GetMinHeight() const; 75 virtual FX_FLOAT GetMinHeight() const;
76 // define layout order to 5. 76 // define layout order to 5.
77 virtual int GetLayoutOrder() const { return 5; } 77 virtual int GetLayoutOrder() const { return 5; }
78 78
79 virtual CPDF_Annot* GetPDFAnnot() const { return nullptr; } 79 virtual CPDF_Annot* GetPDFAnnot() const { return nullptr; }
80 80
81 virtual CFX_ByteString GetType() const { return ""; } 81 virtual CFX_ByteString GetType() const { return ""; }
82 virtual CFX_ByteString GetSubType() const { return ""; } 82 virtual CFX_ByteString GetSubType() const { return ""; }
(...skipping 12 matching lines...) Expand all
95 95
96 // Tab Order 96 // Tab Order
97 int GetTabOrder(); 97 int GetTabOrder();
98 void SetTabOrder(int iTabOrder); 98 void SetTabOrder(int iTabOrder);
99 99
100 // Selection 100 // Selection
101 FX_BOOL IsSelected(); 101 FX_BOOL IsSelected();
102 void SetSelected(FX_BOOL bSelected); 102 void SetSelected(FX_BOOL bSelected);
103 103
104 protected: 104 protected:
105 CPDF_Annot* m_pAnnot;
106 CPDFSDK_PageView* m_pPageView; 105 CPDFSDK_PageView* m_pPageView;
107 FX_BOOL m_bSelected; 106 FX_BOOL m_bSelected;
108 int m_nTabOrder; 107 int m_nTabOrder;
109 }; 108 };
110 109
111 class CPDFSDK_BAAnnot : public CPDFSDK_Annot { 110 class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
112 public: 111 public:
113 CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView); 112 CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView);
114 virtual ~CPDFSDK_BAAnnot(); 113 virtual ~CPDFSDK_BAAnnot() {}
115 114
116 public:
117 virtual CFX_ByteString GetType() const; 115 virtual CFX_ByteString GetType() const;
118 virtual CFX_ByteString GetSubType() const; 116 virtual CFX_ByteString GetSubType() const;
119 117
120 virtual void SetRect(const CPDF_Rect& rect); 118 virtual void SetRect(const CPDF_Rect& rect);
121 virtual CPDF_Rect GetRect() const; 119 virtual CPDF_Rect GetRect() const;
122 120
123 virtual CPDF_Annot* GetPDFAnnot() const; 121 virtual CPDF_Annot* GetPDFAnnot() const;
124 122
125 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, 123 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice,
126 CPDF_Matrix* pUser2Device, 124 CPDF_Matrix* pUser2Device,
127 CPDF_RenderOptions* pOptions); 125 CPDF_RenderOptions* pOptions);
128 126
129 public:
130 CPDF_Dictionary* GetAnnotDict() const; 127 CPDF_Dictionary* GetAnnotDict() const;
131 128
132 void SetContents(const CFX_WideString& sContents); 129 void SetContents(const CFX_WideString& sContents);
133 CFX_WideString GetContents() const; 130 CFX_WideString GetContents() const;
134 131
135 void SetAnnotName(const CFX_WideString& sName); 132 void SetAnnotName(const CFX_WideString& sName);
136 CFX_WideString GetAnnotName() const; 133 CFX_WideString GetAnnotName() const;
137 134
138 void SetModifiedDate(const FX_SYSTEMTIME& st); 135 void SetModifiedDate(const FX_SYSTEMTIME& st);
139 FX_SYSTEMTIME GetModifiedDate() const; 136 FX_SYSTEMTIME GetModifiedDate() const;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 CPDF_Action GetAction() const; 174 CPDF_Action GetAction() const;
178 void SetAction(const CPDF_Action& a); 175 void SetAction(const CPDF_Action& a);
179 void RemoveAction(); 176 void RemoveAction();
180 177
181 CPDF_AAction GetAAction() const; 178 CPDF_AAction GetAAction() const;
182 void SetAAction(const CPDF_AAction& aa); 179 void SetAAction(const CPDF_AAction& aa);
183 void RemoveAAction(); 180 void RemoveAAction();
184 181
185 virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT); 182 virtual CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT);
186 183
187 public:
188 virtual FX_BOOL IsAppearanceValid(); 184 virtual FX_BOOL IsAppearanceValid();
189 virtual FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode); 185 virtual FX_BOOL IsAppearanceValid(CPDF_Annot::AppearanceMode mode);
190 virtual void DrawAppearance(CFX_RenderDevice* pDevice, 186 virtual void DrawAppearance(CFX_RenderDevice* pDevice,
191 const CPDF_Matrix* pUser2Device, 187 const CPDF_Matrix* pUser2Device,
192 CPDF_Annot::AppearanceMode mode, 188 CPDF_Annot::AppearanceMode mode,
193 const CPDF_RenderOptions* pOptions); 189 const CPDF_RenderOptions* pOptions);
194 void DrawBorder(CFX_RenderDevice* pDevice, 190 void DrawBorder(CFX_RenderDevice* pDevice,
195 const CPDF_Matrix* pUser2Device, 191 const CPDF_Matrix* pUser2Device,
196 const CPDF_RenderOptions* pOptions); 192 const CPDF_RenderOptions* pOptions);
197 193
198 void ClearCachedAP(); 194 void ClearCachedAP();
199 195
200 void WriteAppearance(const CFX_ByteString& sAPType, 196 void WriteAppearance(const CFX_ByteString& sAPType,
201 const CPDF_Rect& rcBBox, 197 const CPDF_Rect& rcBBox,
202 const CPDF_Matrix& matrix, 198 const CPDF_Matrix& matrix,
203 const CFX_ByteString& sContents, 199 const CFX_ByteString& sContents,
204 const CFX_ByteString& sAPState = ""); 200 const CFX_ByteString& sAPState = "");
205 201
202 protected:
203 CPDF_Annot* m_pAnnot;
204
206 private: 205 private:
207 FX_BOOL CreateFormFiller(); 206 FX_BOOL CreateFormFiller();
208
209 protected:
210 CPDF_Annot* m_pAnnot;
211 }; 207 };
212 208
213 #endif // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ 209 #endif // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/fsdk_annothandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698