| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef _AUTOREFLOW_H | 7 #ifndef _AUTOREFLOW_H |
| 8 #define _AUTOREFLOW_H | 8 #define _AUTOREFLOW_H |
| 9 #include "../../include/reflow/reflowengine.h" | 9 #include "../../include/reflow/reflowengine.h" |
| 10 #include "reflowedpage.h" | 10 #include "reflowedpage.h" |
| 11 class CPDF_AutoReflowElement; | 11 class CPDF_AutoReflowElement; |
| 12 class CPDF_AutoReflowLayoutProvider; | 12 class CPDF_AutoReflowLayoutProvider; |
| 13 typedef CFX_ArrayTemplate<CPDF_AutoReflowElement*> CAR_ElmPtrArray; | 13 typedef CFX_ArrayTemplate<CPDF_AutoReflowElement*> CAR_ElmPtrArray; |
| 14 typedef CFX_ArrayTemplate<CPDF_PageObject*> CAR_ObjPtrArray; | 14 typedef CFX_ArrayTemplate<CPDF_PageObject*> CAR_ObjPtrArray; |
| 15 class CRF_CELL : public CFX_Object | 15 class CRF_CELL |
| 16 { | 16 { |
| 17 public: | 17 public: |
| 18 CRF_CELL() { }; | 18 CRF_CELL() { }; |
| 19 ~CRF_CELL() { }; | 19 ~CRF_CELL() { }; |
| 20 CFX_PtrList m_ObjList; | 20 CFX_PtrList m_ObjList; |
| 21 int m_CellWritingMode; | 21 int m_CellWritingMode; |
| 22 FX_RECT m_BBox; | 22 FX_RECT m_BBox; |
| 23 }; | 23 }; |
| 24 class CPDF_AutoReflowElement : public IPDF_LayoutElement, public CFX_Object | 24 class CPDF_AutoReflowElement : public IPDF_LayoutElement |
| 25 { | 25 { |
| 26 public: | 26 public: |
| 27 CPDF_AutoReflowElement(LayoutType layoutType = LayoutUnknown , CPDF_AutoRefl
owElement* pParent = NULL) ; | 27 CPDF_AutoReflowElement(LayoutType layoutType = LayoutUnknown , CPDF_AutoRefl
owElement* pParent = NULL) ; |
| 28 ~CPDF_AutoReflowElement(); | 28 ~CPDF_AutoReflowElement(); |
| 29 LayoutType GetType() | 29 LayoutType GetType() |
| 30 { | 30 { |
| 31 return m_ElmType; | 31 return m_ElmType; |
| 32 } | 32 } |
| 33 void GetRect(CFX_FloatRect& rcRect) {}; | 33 void GetRect(CFX_FloatRect& rcRect) {}; |
| 34 | 34 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 61 CPDF_AutoReflowElement* m_pParentElm; | 61 CPDF_AutoReflowElement* m_pParentElm; |
| 62 LayoutType m_ElmType; | 62 LayoutType m_ElmType; |
| 63 CAR_ElmPtrArray m_ChildArray; | 63 CAR_ElmPtrArray m_ChildArray; |
| 64 CAR_ObjPtrArray m_ObjArray; | 64 CAR_ObjPtrArray m_ObjArray; |
| 65 FX_FLOAT m_SpaceBefore; | 65 FX_FLOAT m_SpaceBefore; |
| 66 }; | 66 }; |
| 67 #define AUTOREFLOW_STEP_GENERATELINE 1 | 67 #define AUTOREFLOW_STEP_GENERATELINE 1 |
| 68 #define AUTOREFLOW_STEP_GENERATEParagraph 2 | 68 #define AUTOREFLOW_STEP_GENERATEParagraph 2 |
| 69 #define AUTOREFLOW_STEP_CREATEELEMENT 3 | 69 #define AUTOREFLOW_STEP_CREATEELEMENT 3 |
| 70 #define AUTOREFLOW_STEP_REMOVEDATA 4 | 70 #define AUTOREFLOW_STEP_REMOVEDATA 4 |
| 71 class CPDF_AutoReflowLayoutProvider : public IPDF_LayoutProvider, public CFX_Obj
ect | 71 class CPDF_AutoReflowLayoutProvider : public IPDF_LayoutProvider |
| 72 { | 72 { |
| 73 public: | 73 public: |
| 74 CPDF_AutoReflowLayoutProvider(CPDF_PageObjects* pPage, FX_BOOL bReadOrder); | 74 CPDF_AutoReflowLayoutProvider(CPDF_PageObjects* pPage, FX_BOOL bReadOrder); |
| 75 ~CPDF_AutoReflowLayoutProvider(); | 75 ~CPDF_AutoReflowLayoutProvider(); |
| 76 void SetLayoutProviderStyle(LAYOUTPROVIDER_STYLE Style) | 76 void SetLayoutProviderStyle(LAYOUTPROVIDER_STYLE Style) |
| 77 { | 77 { |
| 78 m_Style = Style; | 78 m_Style = Style; |
| 79 } | 79 } |
| 80 LayoutStatus StartLoad(IFX_Pause* pPause = NULL); | 80 LayoutStatus StartLoad(IFX_Pause* pPause = NULL); |
| 81 LayoutStatus Continue(); | 81 LayoutStatus Continue(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 CPDF_PageObject* m_pPreObj; | 113 CPDF_PageObject* m_pPreObj; |
| 114 LayoutStatus m_Status; | 114 LayoutStatus m_Status; |
| 115 int m_WritingMode; | 115 int m_WritingMode; |
| 116 CFX_PtrArray m_CellArray; | 116 CFX_PtrArray m_CellArray; |
| 117 FX_BOOL m_bReadOrder; | 117 FX_BOOL m_bReadOrder; |
| 118 LAYOUTPROVIDER_STYLE m_Style; | 118 LAYOUTPROVIDER_STYLE m_Style; |
| 119 CFX_PtrArray m_cellArray; | 119 CFX_PtrArray m_cellArray; |
| 120 int m_Step; | 120 int m_Step; |
| 121 }; | 121 }; |
| 122 #endif | 122 #endif |
| OLD | NEW |