Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 1 | // Copyright 2014 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_FDE_ITERATOR_H_ |
| 8 | #define XFA_FDE_FDE_ITERATOR_H_ |
| 9 | |
| 10 | #include "xfa/fde/fde_visualset.h" |
| 11 | #include "xfa/fgas/crt/fgas_memory.h" |
dsinclair | 08153b1 | 2016-04-13 10:58:52 -0700 | [diff] [blame] | 12 | #include "xfa/fgas/crt/fgas_utils.h" |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 13 | |
| 14 | struct FDE_CANVASITEM { |
| 15 | IFDE_CanvasSet* pCanvas; |
dsinclair | 705f829 | 2016-06-07 10:10:45 -0700 | [diff] [blame] | 16 | FDE_TEXTEDITPIECE* hCanvas; |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 17 | FX_POSITION hPos; |
| 18 | }; |
| 19 | |
dsinclair | acd0d59 | 2016-04-21 11:06:27 -0700 | [diff] [blame] | 20 | class CFDE_VisualSetIterator : public CFX_Target { |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 21 | public: |
| 22 | CFDE_VisualSetIterator(); |
tsepez | f74ad99 | 2016-05-11 10:26:05 -0700 | [diff] [blame] | 23 | ~CFDE_VisualSetIterator() override; |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 24 | |
tsepez | d19e912 | 2016-11-02 15:43:18 -0700 | [diff] [blame^] | 25 | bool AttachCanvas(IFDE_CanvasSet* pCanvas); |
| 26 | bool FilterObjects(uint32_t dwObjects = 0xFFFFFFFF); |
dsinclair | acd0d59 | 2016-04-21 11:06:27 -0700 | [diff] [blame] | 27 | |
| 28 | void Reset(); |
dsinclair | 705f829 | 2016-06-07 10:10:45 -0700 | [diff] [blame] | 29 | FDE_TEXTEDITPIECE* GetNext(IFDE_VisualSet*& pVisualSet, |
| 30 | FDE_TEXTEDITPIECE** phCanvasObj = nullptr, |
| 31 | IFDE_CanvasSet** ppCanvasSet = nullptr); |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 32 | |
| 33 | protected: |
tsepez | deee3d2 | 2016-03-25 14:38:58 -0700 | [diff] [blame] | 34 | uint32_t m_dwFilter; |
Dan Sinclair | 1770c02 | 2016-03-14 14:14:16 -0400 | [diff] [blame] | 35 | CFX_StackTemplate<FDE_CANVASITEM> m_CanvasStack; |
| 36 | }; |
| 37 | |
| 38 | #endif // XFA_FDE_FDE_ITERATOR_H_ |