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