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 XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ | 7 #ifndef XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ |
8 #define XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ | 8 #define XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 public: | 80 public: |
81 CXFA_TextParser() : m_pAllocator(NULL), m_pSelector(NULL), m_pUASheet(NULL) {} | 81 CXFA_TextParser() : m_pAllocator(NULL), m_pSelector(NULL), m_pUASheet(NULL) {} |
82 virtual ~CXFA_TextParser(); | 82 virtual ~CXFA_TextParser(); |
83 void Reset(); | 83 void Reset(); |
84 void DoParse(CFDE_XMLNode* pXMLContainer, CXFA_TextProvider* pTextProvider); | 84 void DoParse(CFDE_XMLNode* pXMLContainer, CXFA_TextProvider* pTextProvider); |
85 IFDE_CSSComputedStyle* CreateRootStyle(CXFA_TextProvider* pTextProvider); | 85 IFDE_CSSComputedStyle* CreateRootStyle(CXFA_TextProvider* pTextProvider); |
86 IFDE_CSSComputedStyle* ComputeStyle(CFDE_XMLNode* pXMLNode, | 86 IFDE_CSSComputedStyle* ComputeStyle(CFDE_XMLNode* pXMLNode, |
87 IFDE_CSSComputedStyle* pParentStyle); | 87 IFDE_CSSComputedStyle* pParentStyle); |
88 FX_BOOL IsParsed() const { return m_pAllocator != NULL; } | 88 FX_BOOL IsParsed() const { return m_pAllocator != NULL; } |
89 | 89 |
90 int32_t GetVAlgin(CXFA_TextProvider* pTextProvider) const; | 90 int32_t GetVAlign(CXFA_TextProvider* pTextProvider) const; |
91 FX_FLOAT GetTabInterval(IFDE_CSSComputedStyle* pStyle) const; | 91 FX_FLOAT GetTabInterval(IFDE_CSSComputedStyle* pStyle) const; |
92 int32_t CountTabs(IFDE_CSSComputedStyle* pStyle) const; | 92 int32_t CountTabs(IFDE_CSSComputedStyle* pStyle) const; |
93 FX_BOOL IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const; | 93 FX_BOOL IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const; |
94 FX_BOOL GetTabstops(IFDE_CSSComputedStyle* pStyle, | 94 FX_BOOL GetTabstops(IFDE_CSSComputedStyle* pStyle, |
95 CXFA_TextTabstopsContext* pTabstopContext); | 95 CXFA_TextTabstopsContext* pTabstopContext); |
96 IFX_Font* GetFont(CXFA_TextProvider* pTextProvider, | 96 IFX_Font* GetFont(CXFA_TextProvider* pTextProvider, |
97 IFDE_CSSComputedStyle* pStyle) const; | 97 IFDE_CSSComputedStyle* pStyle) const; |
98 FX_FLOAT GetFontSize(CXFA_TextProvider* pTextProvider, | 98 FX_FLOAT GetFontSize(CXFA_TextProvider* pTextProvider, |
99 IFDE_CSSComputedStyle* pStyle) const; | 99 IFDE_CSSComputedStyle* pStyle) const; |
100 int32_t GetHorScale(CXFA_TextProvider* pTextProvider, | 100 int32_t GetHorScale(CXFA_TextProvider* pTextProvider, |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 CXFA_LoaderContext* m_pLoader; | 408 CXFA_LoaderContext* m_pLoader; |
409 int32_t m_iLines; | 409 int32_t m_iLines; |
410 FX_FLOAT m_fMaxWidth; | 410 FX_FLOAT m_fMaxWidth; |
411 CXFA_TextParser m_textParser; | 411 CXFA_TextParser m_textParser; |
412 CXFA_PieceLineArray m_pieceLines; | 412 CXFA_PieceLineArray m_pieceLines; |
413 CXFA_TextTabstopsContext* m_pTabstopContext; | 413 CXFA_TextTabstopsContext* m_pTabstopContext; |
414 FX_BOOL m_bBlockContinue; | 414 FX_BOOL m_bBlockContinue; |
415 }; | 415 }; |
416 | 416 |
417 #endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ | 417 #endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ |
OLD | NEW |