1 // Copyright 2016 The PDFium Authors 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_FXFA_LAYOUT_CXFA_VIEWLAYOUTITEM_H_ 8 #define XFA_FXFA_LAYOUT_CXFA_VIEWLAYOUTITEM_H_ 9 10 #include "core/fxcrt/fx_coordinates.h" 11 #include "v8/include/cppgc/member.h" 12 #include "v8/include/cppgc/visitor.h" 13 #include "xfa/fxfa/layout/cxfa_layoutitem.h" 14 15 class CXFA_FFPageView; 16 class CXFA_LayoutProcessor; 17 18 class CXFA_ViewLayoutItem final : public CXFA_LayoutItem { 19 public: 20 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED; 21 ~CXFA_ViewLayoutItem() override; 22 23 void Trace(cppgc::Visitor* visitor) const override; 24 GetPageView()25 CXFA_FFPageView* GetPageView() const { return m_pFFPageView; } 26 CXFA_LayoutProcessor* GetLayout() const; 27 int32_t GetPageIndex() const; 28 CFX_SizeF GetPageSize() const; 29 CXFA_Node* GetMasterPage() const; GetOldSubform()30 CXFA_Node* GetOldSubform() const { return m_pOldSubform; } 31 void SetOldSubform(CXFA_Node* pSubform); 32 33 private: 34 CXFA_ViewLayoutItem(CXFA_Node* pNode, CXFA_FFPageView* pPageView); 35 36 cppgc::Member<CXFA_FFPageView> const m_pFFPageView; 37 cppgc::Member<CXFA_Node> m_pOldSubform; 38 }; 39 40 #endif // XFA_FXFA_LAYOUT_CXFA_VIEWLAYOUTITEM_H_ 41