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> |
| 11 |
10 #include "xfa/fde/ifde_txtedtengine.h" | 12 #include "xfa/fde/ifde_txtedtengine.h" |
11 | 13 |
12 class CFDE_TxtEdtBuf; | 14 class CFDE_TxtEdtBuf; |
13 class CFDE_TxtEdtParag; | 15 class CFDE_TxtEdtParag; |
14 class CFX_TxtBreak; | 16 class CFX_TxtBreak; |
15 class IFDE_TxtEdtDoRecord; | 17 class IFDE_TxtEdtDoRecord; |
16 class IFX_CharIter; | 18 class IFX_CharIter; |
17 | 19 |
18 class CFDE_TxtEdtEngine { | 20 class CFDE_TxtEdtEngine { |
19 public: | 21 public: |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 void UpdateCaretRect(int32_t nIndex, FX_BOOL bBefore = TRUE); | 145 void UpdateCaretRect(int32_t nIndex, FX_BOOL bBefore = TRUE); |
144 void GetCaretRect(CFX_RectF& rtCaret, | 146 void GetCaretRect(CFX_RectF& rtCaret, |
145 int32_t nPageIndex, | 147 int32_t nPageIndex, |
146 int32_t nCaret, | 148 int32_t nCaret, |
147 FX_BOOL bBefore = TRUE); | 149 FX_BOOL bBefore = TRUE); |
148 void UpdateCaretIndex(const CFX_PointF& ptCaret); | 150 void UpdateCaretIndex(const CFX_PointF& ptCaret); |
149 | 151 |
150 FX_BOOL IsSelect(); | 152 FX_BOOL IsSelect(); |
151 void DeleteSelect(); | 153 void DeleteSelect(); |
152 | 154 |
153 CFDE_TxtEdtBuf* m_pTxtBuf; | 155 std::unique_ptr<CFDE_TxtEdtBuf> m_pTxtBuf; |
154 CFX_TxtBreak* m_pTextBreak; | 156 std::unique_ptr<CFX_TxtBreak> m_pTextBreak; |
155 FDE_TXTEDTPARAMS m_Param; | 157 FDE_TXTEDTPARAMS m_Param; |
156 CFX_ArrayTemplate<IFDE_TxtEdtPage*> m_PagePtrArray; | 158 CFX_ArrayTemplate<IFDE_TxtEdtPage*> m_PagePtrArray; |
157 CFX_ArrayTemplate<CFDE_TxtEdtParag*> m_ParagPtrArray; | 159 CFX_ArrayTemplate<CFDE_TxtEdtParag*> m_ParagPtrArray; |
158 CFX_ArrayTemplate<FDE_TXTEDTSELRANGE*> m_SelRangePtrArr; | 160 CFX_ArrayTemplate<FDE_TXTEDTSELRANGE*> m_SelRangePtrArr; |
159 int32_t m_nPageLineCount; | 161 int32_t m_nPageLineCount; |
160 int32_t m_nLineCount; | 162 int32_t m_nLineCount; |
161 int32_t m_nAnchorPos; | 163 int32_t m_nAnchorPos; |
162 int32_t m_nLayoutPos; | 164 int32_t m_nLayoutPos; |
163 FX_FLOAT m_fCaretPosReserve; | 165 FX_FLOAT m_fCaretPosReserve; |
164 int32_t m_nCaret; | 166 int32_t m_nCaret; |
165 FX_BOOL m_bBefore; | 167 FX_BOOL m_bBefore; |
166 int32_t m_nCaretPage; | 168 int32_t m_nCaretPage; |
167 CFX_RectF m_rtCaret; | 169 CFX_RectF m_rtCaret; |
168 uint32_t m_dwFindFlags; | 170 uint32_t m_dwFindFlags; |
169 FX_BOOL m_bLock; | 171 FX_BOOL m_bLock; |
170 int32_t m_nLimit; | 172 int32_t m_nLimit; |
171 FX_WCHAR m_wcAliasChar; | 173 FX_WCHAR m_wcAliasChar; |
172 int32_t m_nFirstLineEnd; | 174 int32_t m_nFirstLineEnd; |
173 FX_BOOL m_bAutoLineEnd; | 175 FX_BOOL m_bAutoLineEnd; |
174 FX_WCHAR m_wLineEnd; | 176 FX_WCHAR m_wLineEnd; |
175 FDE_TXTEDT_TEXTCHANGE_INFO m_ChangeInfo; | 177 FDE_TXTEDT_TEXTCHANGE_INFO m_ChangeInfo; |
176 }; | 178 }; |
177 | 179 |
178 #endif // XFA_FDE_CFDE_TXTEDTENGINE_H_ | 180 #endif // XFA_FDE_CFDE_TXTEDTENGINE_H_ |
OLD | NEW |