• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_FXFA_LAYOUT_CXFA_VIEWLAYOUTITEM_H_
8 #define XFA_FXFA_LAYOUT_CXFA_VIEWLAYOUTITEM_H_
9 
10 #include <memory>
11 
12 #include "xfa/fxfa/layout/cxfa_layoutitem.h"
13 
14 class CXFA_FFPageView;
15 
16 class CXFA_ViewLayoutItem : public CXFA_LayoutItem {
17  public:
18   template <typename T, typename... Args>
19   friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
20 
21   ~CXFA_ViewLayoutItem() override;
22 
GetPageView()23   CXFA_FFPageView* GetPageView() const { return m_pFFPageView.get(); }
24   CXFA_LayoutProcessor* GetLayout() const;
25   int32_t GetPageIndex() const;
26   CFX_SizeF GetPageSize() const;
27   CXFA_Node* GetMasterPage() const;
28 
29   UnownedPtr<CXFA_Node> m_pOldSubform;
30 
31  private:
32   CXFA_ViewLayoutItem(CXFA_Node* pNode,
33                       std::unique_ptr<CXFA_FFPageView> pPageView);
34 
35   std::unique_ptr<CXFA_FFPageView> const m_pFFPageView;
36 };
37 
38 #endif  // XFA_FXFA_LAYOUT_CXFA_VIEWLAYOUTITEM_H_
39