OLD | NEW |
(Empty) | |
| 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_PARSER_CXFA_LAYOUTITEM_H_ |
| 8 #define XFA_FXFA_PARSER_CXFA_LAYOUTITEM_H_ |
| 9 |
| 10 #include "xfa/fxfa/parser/xfa_document.h" |
| 11 |
| 12 class CXFA_ContainerLayoutItem; |
| 13 class CXFA_ContentLayoutItem; |
| 14 class CXFA_LayoutProcessor; |
| 15 |
| 16 class CXFA_LayoutItem { |
| 17 public: |
| 18 virtual ~CXFA_LayoutItem(); |
| 19 |
| 20 FX_BOOL IsContainerLayoutItem() const { return !m_bIsContentLayoutItem; } |
| 21 FX_BOOL IsContentLayoutItem() const { return m_bIsContentLayoutItem; } |
| 22 CXFA_ContainerLayoutItem* AsContainerLayoutItem(); |
| 23 CXFA_ContentLayoutItem* AsContentLayoutItem(); |
| 24 |
| 25 CXFA_ContainerLayoutItem* GetPage() const; |
| 26 CXFA_Node* GetFormNode() const; |
| 27 void GetRect(CFX_RectF& rtLayout, FX_BOOL bRelative = FALSE) const; |
| 28 int32_t GetIndex() const; |
| 29 int32_t GetCount() const; |
| 30 CXFA_LayoutItem* GetParent() const; |
| 31 const CXFA_LayoutItem* GetFirst() const; |
| 32 CXFA_LayoutItem* GetFirst(); |
| 33 const CXFA_LayoutItem* GetLast() const; |
| 34 CXFA_LayoutItem* GetLast(); |
| 35 CXFA_LayoutItem* GetPrev() const; |
| 36 CXFA_LayoutItem* GetNext() const; |
| 37 |
| 38 void AddChild(CXFA_LayoutItem* pChildItem); |
| 39 void AddHeadChild(CXFA_LayoutItem* pChildItem); |
| 40 void RemoveChild(CXFA_LayoutItem* pChildItem); |
| 41 void InsertChild(CXFA_LayoutItem* pBeforeItem, CXFA_LayoutItem* pChildItem); |
| 42 |
| 43 CXFA_Node* m_pFormNode; |
| 44 CXFA_LayoutItem* m_pParent; |
| 45 CXFA_LayoutItem* m_pNextSibling; |
| 46 CXFA_LayoutItem* m_pFirstChild; |
| 47 |
| 48 protected: |
| 49 CXFA_LayoutItem(CXFA_Node* pNode, FX_BOOL bIsContentLayoutItem); |
| 50 |
| 51 FX_BOOL m_bIsContentLayoutItem; |
| 52 }; |
| 53 |
| 54 #endif // XFA_FXFA_PARSER_CXFA_LAYOUTITEM_H_ |
OLD | NEW |