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" |
11 #include "xfa/fde/fde_brush.h" | |
12 #include "xfa/fde/fde_renderdevice.h" | 11 #include "xfa/fde/fde_renderdevice.h" |
13 #include "xfa/fgas/layout/fgas_rtfbreak.h" | 12 #include "xfa/fgas/layout/fgas_rtfbreak.h" |
14 #include "xfa/fxfa/include/xfa_ffdoc.h" | 13 #include "xfa/fxfa/include/xfa_ffdoc.h" |
15 #include "xfa/fxfa/parser/xfa_object.h" | 14 #include "xfa/fxfa/parser/xfa_object.h" |
16 | 15 |
17 #define XFA_LOADERCNTXTFLG_FILTERSPACE 0x001 | 16 #define XFA_LOADERCNTXTFLG_FILTERSPACE 0x001 |
18 | 17 |
19 class CXFA_Para; | 18 class CXFA_Para; |
20 class CXFA_Font; | 19 class CXFA_Font; |
21 class CXFA_TextProvider; | 20 class CXFA_TextProvider; |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 FX_BOOL bSavePieces); | 370 FX_BOOL bSavePieces); |
372 void AppendTextLine(uint32_t dwStatus, | 371 void AppendTextLine(uint32_t dwStatus, |
373 FX_FLOAT& fLinePos, | 372 FX_FLOAT& fLinePos, |
374 FX_BOOL bSavePieces, | 373 FX_BOOL bSavePieces, |
375 FX_BOOL bEndBreak = FALSE); | 374 FX_BOOL bEndBreak = FALSE); |
376 void EndBreak(uint32_t dwStatus, FX_FLOAT& fLinePos, FX_BOOL bDefault); | 375 void EndBreak(uint32_t dwStatus, FX_FLOAT& fLinePos, FX_BOOL bDefault); |
377 FX_BOOL IsEnd(FX_BOOL bSavePieces); | 376 FX_BOOL IsEnd(FX_BOOL bSavePieces); |
378 void ProcessText(CFX_WideString& wsText); | 377 void ProcessText(CFX_WideString& wsText); |
379 void UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom); | 378 void UpdateAlign(FX_FLOAT fHeight, FX_FLOAT fBottom); |
380 void RenderString(IFDE_RenderDevice* pDevice, | 379 void RenderString(IFDE_RenderDevice* pDevice, |
381 IFDE_SolidBrush* pBrush, | 380 CFDE_Brush* pBrush, |
382 CXFA_PieceLine* pPieceLine, | 381 CXFA_PieceLine* pPieceLine, |
383 int32_t iPiece, | 382 int32_t iPiece, |
384 FXTEXT_CHARPOS* pCharPos, | 383 FXTEXT_CHARPOS* pCharPos, |
385 const CFX_Matrix& tmDoc2Device); | 384 const CFX_Matrix& tmDoc2Device); |
386 void RenderPath(IFDE_RenderDevice* pDevice, | 385 void RenderPath(IFDE_RenderDevice* pDevice, |
387 IFDE_Pen* pPen, | 386 CFDE_Pen* pPen, |
388 CXFA_PieceLine* pPieceLine, | 387 CXFA_PieceLine* pPieceLine, |
389 int32_t iPiece, | 388 int32_t iPiece, |
390 FXTEXT_CHARPOS* pCharPos, | 389 FXTEXT_CHARPOS* pCharPos, |
391 const CFX_Matrix& tmDoc2Device); | 390 const CFX_Matrix& tmDoc2Device); |
392 int32_t GetDisplayPos(const XFA_TextPiece* pPiece, | 391 int32_t GetDisplayPos(const XFA_TextPiece* pPiece, |
393 FXTEXT_CHARPOS* pCharPos, | 392 FXTEXT_CHARPOS* pCharPos, |
394 FX_BOOL bCharCode = FALSE); | 393 FX_BOOL bCharCode = FALSE); |
395 FX_BOOL ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr); | 394 FX_BOOL ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr); |
396 void DoTabstops(IFDE_CSSComputedStyle* pStyle, CXFA_PieceLine* pPieceLine); | 395 void DoTabstops(IFDE_CSSComputedStyle* pStyle, CXFA_PieceLine* pPieceLine); |
397 FX_BOOL Layout(int32_t iBlock); | 396 FX_BOOL Layout(int32_t iBlock); |
398 int32_t CountBlocks() const; | 397 int32_t CountBlocks() const; |
399 | 398 |
400 CXFA_TextProvider* m_pTextProvider; | 399 CXFA_TextProvider* m_pTextProvider; |
401 CXFA_Node* m_pTextDataNode; | 400 CXFA_Node* m_pTextDataNode; |
402 FX_BOOL m_bRichText; | 401 FX_BOOL m_bRichText; |
403 IFX_MEMAllocator* m_pAllocator; | 402 IFX_MEMAllocator* m_pAllocator; |
404 IFX_RTFBreak* m_pBreak; | 403 IFX_RTFBreak* m_pBreak; |
405 CXFA_LoaderContext* m_pLoader; | 404 CXFA_LoaderContext* m_pLoader; |
406 int32_t m_iLines; | 405 int32_t m_iLines; |
407 FX_FLOAT m_fMaxWidth; | 406 FX_FLOAT m_fMaxWidth; |
408 CXFA_TextParser m_textParser; | 407 CXFA_TextParser m_textParser; |
409 CXFA_PieceLineArray m_pieceLines; | 408 CXFA_PieceLineArray m_pieceLines; |
410 CXFA_TextTabstopsContext* m_pTabstopContext; | 409 CXFA_TextTabstopsContext* m_pTabstopContext; |
411 FX_BOOL m_bBlockContinue; | 410 FX_BOOL m_bBlockContinue; |
412 }; | 411 }; |
413 | 412 |
414 #endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ | 413 #endif // XFA_FXFA_APP_XFA_TEXTLAYOUT_H_ |
OLD | NEW |