Home | History | Annotate | Download | only in fde
      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_utils.h"
     12 
     13 struct FDE_CANVASITEM {
     14   IFDE_CanvasSet* pCanvas;
     15   FDE_TEXTEDITPIECE* hCanvas;
     16   FX_POSITION hPos;
     17 };
     18 
     19 class CFDE_VisualSetIterator {
     20  public:
     21   CFDE_VisualSetIterator();
     22   ~CFDE_VisualSetIterator();
     23 
     24   bool AttachCanvas(IFDE_CanvasSet* pCanvas);
     25   bool FilterObjects(uint32_t dwObjects = 0xFFFFFFFF);
     26 
     27   void Reset();
     28   FDE_TEXTEDITPIECE* GetNext(IFDE_VisualSet*& pVisualSet,
     29                              FDE_TEXTEDITPIECE** phCanvasObj = nullptr,
     30                              IFDE_CanvasSet** ppCanvasSet = nullptr);
     31 
     32  protected:
     33   uint32_t m_dwFilter;
     34   CFX_StackTemplate<FDE_CANVASITEM> m_CanvasStack;
     35 };
     36 
     37 #endif  // XFA_FDE_FDE_ITERATOR_H_
     38