| 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   CFWL_Edit(const IFWL_App*); | 19   CFWL_Edit(const IFWL_App*); | 
| 20   ~CFWL_Edit() override; | 20   ~CFWL_Edit() override; | 
| 21 | 21 | 
| 22   void Initialize(); | 22   void Initialize(); | 
| 23 | 23 | 
| 24   FWL_Error SetText(const CFX_WideString& wsText); | 24   void SetText(const CFX_WideString& wsText); | 
| 25   int32_t GetTextLength() const; | 25   void GetText(CFX_WideString& wsText, int32_t nStart = 0, int32_t nCount = -1); | 
| 26   FWL_Error GetText(CFX_WideString& wsText, |  | 
| 27                     int32_t nStart = 0, |  | 
| 28                     int32_t nCount = -1) const; |  | 
| 29   FWL_Error ClearText(); |  | 
| 30   int32_t GetCaretPos() const; |  | 
| 31   int32_t SetCaretPos(int32_t nIndex, bool bBefore = true); |  | 
| 32   int32_t AddSelRange(int32_t nStart, int32_t nCount = -1); |  | 
| 33   int32_t CountSelRanges(); | 26   int32_t CountSelRanges(); | 
| 34   int32_t GetSelRange(int32_t nIndex, int32_t& nStart); | 27   int32_t GetSelRange(int32_t nIndex, int32_t& nStart); | 
| 35   FWL_Error ClearSelections(); |  | 
| 36   int32_t GetLimit(); | 28   int32_t GetLimit(); | 
| 37   FWL_Error SetLimit(int32_t nLimit); | 29   void SetLimit(int32_t nLimit); | 
| 38   FWL_Error SetAliasChar(FX_WCHAR wAlias); | 30   void SetAliasChar(FX_WCHAR wAlias); | 
| 39   FWL_Error SetFormatString(const CFX_WideString& wsFormat); |  | 
| 40   FWL_Error Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen); |  | 
| 41   FWL_Error DeleteSelections(); |  | 
| 42   FWL_Error DeleteRange(int32_t nStart, int32_t nCount = -1); |  | 
| 43   FWL_Error Replace(int32_t nStart, |  | 
| 44                     int32_t nLen, |  | 
| 45                     const CFX_WideStringC& wsReplace); |  | 
| 46   FWL_Error DoClipboard(int32_t iCmd); |  | 
| 47   bool Redo(const IFDE_TxtEdtDoRecord* pRecord); |  | 
| 48   bool Undo(const IFDE_TxtEdtDoRecord* pRecord); |  | 
| 49   FWL_Error SetTabWidth(FX_FLOAT fTabWidth, bool bEquidistant); |  | 
| 50   FWL_Error SetNumberRange(int32_t iMin, int32_t iMax); |  | 
| 51   FWL_Error SetBackColor(uint32_t dwColor); |  | 
| 52   FWL_Error SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize); |  | 
| 53   bool CanUndo(); |  | 
| 54   bool CanRedo(); |  | 
| 55   bool Undo(); |  | 
| 56   bool Redo(); |  | 
| 57   bool Copy(CFX_WideString& wsCopy); |  | 
| 58   bool Cut(CFX_WideString& wsCut); |  | 
| 59   bool Paste(const CFX_WideString& wsPaste); |  | 
| 60   bool Delete(); |  | 
| 61   void SetScrollOffset(FX_FLOAT fScrollOffset); | 31   void SetScrollOffset(FX_FLOAT fScrollOffset); | 
| 62   bool GetSuggestWords(CFX_PointF pointf, |  | 
| 63                        std::vector<CFX_ByteString>& sSuggest); |  | 
| 64   bool ReplaceSpellCheckWord(CFX_PointF pointf, |  | 
| 65                              const CFX_ByteStringC& bsReplace); |  | 
| 66 }; | 32 }; | 
| 67 | 33 | 
| 68 #endif  // XFA_FWL_CORE_CFWL_EDIT_H_ | 34 #endif  // XFA_FWL_CORE_CFWL_EDIT_H_ | 
| OLD | NEW | 
|---|