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 "xfa/fde/css/fde_css.h" | 10 #include "xfa/fde/css/fde_css.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 FX_BOOL IsLoaded() const { return m_pieceLines.GetSize() > 0; } | 334 FX_BOOL IsLoaded() const { return m_pieceLines.GetSize() > 0; } |
335 void Unload(); | 335 void Unload(); |
336 const CXFA_PieceLineArray* GetPieceLines(); | 336 const CXFA_PieceLineArray* GetPieceLines(); |
337 | 337 |
338 FX_BOOL m_bHasBlock; | 338 FX_BOOL m_bHasBlock; |
339 CFX_Int32Array m_Blocks; | 339 CFX_Int32Array m_Blocks; |
340 | 340 |
341 private: | 341 private: |
342 void GetTextDataNode(); | 342 void GetTextDataNode(); |
343 CFDE_XMLNode* GetXMLContainerNode(); | 343 CFDE_XMLNode* GetXMLContainerNode(); |
344 IFX_RTFBreak* CreateBreak(FX_BOOL bDefault); | 344 CFX_RTFBreak* CreateBreak(FX_BOOL bDefault); |
345 void InitBreak(FX_FLOAT fLineWidth); | 345 void InitBreak(FX_FLOAT fLineWidth); |
346 void InitBreak(IFDE_CSSComputedStyle* pStyle, | 346 void InitBreak(IFDE_CSSComputedStyle* pStyle, |
347 FDE_CSSDISPLAY eDisplay, | 347 FDE_CSSDISPLAY eDisplay, |
348 FX_FLOAT fLineWidth, | 348 FX_FLOAT fLineWidth, |
349 CFDE_XMLNode* pXMLNode, | 349 CFDE_XMLNode* pXMLNode, |
350 IFDE_CSSComputedStyle* pParentStyle = NULL); | 350 IFDE_CSSComputedStyle* pParentStyle = NULL); |
351 FX_BOOL Loader(const CFX_SizeF& szText, | 351 FX_BOOL Loader(const CFX_SizeF& szText, |
352 FX_FLOAT& fLinePos, | 352 FX_FLOAT& fLinePos, |
353 FX_BOOL bSavePieces = TRUE); | 353 FX_BOOL bSavePieces = TRUE); |
354 void LoadText(CXFA_Node* pNode, | 354 void LoadText(CXFA_Node* pNode, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 FX_BOOL bCharCode = FALSE); | 393 FX_BOOL bCharCode = FALSE); |
394 FX_BOOL ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr); | 394 FX_BOOL ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr); |
395 void DoTabstops(IFDE_CSSComputedStyle* pStyle, CXFA_PieceLine* pPieceLine); | 395 void DoTabstops(IFDE_CSSComputedStyle* pStyle, CXFA_PieceLine* pPieceLine); |
396 FX_BOOL Layout(int32_t iBlock); | 396 FX_BOOL Layout(int32_t iBlock); |
397 int32_t CountBlocks() const; | 397 int32_t CountBlocks() const; |
398 | 398 |
399 CXFA_TextProvider* m_pTextProvider; | 399 CXFA_TextProvider* m_pTextProvider; |
400 CXFA_Node* m_pTextDataNode; | 400 CXFA_Node* m_pTextDataNode; |
401 FX_BOOL m_bRichText; | 401 FX_BOOL m_bRichText; |
402 IFX_MEMAllocator* m_pAllocator; | 402 IFX_MEMAllocator* m_pAllocator; |
403 IFX_RTFBreak* m_pBreak; | 403 CFX_RTFBreak* m_pBreak; |
404 CXFA_LoaderContext* m_pLoader; | 404 CXFA_LoaderContext* m_pLoader; |
405 int32_t m_iLines; | 405 int32_t m_iLines; |
406 FX_FLOAT m_fMaxWidth; | 406 FX_FLOAT m_fMaxWidth; |
407 CXFA_TextParser m_textParser; | 407 CXFA_TextParser m_textParser; |
408 CXFA_PieceLineArray m_pieceLines; | 408 CXFA_PieceLineArray m_pieceLines; |
409 CXFA_TextTabstopsContext* m_pTabstopContext; | 409 CXFA_TextTabstopsContext* m_pTabstopContext; |
410 FX_BOOL m_bBlockContinue; | 410 FX_BOOL m_bBlockContinue; |
411 }; | 411 }; |
412 | 412 |
413 #endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ | 413 #endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ |
OLD | NEW |