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_FEE_FDE_TXTEDTBUF_H_ | 7 #ifndef XFA_FEE_FDE_TXTEDTBUF_H_ |
8 #define XFA_FEE_FDE_TXTEDTBUF_H_ | 8 #define XFA_FEE_FDE_TXTEDTBUF_H_ |
9 | 9 |
10 #include "xfa/fee/ifde_txtedtengine.h" | 10 #include "xfa/fee/ifde_txtedtengine.h" |
11 #include "xfa/fgas/crt/fgas_memory.h" | 11 #include "xfa/fgas/crt/fgas_memory.h" |
12 | 12 |
13 class IFX_CharIter; | |
14 class CFDE_TxtEdtBuf; | 13 class CFDE_TxtEdtBuf; |
15 | 14 |
16 class CFDE_TxtEdtBufIter : public IFX_CharIter { | 15 class CFDE_TxtEdtBufIter : public IFX_CharIter { |
17 public: | 16 public: |
18 CFDE_TxtEdtBufIter(CFDE_TxtEdtBuf* pBuf, FX_WCHAR wcAlias = 0); | 17 CFDE_TxtEdtBufIter(CFDE_TxtEdtBuf* pBuf, FX_WCHAR wcAlias = 0); |
| 18 ~CFDE_TxtEdtBufIter() override; |
19 | 19 |
20 virtual void Release(); | 20 FX_BOOL Next(FX_BOOL bPrev = FALSE) override; |
21 virtual FX_BOOL Next(FX_BOOL bPrev = FALSE); | 21 FX_WCHAR GetChar() override; |
22 virtual FX_WCHAR GetChar(); | 22 void SetAt(int32_t nIndex) override; |
23 virtual void SetAt(int32_t nIndex); | 23 int32_t GetAt() const override; |
24 virtual int32_t GetAt() const; | 24 FX_BOOL IsEOF(FX_BOOL bTail = TRUE) const override; |
25 virtual FX_BOOL IsEOF(FX_BOOL bTail = TRUE) const; | 25 IFX_CharIter* Clone() override; |
26 virtual IFX_CharIter* Clone(); | |
27 | |
28 protected: | |
29 ~CFDE_TxtEdtBufIter(); | |
30 | 26 |
31 private: | 27 private: |
32 CFDE_TxtEdtBuf* m_pBuf; | 28 CFDE_TxtEdtBuf* m_pBuf; |
33 int32_t m_nCurChunk; | 29 int32_t m_nCurChunk; |
34 int32_t m_nCurIndex; | 30 int32_t m_nCurIndex; |
35 int32_t m_nIndex; | 31 int32_t m_nIndex; |
36 FX_WCHAR m_Alias; | 32 FX_WCHAR m_Alias; |
37 }; | 33 }; |
| 34 |
38 class CFDE_TxtEdtBuf { | 35 class CFDE_TxtEdtBuf { |
39 public: | 36 public: |
40 CFDE_TxtEdtBuf(); | 37 CFDE_TxtEdtBuf(); |
41 | 38 |
42 void Release(); | 39 void Release(); |
43 FX_BOOL SetChunkSize(int32_t nChunkSize); | 40 FX_BOOL SetChunkSize(int32_t nChunkSize); |
44 int32_t GetChunkSize() const; | 41 int32_t GetChunkSize() const; |
45 int32_t GetTextLength() const; | 42 int32_t GetTextLength() const; |
46 void SetText(const CFX_WideString& wsText); | 43 void SetText(const CFX_WideString& wsText); |
47 void GetText(CFX_WideString& wsText) const; | 44 void GetText(CFX_WideString& wsText) const; |
(...skipping 30 matching lines...) Expand all Loading... |
78 | 75 |
79 int32_t m_nChunkSize; | 76 int32_t m_nChunkSize; |
80 | 77 |
81 int32_t m_nTotal; | 78 int32_t m_nTotal; |
82 FX_BOOL m_bChanged; | 79 FX_BOOL m_bChanged; |
83 CFX_ArrayTemplate<FDE_CHUNKHEADER*> m_Chunks; | 80 CFX_ArrayTemplate<FDE_CHUNKHEADER*> m_Chunks; |
84 IFX_MemoryAllocator* m_pAllocator; | 81 IFX_MemoryAllocator* m_pAllocator; |
85 }; | 82 }; |
86 | 83 |
87 #endif // XFA_FEE_FDE_TXTEDTBUF_H_ | 84 #endif // XFA_FEE_FDE_TXTEDTBUF_H_ |
OLD | NEW |