| OLD | NEW |
| (Empty) |
| 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_FXFA_PARSER_XFA_DOCUMENT_LAYOUT_IMP_H_ | |
| 8 #define XFA_FXFA_PARSER_XFA_DOCUMENT_LAYOUT_IMP_H_ | |
| 9 | |
| 10 #include "xfa/fxfa/parser/xfa_doclayout.h" | |
| 11 | |
| 12 class CXFA_ItemLayoutProcessor; | |
| 13 class CXFA_LayoutPageMgr; | |
| 14 class CXFA_ContainerLayoutItem; | |
| 15 | |
| 16 class CXFA_LayoutProcessor { | |
| 17 public: | |
| 18 CXFA_LayoutProcessor(CXFA_Document* pDocument); | |
| 19 ~CXFA_LayoutProcessor(); | |
| 20 | |
| 21 CXFA_Document* GetDocument() const; | |
| 22 int32_t StartLayout(FX_BOOL bForceRestart = FALSE); | |
| 23 int32_t DoLayout(IFX_Pause* pPause = nullptr); | |
| 24 FX_BOOL IncrementLayout(); | |
| 25 int32_t CountPages() const; | |
| 26 CXFA_ContainerLayoutItem* GetPage(int32_t index) const; | |
| 27 CXFA_LayoutItem* GetLayoutItem(CXFA_Node* pFormItem); | |
| 28 | |
| 29 void AddChangedContainer(CXFA_Node* pContainer); | |
| 30 void SetForceReLayout(FX_BOOL bForceRestart) { m_bNeeLayout = bForceRestart; } | |
| 31 CXFA_ContainerLayoutItem* GetRootLayoutItem() const; | |
| 32 CXFA_ItemLayoutProcessor* GetRootRootItemLayoutProcessor() { | |
| 33 return m_pRootItemLayoutProcessor; | |
| 34 } | |
| 35 CXFA_LayoutPageMgr* GetLayoutPageMgr() { return m_pLayoutPageMgr; } | |
| 36 | |
| 37 protected: | |
| 38 void ClearLayoutData(); | |
| 39 | |
| 40 FX_BOOL IsNeedLayout(); | |
| 41 | |
| 42 CXFA_Document* m_pDocument; | |
| 43 CXFA_ItemLayoutProcessor* m_pRootItemLayoutProcessor; | |
| 44 CXFA_LayoutPageMgr* m_pLayoutPageMgr; | |
| 45 CXFA_NodeArray m_rgChangedContainers; | |
| 46 uint32_t m_nProgressCounter; | |
| 47 FX_BOOL m_bNeeLayout; | |
| 48 }; | |
| 49 | |
| 50 #endif // XFA_FXFA_PARSER_XFA_DOCUMENT_LAYOUT_IMP_H_ | |
| OLD | NEW |