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