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> |
11 | 11 |
| 12 #include "core/fxcrt/cfx_retain_ptr.h" |
12 #include "xfa/fde/ifde_txtedtengine.h" | 13 #include "xfa/fde/ifde_txtedtengine.h" |
13 | 14 |
14 class CFDE_TxtEdtBuf; | 15 class CFDE_TxtEdtBuf; |
15 class CFDE_TxtEdtParag; | 16 class CFDE_TxtEdtParag; |
16 class CFX_TxtBreak; | 17 class CFX_TxtBreak; |
17 class IFDE_TxtEdtDoRecord; | 18 class IFDE_TxtEdtDoRecord; |
18 class IFX_CharIter; | 19 class IFX_CharIter; |
19 | 20 |
20 class CFDE_TxtEdtEngine { | 21 class CFDE_TxtEdtEngine { |
21 public: | 22 public: |
22 CFDE_TxtEdtEngine(); | 23 CFDE_TxtEdtEngine(); |
23 ~CFDE_TxtEdtEngine(); | 24 ~CFDE_TxtEdtEngine(); |
24 | 25 |
25 void SetEditParams(const FDE_TXTEDTPARAMS& params); | 26 void SetEditParams(const FDE_TXTEDTPARAMS& params); |
26 FDE_TXTEDTPARAMS* GetEditParams(); | 27 FDE_TXTEDTPARAMS* GetEditParams(); |
27 | 28 |
28 int32_t CountPages() const; | 29 int32_t CountPages() const; |
29 IFDE_TxtEdtPage* GetPage(int32_t nIndex); | 30 IFDE_TxtEdtPage* GetPage(int32_t nIndex); |
30 | 31 |
31 void SetTextByStream(IFGAS_Stream* pStream); | 32 void SetTextByStream(const CFX_RetainPtr<IFGAS_Stream>& pStream); |
32 void SetText(const CFX_WideString& wsText); | 33 void SetText(const CFX_WideString& wsText); |
33 int32_t GetTextLength() const; | 34 int32_t GetTextLength() const; |
34 CFX_WideString GetText(int32_t nStart, int32_t nCount = -1) const; | 35 CFX_WideString GetText(int32_t nStart, int32_t nCount = -1) const; |
35 void ClearText(); | 36 void ClearText(); |
36 | 37 |
37 int32_t GetCaretRect(CFX_RectF& rtCaret) const; | 38 int32_t GetCaretRect(CFX_RectF& rtCaret) const; |
38 int32_t GetCaretPos() const; | 39 int32_t GetCaretPos() const; |
39 int32_t SetCaretPos(int32_t nIndex, bool bBefore); | 40 int32_t SetCaretPos(int32_t nIndex, bool bBefore); |
40 int32_t MoveCaretPos(FDE_TXTEDTMOVECARET eMoveCaret, | 41 int32_t MoveCaretPos(FDE_TXTEDTMOVECARET eMoveCaret, |
41 bool bShift = false, | 42 bool bShift = false, |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 bool m_bLock; | 166 bool m_bLock; |
166 int32_t m_nLimit; | 167 int32_t m_nLimit; |
167 FX_WCHAR m_wcAliasChar; | 168 FX_WCHAR m_wcAliasChar; |
168 int32_t m_nFirstLineEnd; | 169 int32_t m_nFirstLineEnd; |
169 bool m_bAutoLineEnd; | 170 bool m_bAutoLineEnd; |
170 FX_WCHAR m_wLineEnd; | 171 FX_WCHAR m_wLineEnd; |
171 FDE_TXTEDT_TEXTCHANGE_INFO m_ChangeInfo; | 172 FDE_TXTEDT_TEXTCHANGE_INFO m_ChangeInfo; |
172 }; | 173 }; |
173 | 174 |
174 #endif // XFA_FDE_CFDE_TXTEDTENGINE_H_ | 175 #endif // XFA_FDE_CFDE_TXTEDTENGINE_H_ |
OLD | NEW |