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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 IFDE_CSSComputedStyle* ComputeStyle(CFDE_XMLNode* pXMLNode, | 85 IFDE_CSSComputedStyle* ComputeStyle(CFDE_XMLNode* pXMLNode, |
86 IFDE_CSSComputedStyle* pParentStyle); | 86 IFDE_CSSComputedStyle* pParentStyle); |
87 bool IsParsed() const { return !!m_pAllocator; } | 87 bool IsParsed() const { return !!m_pAllocator; } |
88 | 88 |
89 int32_t GetVAlign(CXFA_TextProvider* pTextProvider) const; | 89 int32_t GetVAlign(CXFA_TextProvider* pTextProvider) const; |
90 FX_FLOAT GetTabInterval(IFDE_CSSComputedStyle* pStyle) const; | 90 FX_FLOAT GetTabInterval(IFDE_CSSComputedStyle* pStyle) const; |
91 int32_t CountTabs(IFDE_CSSComputedStyle* pStyle) const; | 91 int32_t CountTabs(IFDE_CSSComputedStyle* pStyle) const; |
92 bool IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const; | 92 bool IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const; |
93 bool GetTabstops(IFDE_CSSComputedStyle* pStyle, | 93 bool GetTabstops(IFDE_CSSComputedStyle* pStyle, |
94 CXFA_TextTabstopsContext* pTabstopContext); | 94 CXFA_TextTabstopsContext* pTabstopContext); |
95 CFGAS_GEFont* GetFont(CXFA_TextProvider* pTextProvider, | 95 CFX_RetainPtr<CFGAS_GEFont> GetFont(CXFA_TextProvider* pTextProvider, |
96 IFDE_CSSComputedStyle* pStyle) const; | 96 IFDE_CSSComputedStyle* pStyle) const; |
97 FX_FLOAT GetFontSize(CXFA_TextProvider* pTextProvider, | 97 FX_FLOAT GetFontSize(CXFA_TextProvider* pTextProvider, |
98 IFDE_CSSComputedStyle* pStyle) const; | 98 IFDE_CSSComputedStyle* pStyle) const; |
99 int32_t GetHorScale(CXFA_TextProvider* pTextProvider, | 99 int32_t GetHorScale(CXFA_TextProvider* pTextProvider, |
100 IFDE_CSSComputedStyle* pStyle, | 100 IFDE_CSSComputedStyle* pStyle, |
101 CFDE_XMLNode* pXMLNode) const; | 101 CFDE_XMLNode* pXMLNode) const; |
102 int32_t GetVerScale(CXFA_TextProvider* pTextProvider, | 102 int32_t GetVerScale(CXFA_TextProvider* pTextProvider, |
103 IFDE_CSSComputedStyle* pStyle) const; | 103 IFDE_CSSComputedStyle* pStyle) const; |
104 void GetUnderline(CXFA_TextProvider* pTextProvider, | 104 void GetUnderline(CXFA_TextProvider* pTextProvider, |
105 IFDE_CSSComputedStyle* pStyle, | 105 IFDE_CSSComputedStyle* pStyle, |
106 int32_t& iUnderline, | 106 int32_t& iUnderline, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 FX_WCHAR* pszText; | 205 FX_WCHAR* pszText; |
206 int32_t iChars; | 206 int32_t iChars; |
207 int32_t* pWidths; | 207 int32_t* pWidths; |
208 int32_t iHorScale; | 208 int32_t iHorScale; |
209 int32_t iVerScale; | 209 int32_t iVerScale; |
210 int32_t iBidiLevel; | 210 int32_t iBidiLevel; |
211 int32_t iUnderline; | 211 int32_t iUnderline; |
212 int32_t iPeriod; | 212 int32_t iPeriod; |
213 int32_t iLineThrough; | 213 int32_t iLineThrough; |
214 CFGAS_GEFont* pFont; | 214 CFX_RetainPtr<CFGAS_GEFont> pFont; |
215 FX_ARGB dwColor; | 215 FX_ARGB dwColor; |
216 FX_FLOAT fFontSize; | 216 FX_FLOAT fFontSize; |
217 CFX_RectF rtPiece; | 217 CFX_RectF rtPiece; |
218 CXFA_LinkUserData* pLinkData; | 218 CXFA_LinkUserData* pLinkData; |
219 }; | 219 }; |
220 typedef CFX_ArrayTemplate<XFA_TextPiece*> CXFA_PieceArray; | 220 typedef CFX_ArrayTemplate<XFA_TextPiece*> CXFA_PieceArray; |
221 | 221 |
222 class CXFA_PieceLine : public CFX_Target { | 222 class CXFA_PieceLine : public CFX_Target { |
223 public: | 223 public: |
224 CXFA_PieceLine(); | 224 CXFA_PieceLine(); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 std::unique_ptr<CXFA_LoaderContext> m_pLoader; | 346 std::unique_ptr<CXFA_LoaderContext> m_pLoader; |
347 int32_t m_iLines; | 347 int32_t m_iLines; |
348 FX_FLOAT m_fMaxWidth; | 348 FX_FLOAT m_fMaxWidth; |
349 CXFA_TextParser m_textParser; | 349 CXFA_TextParser m_textParser; |
350 CXFA_PieceLineArray m_pieceLines; | 350 CXFA_PieceLineArray m_pieceLines; |
351 std::unique_ptr<CXFA_TextTabstopsContext> m_pTabstopContext; | 351 std::unique_ptr<CXFA_TextTabstopsContext> m_pTabstopContext; |
352 bool m_bBlockContinue; | 352 bool m_bBlockContinue; |
353 }; | 353 }; |
354 | 354 |
355 #endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ | 355 #endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ |
OLD | NEW |