| 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 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 CPDFSDK_Annot(CPDFSDK_PageView* pPageView); |
| 72 virtual ~CPDFSDK_Annot(){}; | 72 virtual ~CPDFSDK_Annot(){}; |
| 73 | 73 |
| 74 public: | |
| 75 virtual FX_BOOL IsXFAField() { return FALSE; } | 74 virtual FX_BOOL IsXFAField() { return FALSE; } |
| 76 | 75 |
| 77 virtual FX_FLOAT GetMinWidth() const; | 76 virtual FX_FLOAT GetMinWidth() const; |
| 78 virtual FX_FLOAT GetMinHeight() const; | 77 virtual FX_FLOAT GetMinHeight() const; |
| 79 // define layout order to 5. | 78 // define layout order to 5. |
| 80 virtual int GetLayoutOrder() const { return 5; } | 79 virtual int GetLayoutOrder() const { return 5; } |
| 81 | 80 |
| 82 virtual CPDF_Annot* GetPDFAnnot() { return NULL; } | 81 virtual CPDF_Annot* GetPDFAnnot() const { return nullptr; } |
| 83 virtual IXFA_Widget* GetXFAWidget() { return NULL; } | 82 virtual IXFA_Widget* GetXFAWidget() const { return nullptr; } |
| 84 | 83 |
| 85 virtual CFX_ByteString GetType() const { return ""; } | 84 virtual CFX_ByteString GetType() const { return ""; } |
| 86 virtual CFX_ByteString GetSubType() const { return ""; } | 85 virtual CFX_ByteString GetSubType() const { return ""; } |
| 87 | 86 |
| 88 virtual void SetRect(const CPDF_Rect& rect) {} | 87 virtual void SetRect(const CPDF_Rect& rect) {} |
| 89 virtual CPDF_Rect GetRect() const { return CPDF_Rect(); } | 88 virtual CPDF_Rect GetRect() const { return CPDF_Rect(); } |
| 90 | 89 |
| 91 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, | 90 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, |
| 92 CPDF_Matrix* pUser2Device, | 91 CPDF_Matrix* pUser2Device, |
| 93 CPDF_RenderOptions* pOptions) {} | 92 CPDF_RenderOptions* pOptions) {} |
| 94 | 93 |
| 95 public: | |
| 96 CPDF_Page* GetPDFPage(); | 94 CPDF_Page* GetPDFPage(); |
| 97 CPDFXFA_Page* GetPDFXFAPage(); | 95 CPDFXFA_Page* GetPDFXFAPage(); |
| 98 | 96 |
| 99 void SetPage(CPDFSDK_PageView* pPageView) { m_pPageView = pPageView; } | 97 void SetPage(CPDFSDK_PageView* pPageView) { m_pPageView = pPageView; } |
| 100 CPDFSDK_PageView* GetPageView() { return m_pPageView; } | 98 CPDFSDK_PageView* GetPageView() const { return m_pPageView; } |
| 101 | 99 |
| 102 // Tab Order | 100 // Tab Order |
| 103 int GetTabOrder(); | 101 int GetTabOrder(); |
| 104 void SetTabOrder(int iTabOrder); | 102 void SetTabOrder(int iTabOrder); |
| 105 | 103 |
| 106 // Selection | 104 // Selection |
| 107 FX_BOOL IsSelected(); | 105 FX_BOOL IsSelected(); |
| 108 void SetSelected(FX_BOOL bSelected); | 106 void SetSelected(FX_BOOL bSelected); |
| 109 | 107 |
| 110 protected: | 108 protected: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 121 | 119 |
| 122 public: | 120 public: |
| 123 virtual FX_BOOL IsXFAField(); | 121 virtual FX_BOOL IsXFAField(); |
| 124 | 122 |
| 125 virtual CFX_ByteString GetType() const; | 123 virtual CFX_ByteString GetType() const; |
| 126 virtual CFX_ByteString GetSubType() const; | 124 virtual CFX_ByteString GetSubType() const; |
| 127 | 125 |
| 128 virtual void SetRect(const CPDF_Rect& rect); | 126 virtual void SetRect(const CPDF_Rect& rect); |
| 129 virtual CPDF_Rect GetRect() const; | 127 virtual CPDF_Rect GetRect() const; |
| 130 | 128 |
| 131 virtual CPDF_Annot* GetPDFAnnot(); | 129 virtual CPDF_Annot* GetPDFAnnot() const; |
| 132 | 130 |
| 133 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, | 131 virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, |
| 134 CPDF_Matrix* pUser2Device, | 132 CPDF_Matrix* pUser2Device, |
| 135 CPDF_RenderOptions* pOptions); | 133 CPDF_RenderOptions* pOptions); |
| 136 | 134 |
| 137 public: | 135 public: |
| 138 CPDF_Dictionary* GetAnnotDict() const; | 136 CPDF_Dictionary* GetAnnotDict() const; |
| 139 | 137 |
| 140 void SetContents(const CFX_WideString& sContents); | 138 void SetContents(const CFX_WideString& sContents); |
| 141 CFX_WideString GetContents() const; | 139 CFX_WideString GetContents() const; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 virtual void DrawAppearance(CFX_RenderDevice* pDevice, | 196 virtual void DrawAppearance(CFX_RenderDevice* pDevice, |
| 199 const CPDF_Matrix* pUser2Device, | 197 const CPDF_Matrix* pUser2Device, |
| 200 CPDF_Annot::AppearanceMode mode, | 198 CPDF_Annot::AppearanceMode mode, |
| 201 const CPDF_RenderOptions* pOptions); | 199 const CPDF_RenderOptions* pOptions); |
| 202 void DrawBorder(CFX_RenderDevice* pDevice, | 200 void DrawBorder(CFX_RenderDevice* pDevice, |
| 203 const CPDF_Matrix* pUser2Device, | 201 const CPDF_Matrix* pUser2Device, |
| 204 const CPDF_RenderOptions* pOptions); | 202 const CPDF_RenderOptions* pOptions); |
| 205 | 203 |
| 206 void ClearCachedAP(); | 204 void ClearCachedAP(); |
| 207 | 205 |
| 208 virtual void ResetAppearance(); | |
| 209 void WriteAppearance(const CFX_ByteString& sAPType, | 206 void WriteAppearance(const CFX_ByteString& sAPType, |
| 210 const CPDF_Rect& rcBBox, | 207 const CPDF_Rect& rcBBox, |
| 211 const CPDF_Matrix& matrix, | 208 const CPDF_Matrix& matrix, |
| 212 const CFX_ByteString& sContents, | 209 const CFX_ByteString& sContents, |
| 213 const CFX_ByteString& sAPState = ""); | 210 const CFX_ByteString& sAPState = ""); |
| 214 | 211 |
| 215 private: | 212 private: |
| 216 FX_BOOL CreateFormFiller(); | 213 FX_BOOL CreateFormFiller(); |
| 217 | 214 |
| 218 protected: | 215 protected: |
| 219 CPDF_Annot* m_pAnnot; | 216 CPDF_Annot* m_pAnnot; |
| 220 }; | 217 }; |
| 221 | 218 |
| 222 #endif // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ | 219 #endif // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ |
| OLD | NEW |