| 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_LIGHTWIDGET_CFWL_EDIT_H_ | 7 #ifndef XFA_FWL_LIGHTWIDGET_CFWL_EDIT_H_ |
| 8 #define XFA_FWL_LIGHTWIDGET_CFWL_EDIT_H_ | 8 #define XFA_FWL_LIGHTWIDGET_CFWL_EDIT_H_ |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "xfa/fwl/basewidget/ifwl_edit.h" |
| 12 #include "xfa/fwl/lightwidget/cfwl_widget.h" | 13 #include "xfa/fwl/lightwidget/cfwl_widget.h" |
| 13 | 14 |
| 14 class CFWL_WidgetProperties; | 15 class CFWL_WidgetProperties; |
| 15 class IFDE_TxtEdtDoRecord; | 16 class IFDE_TxtEdtDoRecord; |
| 16 | 17 |
| 17 class CFWL_Edit : public CFWL_Widget { | 18 class CFWL_Edit : public CFWL_Widget { |
| 18 public: | 19 public: |
| 19 CFWL_Edit(); | 20 CFWL_Edit(); |
| 20 ~CFWL_Edit() override; | 21 ~CFWL_Edit() override; |
| 21 | 22 |
| 23 IFWL_Edit* GetWidget() override; |
| 24 const IFWL_Edit* GetWidget() const override; |
| 25 |
| 22 static CFWL_Edit* Create(); | 26 static CFWL_Edit* Create(); |
| 23 FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr); | 27 FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr); |
| 24 FWL_Error SetText(const CFX_WideString& wsText); | 28 FWL_Error SetText(const CFX_WideString& wsText); |
| 25 int32_t GetTextLength() const; | 29 int32_t GetTextLength() const; |
| 26 FWL_Error GetText(CFX_WideString& wsText, | 30 FWL_Error GetText(CFX_WideString& wsText, |
| 27 int32_t nStart = 0, | 31 int32_t nStart = 0, |
| 28 int32_t nCount = -1) const; | 32 int32_t nCount = -1) const; |
| 29 FWL_Error ClearText(); | 33 FWL_Error ClearText(); |
| 30 int32_t GetCaretPos() const; | 34 int32_t GetCaretPos() const; |
| 31 int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE); | 35 int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 59 FX_BOOL Paste(const CFX_WideString& wsPaste); | 63 FX_BOOL Paste(const CFX_WideString& wsPaste); |
| 60 FX_BOOL Delete(); | 64 FX_BOOL Delete(); |
| 61 void SetScrollOffset(FX_FLOAT fScrollOffset); | 65 void SetScrollOffset(FX_FLOAT fScrollOffset); |
| 62 FX_BOOL GetSuggestWords(CFX_PointF pointf, | 66 FX_BOOL GetSuggestWords(CFX_PointF pointf, |
| 63 std::vector<CFX_ByteString>& sSuggest); | 67 std::vector<CFX_ByteString>& sSuggest); |
| 64 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, | 68 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, |
| 65 const CFX_ByteStringC& bsReplace); | 69 const CFX_ByteStringC& bsReplace); |
| 66 }; | 70 }; |
| 67 | 71 |
| 68 #endif // XFA_FWL_LIGHTWIDGET_CFWL_EDIT_H_ | 72 #endif // XFA_FWL_LIGHTWIDGET_CFWL_EDIT_H_ |
| OLD | NEW |