| 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_BASEFORM_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
| 8 #define FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
| 9 | 9 |
| 10 #if _FX_OS_ == _FX_ANDROID_ | 10 #if _FX_OS_ == _FX_ANDROID_ |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 int nSelEnd; // in[out] | 59 int nSelEnd; // in[out] |
| 60 int nSelStart; // in[out] | 60 int nSelStart; // in[out] |
| 61 CFX_WideString sValue; // in[out] | 61 CFX_WideString sValue; // in[out] |
| 62 FX_BOOL bWillCommit; // in | 62 FX_BOOL bWillCommit; // in |
| 63 FX_BOOL bFieldFull; // in | 63 FX_BOOL bFieldFull; // in |
| 64 FX_BOOL bRC; // in[out] | 64 FX_BOOL bRC; // in[out] |
| 65 } PDFSDK_FieldAction; | 65 } PDFSDK_FieldAction; |
| 66 | 66 |
| 67 class CPDFSDK_Widget : public CPDFSDK_BAAnnot { | 67 class CPDFSDK_Widget : public CPDFSDK_BAAnnot { |
| 68 public: | 68 public: |
| 69 IXFA_Widget* GetMixXFAWidget(); | 69 IXFA_Widget* GetMixXFAWidget() const; |
| 70 IXFA_Widget* GetGroupMixXFAWidget(); | 70 IXFA_Widget* GetGroupMixXFAWidget(); |
| 71 IXFA_WidgetHandler* GetXFAWidgetHandler(); | 71 IXFA_WidgetHandler* GetXFAWidgetHandler() const; |
| 72 | 72 |
| 73 FX_BOOL HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT); | 73 FX_BOOL HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT); |
| 74 FX_BOOL OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, | 74 FX_BOOL OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, |
| 75 PDFSDK_FieldAction& data, | 75 PDFSDK_FieldAction& data, |
| 76 CPDFSDK_PageView* pPageView); | 76 CPDFSDK_PageView* pPageView); |
| 77 | 77 |
| 78 void Synchronize(FX_BOOL bSynchronizeElse); | 78 void Synchronize(FX_BOOL bSynchronizeElse); |
| 79 void SynchronizeXFAValue(); | 79 void SynchronizeXFAValue(); |
| 80 void SynchronizeXFAItems(); | 80 void SynchronizeXFAItems(); |
| 81 | 81 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 107 // FIELDFLAG_REQUIRED | 107 // FIELDFLAG_REQUIRED |
| 108 // FIELDFLAG_NOEXPORT | 108 // FIELDFLAG_NOEXPORT |
| 109 int GetFieldFlags() const; | 109 int GetFieldFlags() const; |
| 110 int GetRotate() const; | 110 int GetRotate() const; |
| 111 | 111 |
| 112 FX_BOOL GetFillColor(FX_COLORREF& color) const; | 112 FX_BOOL GetFillColor(FX_COLORREF& color) const; |
| 113 FX_BOOL GetBorderColor(FX_COLORREF& color) const; | 113 FX_BOOL GetBorderColor(FX_COLORREF& color) const; |
| 114 FX_BOOL GetTextColor(FX_COLORREF& color) const; | 114 FX_BOOL GetTextColor(FX_COLORREF& color) const; |
| 115 FX_FLOAT GetFontSize() const; | 115 FX_FLOAT GetFontSize() const; |
| 116 | 116 |
| 117 int GetSelectedIndex(int nIndex); | 117 int GetSelectedIndex(int nIndex) const; |
| 118 CFX_WideString GetValue(FX_BOOL bDisplay = TRUE); | 118 CFX_WideString GetValue(FX_BOOL bDisplay = TRUE) const; |
| 119 CFX_WideString GetDefaultValue() const; | 119 CFX_WideString GetDefaultValue() const; |
| 120 CFX_WideString GetOptionLabel(int nIndex) const; | 120 CFX_WideString GetOptionLabel(int nIndex) const; |
| 121 int CountOptions() const; | 121 int CountOptions() const; |
| 122 FX_BOOL IsOptionSelected(int nIndex); | 122 FX_BOOL IsOptionSelected(int nIndex) const; |
| 123 int GetTopVisibleIndex() const; | 123 int GetTopVisibleIndex() const; |
| 124 FX_BOOL IsChecked(); | 124 FX_BOOL IsChecked() const; |
| 125 /* | 125 /* |
| 126 BF_ALIGN_LEFT | 126 BF_ALIGN_LEFT |
| 127 BF_ALIGN_MIDDL | 127 BF_ALIGN_MIDDL |
| 128 BF_ALIGN_RIGHT | 128 BF_ALIGN_RIGHT |
| 129 */ | 129 */ |
| 130 int GetAlignment() const; | 130 int GetAlignment() const; |
| 131 int GetMaxLen() const; | 131 int GetMaxLen() const; |
| 132 CFX_WideString GetName(); | 132 CFX_WideString GetName() const; |
| 133 CFX_WideString GetAlternateName() const; | 133 CFX_WideString GetAlternateName() const; |
| 134 | 134 |
| 135 // Set Properties. | 135 // Set Properties. |
| 136 void SetCheck(FX_BOOL bChecked, FX_BOOL bNotify); | 136 void SetCheck(FX_BOOL bChecked, FX_BOOL bNotify); |
| 137 void SetValue(const CFX_WideString& sValue, FX_BOOL bNotify); | 137 void SetValue(const CFX_WideString& sValue, FX_BOOL bNotify); |
| 138 void SetDefaultValue(const CFX_WideString& sValue); | 138 void SetDefaultValue(const CFX_WideString& sValue); |
| 139 void SetOptionSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify); | 139 void SetOptionSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify); |
| 140 void ClearSelection(FX_BOOL bNotify); | 140 void ClearSelection(FX_BOOL bNotify); |
| 141 void SetTopVisibleIndex(int index); | 141 void SetTopVisibleIndex(int index); |
| 142 | 142 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 public: | 191 public: |
| 192 FX_BOOL IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode); | 192 FX_BOOL IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode); |
| 193 void DrawAppearance(CFX_RenderDevice* pDevice, | 193 void DrawAppearance(CFX_RenderDevice* pDevice, |
| 194 const CPDF_Matrix* pUser2Device, | 194 const CPDF_Matrix* pUser2Device, |
| 195 CPDF_Annot::AppearanceMode mode, | 195 CPDF_Annot::AppearanceMode mode, |
| 196 const CPDF_RenderOptions* pOptions); | 196 const CPDF_RenderOptions* pOptions); |
| 197 | 197 |
| 198 public: | 198 public: |
| 199 FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY); | 199 FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY); |
| 200 | 200 |
| 201 private: | |
| 202 CPDFSDK_InterForm* m_pInterForm; | 201 CPDFSDK_InterForm* m_pInterForm; |
| 203 FX_BOOL m_bAppModified; | 202 FX_BOOL m_bAppModified; |
| 204 int32_t m_nAppAge; | 203 int32_t m_nAppAge; |
| 205 int32_t m_nValueAge; | 204 int32_t m_nValueAge; |
| 206 | 205 |
| 207 IXFA_Widget* m_hMixXFAWidget; | 206 mutable IXFA_Widget* m_hMixXFAWidget; |
| 208 IXFA_WidgetHandler* m_pWidgetHandler; | 207 mutable IXFA_WidgetHandler* m_pWidgetHandler; |
| 209 }; | 208 }; |
| 210 | 209 |
| 211 class CPDFSDK_XFAWidget : public CPDFSDK_Annot { | 210 class CPDFSDK_XFAWidget : public CPDFSDK_Annot { |
| 212 public: | 211 public: |
| 213 CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, | 212 CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, |
| 214 CPDFSDK_PageView* pPageView, | 213 CPDFSDK_PageView* pPageView, |
| 215 CPDFSDK_InterForm* pInterForm); | 214 CPDFSDK_InterForm* pInterForm); |
| 216 virtual ~CPDFSDK_XFAWidget() {} | 215 virtual ~CPDFSDK_XFAWidget() {} |
| 217 | 216 |
| 218 public: | 217 public: |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 static CPDF_Rect GetAnnotRect(CPDFSDK_Annot* pAnnot); | 377 static CPDF_Rect GetAnnotRect(CPDFSDK_Annot* pAnnot); |
| 379 | 378 |
| 380 CPDFSDK_PageView* m_pPageView; | 379 CPDFSDK_PageView* m_pPageView; |
| 381 CFX_ByteString m_sType; | 380 CFX_ByteString m_sType; |
| 382 CFX_ByteString m_sSubType; | 381 CFX_ByteString m_sSubType; |
| 383 int m_nTabs; | 382 int m_nTabs; |
| 384 CPDFSDK_Annots m_Annots; | 383 CPDFSDK_Annots m_Annots; |
| 385 }; | 384 }; |
| 386 | 385 |
| 387 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ | 386 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
| OLD | NEW |