dsinclair | 6539518 | 2016-05-18 11:09:47 -0700 | [diff] [blame] | 1 | // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
| 7 | #ifndef XFA_FDE_CFDE_TXTEDTBUFITER_H_ |
| 8 | #define XFA_FDE_CFDE_TXTEDTBUFITER_H_ |
| 9 | |
dsinclair | a52ab74 | 2016-09-29 13:59:29 -0700 | [diff] [blame] | 10 | #include "core/fxcrt/fx_system.h" |
dsinclair | 6539518 | 2016-05-18 11:09:47 -0700 | [diff] [blame] | 11 | #include "xfa/fde/ifx_chariter.h" |
| 12 | |
| 13 | class CFDE_TxtEdtBuf; |
| 14 | |
| 15 | class CFDE_TxtEdtBufIter : public IFX_CharIter { |
| 16 | public: |
Dan Sinclair | 85c8e7f | 2016-11-21 13:50:32 -0500 | [diff] [blame] | 17 | explicit CFDE_TxtEdtBufIter(CFDE_TxtEdtBuf* pBuf, FX_WCHAR wcAlias = 0); |
dsinclair | 6539518 | 2016-05-18 11:09:47 -0700 | [diff] [blame] | 18 | ~CFDE_TxtEdtBufIter() override; |
| 19 | |
tsepez | d19e912 | 2016-11-02 15:43:18 -0700 | [diff] [blame] | 20 | bool Next(bool bPrev = false) override; |
dsinclair | 6539518 | 2016-05-18 11:09:47 -0700 | [diff] [blame] | 21 | FX_WCHAR GetChar() override; |
| 22 | void SetAt(int32_t nIndex) override; |
| 23 | int32_t GetAt() const override; |
tsepez | d19e912 | 2016-11-02 15:43:18 -0700 | [diff] [blame] | 24 | bool IsEOF(bool bTail = true) const override; |
dsinclair | 6539518 | 2016-05-18 11:09:47 -0700 | [diff] [blame] | 25 | IFX_CharIter* Clone() override; |
| 26 | |
| 27 | private: |
| 28 | CFDE_TxtEdtBuf* m_pBuf; |
| 29 | int32_t m_nCurChunk; |
| 30 | int32_t m_nCurIndex; |
| 31 | int32_t m_nIndex; |
| 32 | FX_WCHAR m_Alias; |
| 33 | }; |
| 34 | |
| 35 | #endif // XFA_FDE_CFDE_TXTEDTBUFITER_H_ |