| 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_FDE_CFDE_TXTEDTENGINE_H_ | 7 #ifndef XFA_FDE_CFDE_TXTEDTENGINE_H_ |
| 8 #define XFA_FDE_CFDE_TXTEDTENGINE_H_ | 8 #define XFA_FDE_CFDE_TXTEDTENGINE_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 void SetEditParams(const FDE_TXTEDTPARAMS& params); | 25 void SetEditParams(const FDE_TXTEDTPARAMS& params); |
| 26 FDE_TXTEDTPARAMS* GetEditParams(); | 26 FDE_TXTEDTPARAMS* GetEditParams(); |
| 27 | 27 |
| 28 int32_t CountPages() const; | 28 int32_t CountPages() const; |
| 29 IFDE_TxtEdtPage* GetPage(int32_t nIndex); | 29 IFDE_TxtEdtPage* GetPage(int32_t nIndex); |
| 30 | 30 |
| 31 void SetTextByStream(IFGAS_Stream* pStream); | 31 void SetTextByStream(IFGAS_Stream* pStream); |
| 32 void SetText(const CFX_WideString& wsText); | 32 void SetText(const CFX_WideString& wsText); |
| 33 int32_t GetTextLength() const; | 33 int32_t GetTextLength() const; |
| 34 CFX_WideString GetText(int32_t nStart, int32_t nCount = -1) const; | 34 CFX_WideString GetText(int32_t nStart, int32_t nCount) const; |
| 35 void ClearText(); | 35 void ClearText(); |
| 36 | 36 |
| 37 int32_t GetCaretRect(CFX_RectF& rtCaret) const; | 37 int32_t GetCaretRect(CFX_RectF& rtCaret) const; |
| 38 int32_t GetCaretPos() const; | 38 int32_t GetCaretPos() const; |
| 39 int32_t SetCaretPos(int32_t nIndex, bool bBefore); | 39 int32_t SetCaretPos(int32_t nIndex, bool bBefore); |
| 40 int32_t MoveCaretPos(FDE_TXTEDTMOVECARET eMoveCaret, | 40 int32_t MoveCaretPos(FDE_TXTEDTMOVECARET eMoveCaret, |
| 41 bool bShift = false, | 41 bool bShift = false, |
| 42 bool bCtrl = false); | 42 bool bCtrl = false); |
| 43 void Lock(); | 43 void Lock(); |
| 44 void Unlock(); | 44 void Unlock(); |
| 45 bool IsLocked() const; | 45 bool IsLocked() const; |
| 46 | 46 |
| 47 int32_t Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength); | 47 int32_t Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength); |
| 48 int32_t Delete(int32_t nStart, bool bBackspace = false); | 48 int32_t Delete(int32_t nStart, bool bBackspace = false); |
| 49 int32_t DeleteRange(int32_t nStart, int32_t nCount = -1); | 49 int32_t DeleteRange(int32_t nStart, int32_t nCount = -1); |
| 50 int32_t Replace(int32_t nStart, | 50 int32_t Replace(int32_t nStart, |
| 51 int32_t nLength, | 51 int32_t nLength, |
| 52 const CFX_WideString& wsReplace); | 52 const CFX_WideString& wsReplace); |
| 53 | 53 |
| 54 void SetLimit(int32_t nLimit); | 54 void SetLimit(int32_t nLimit); |
| 55 void SetAliasChar(FX_WCHAR wcAlias); | 55 void SetAliasChar(FX_WCHAR wcAlias); |
| 56 | 56 |
| 57 void RemoveSelRange(int32_t nStart, int32_t nCount = -1); | 57 void RemoveSelRange(int32_t nStart, int32_t nCount); |
| 58 | 58 |
| 59 void AddSelRange(int32_t nStart, int32_t nCount = -1); | 59 void AddSelRange(int32_t nStart, int32_t nCount); |
| 60 int32_t CountSelRanges() const; | 60 int32_t CountSelRanges() const; |
| 61 int32_t GetSelRange(int32_t nIndex, int32_t& nStart) const; | 61 int32_t GetSelRange(int32_t nIndex, int32_t& nStart) const; |
| 62 void ClearSelection(); | 62 void ClearSelection(); |
| 63 | 63 |
| 64 bool Redo(const IFDE_TxtEdtDoRecord* pRecord); | 64 bool Redo(const IFDE_TxtEdtDoRecord* pRecord); |
| 65 bool Undo(const IFDE_TxtEdtDoRecord* pRecord); | 65 bool Undo(const IFDE_TxtEdtDoRecord* pRecord); |
| 66 | 66 |
| 67 int32_t StartLayout(); | 67 int32_t StartLayout(); |
| 68 int32_t DoLayout(IFX_Pause* pPause); | 68 int32_t DoLayout(IFX_Pause* pPause); |
| 69 void EndLayout(); | 69 void EndLayout(); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 bool m_bLock; | 165 bool m_bLock; |
| 166 int32_t m_nLimit; | 166 int32_t m_nLimit; |
| 167 FX_WCHAR m_wcAliasChar; | 167 FX_WCHAR m_wcAliasChar; |
| 168 int32_t m_nFirstLineEnd; | 168 int32_t m_nFirstLineEnd; |
| 169 bool m_bAutoLineEnd; | 169 bool m_bAutoLineEnd; |
| 170 FX_WCHAR m_wLineEnd; | 170 FX_WCHAR m_wLineEnd; |
| 171 FDE_TXTEDT_TEXTCHANGE_INFO m_ChangeInfo; | 171 FDE_TXTEDT_TEXTCHANGE_INFO m_ChangeInfo; |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 #endif // XFA_FDE_CFDE_TXTEDTENGINE_H_ | 174 #endif // XFA_FDE_CFDE_TXTEDTENGINE_H_ |
| OLD | NEW |