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 XFA_FWL_CORE_CFWL_EDIT_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_EDIT_H_ |
8 #define XFA_FWL_CORE_CFWL_EDIT_H_ | 8 #define XFA_FWL_CORE_CFWL_EDIT_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "xfa/fwl/core/cfwl_widget.h" | 12 #include "xfa/fwl/core/cfwl_widget.h" |
13 #include "xfa/fwl/core/ifwl_edit.h" | 13 #include "xfa/fwl/core/ifwl_edit.h" |
14 | 14 |
15 class IFDE_TxtEdtDoRecord; | 15 class IFDE_TxtEdtDoRecord; |
16 | 16 |
17 class CFWL_Edit : public CFWL_Widget { | 17 class CFWL_Edit : public CFWL_Widget { |
18 public: | 18 public: |
19 explicit CFWL_Edit(const IFWL_App*); | 19 explicit CFWL_Edit(const CFWL_App*); |
20 ~CFWL_Edit() override; | 20 ~CFWL_Edit() override; |
21 | 21 |
22 void Initialize(); | 22 void Initialize(); |
23 | 23 |
24 void SetText(const CFX_WideString& wsText); | 24 void SetText(const CFX_WideString& wsText); |
25 void GetText(CFX_WideString& wsText, | 25 void GetText(CFX_WideString& wsText, |
26 int32_t nStart = 0, | 26 int32_t nStart = 0, |
27 int32_t nCount = -1) const; | 27 int32_t nCount = -1) const; |
28 | 28 |
29 int32_t CountSelRanges() const; | 29 int32_t CountSelRanges() const; |
30 int32_t GetSelRange(int32_t nIndex, int32_t& nStart) const; | 30 int32_t GetSelRange(int32_t nIndex, int32_t& nStart) const; |
31 | 31 |
32 int32_t GetLimit() const; | 32 int32_t GetLimit() const; |
33 void SetLimit(int32_t nLimit); | 33 void SetLimit(int32_t nLimit); |
34 | 34 |
35 void SetAliasChar(FX_WCHAR wAlias); | 35 void SetAliasChar(FX_WCHAR wAlias); |
36 | 36 |
37 void SetScrollOffset(FX_FLOAT fScrollOffset); | 37 void SetScrollOffset(FX_FLOAT fScrollOffset); |
38 }; | 38 }; |
39 | 39 |
40 #endif // XFA_FWL_CORE_CFWL_EDIT_H_ | 40 #endif // XFA_FWL_CORE_CFWL_EDIT_H_ |
OLD | NEW |