OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_CPDFSDK_WIDGET_H_ | 7 #ifndef FPDFSDK_INCLUDE_CPDFSDK_WIDGET_H_ |
8 #define FPDFSDK_INCLUDE_CPDFSDK_WIDGET_H_ | 8 #define FPDFSDK_INCLUDE_CPDFSDK_WIDGET_H_ |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void SetCheck(bool bChecked, bool bNotify); | 101 void SetCheck(bool bChecked, bool bNotify); |
102 void SetValue(const CFX_WideString& sValue, FX_BOOL bNotify); | 102 void SetValue(const CFX_WideString& sValue, FX_BOOL bNotify); |
103 void SetDefaultValue(const CFX_WideString& sValue); | 103 void SetDefaultValue(const CFX_WideString& sValue); |
104 void SetOptionSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify); | 104 void SetOptionSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify); |
105 void ClearSelection(FX_BOOL bNotify); | 105 void ClearSelection(FX_BOOL bNotify); |
106 void SetTopVisibleIndex(int index); | 106 void SetTopVisibleIndex(int index); |
107 | 107 |
108 #ifdef PDF_ENABLE_XFA | 108 #ifdef PDF_ENABLE_XFA |
109 void ResetAppearance(FX_BOOL bValueChanged); | 109 void ResetAppearance(FX_BOOL bValueChanged); |
110 #endif // PDF_ENABLE_XFA | 110 #endif // PDF_ENABLE_XFA |
111 void ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged); | 111 void ResetAppearance(const CFX_WideString* sValue, FX_BOOL bValueChanged); |
112 void ResetFieldAppearance(FX_BOOL bValueChanged); | 112 void ResetFieldAppearance(FX_BOOL bValueChanged); |
113 void UpdateField(); | 113 void UpdateField(); |
114 CFX_WideString OnFormat(FX_BOOL& bFormatted); | 114 CFX_WideString OnFormat(FX_BOOL& bFormatted); |
115 | 115 |
116 FX_BOOL OnAAction(CPDF_AAction::AActionType type, | 116 FX_BOOL OnAAction(CPDF_AAction::AActionType type, |
117 PDFSDK_FieldAction& data, | 117 PDFSDK_FieldAction& data, |
118 CPDFSDK_PageView* pPageView); | 118 CPDFSDK_PageView* pPageView); |
119 | 119 |
120 CPDFSDK_InterForm* GetInterForm() const { return m_pInterForm; } | 120 CPDFSDK_InterForm* GetInterForm() const { return m_pInterForm; } |
121 CPDF_FormField* GetFormField() const; | 121 CPDF_FormField* GetFormField() const; |
(...skipping 15 matching lines...) Expand all Loading... |
137 const CFX_Matrix* pUser2Device, | 137 const CFX_Matrix* pUser2Device, |
138 CPDF_Annot::AppearanceMode mode, | 138 CPDF_Annot::AppearanceMode mode, |
139 const CPDF_RenderOptions* pOptions) override; | 139 const CPDF_RenderOptions* pOptions) override; |
140 | 140 |
141 FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY); | 141 FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY); |
142 | 142 |
143 private: | 143 private: |
144 void ResetAppearance_PushButton(); | 144 void ResetAppearance_PushButton(); |
145 void ResetAppearance_CheckBox(); | 145 void ResetAppearance_CheckBox(); |
146 void ResetAppearance_RadioButton(); | 146 void ResetAppearance_RadioButton(); |
147 void ResetAppearance_ComboBox(const FX_WCHAR* sValue); | 147 void ResetAppearance_ComboBox(const CFX_WideString* sValue); |
148 void ResetAppearance_ListBox(); | 148 void ResetAppearance_ListBox(); |
149 void ResetAppearance_TextField(const FX_WCHAR* sValue); | 149 void ResetAppearance_TextField(const CFX_WideString* sValue); |
150 | 150 |
151 CFX_FloatRect GetClientRect() const; | 151 CFX_FloatRect GetClientRect() const; |
152 CFX_FloatRect GetRotatedRect() const; | 152 CFX_FloatRect GetRotatedRect() const; |
153 | 153 |
154 CFX_ByteString GetBackgroundAppStream() const; | 154 CFX_ByteString GetBackgroundAppStream() const; |
155 CFX_ByteString GetBorderAppStream() const; | 155 CFX_ByteString GetBorderAppStream() const; |
156 CFX_Matrix GetMatrix() const; | 156 CFX_Matrix GetMatrix() const; |
157 | 157 |
158 CPWL_Color GetTextPWLColor() const; | 158 CPWL_Color GetTextPWLColor() const; |
159 CPWL_Color GetBorderPWLColor() const; | 159 CPWL_Color GetBorderPWLColor() const; |
160 CPWL_Color GetFillPWLColor() const; | 160 CPWL_Color GetFillPWLColor() const; |
161 | 161 |
162 void AddImageToAppearance(const CFX_ByteString& sAPType, CPDF_Stream* pImage); | 162 void AddImageToAppearance(const CFX_ByteString& sAPType, CPDF_Stream* pImage); |
163 void RemoveAppearance(const CFX_ByteString& sAPType); | 163 void RemoveAppearance(const CFX_ByteString& sAPType); |
164 | 164 |
165 CPDFSDK_InterForm* const m_pInterForm; | 165 CPDFSDK_InterForm* const m_pInterForm; |
166 FX_BOOL m_bAppModified; | 166 FX_BOOL m_bAppModified; |
167 int32_t m_nAppAge; | 167 int32_t m_nAppAge; |
168 int32_t m_nValueAge; | 168 int32_t m_nValueAge; |
169 | 169 |
170 #ifdef PDF_ENABLE_XFA | 170 #ifdef PDF_ENABLE_XFA |
171 mutable CXFA_FFWidget* m_hMixXFAWidget; | 171 mutable CXFA_FFWidget* m_hMixXFAWidget; |
172 mutable CXFA_FFWidgetHandler* m_pWidgetHandler; | 172 mutable CXFA_FFWidgetHandler* m_pWidgetHandler; |
173 #endif // PDF_ENABLE_XFA | 173 #endif // PDF_ENABLE_XFA |
174 }; | 174 }; |
175 | 175 |
176 #endif // FPDFSDK_INCLUDE_CPDFSDK_WIDGET_H_ | 176 #endif // FPDFSDK_INCLUDE_CPDFSDK_WIDGET_H_ |
OLD | NEW |