• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef XFA_FGAS_LAYOUT_CFX_BREAKLINE_H_
8 #define XFA_FGAS_LAYOUT_CFX_BREAKLINE_H_
9 
10 #include <vector>
11 
12 #include "xfa/fgas/layout/cfx_breakpiece.h"
13 #include "xfa/fgas/layout/cfx_char.h"
14 
15 class CFX_BreakLine {
16  public:
17   CFX_BreakLine();
18   ~CFX_BreakLine();
19 
20   CFX_Char* GetChar(int32_t index);
21   int32_t GetLineEnd() const;
22 
23   void Clear();
24 
25   void IncrementArabicCharCount();
26   void DecrementArabicCharCount();
HasArabicChar()27   bool HasArabicChar() const { return m_iArabicChars > 0; }
28 
29   std::vector<CFX_Char> m_LineChars;
30   std::vector<CFX_BreakPiece> m_LinePieces;
31   int32_t m_iStart = 0;
32   int32_t m_iWidth = 0;
33 
34  private:
35   int32_t m_iArabicChars = 0;
36 };
37 
38 #endif  // XFA_FGAS_LAYOUT_CFX_BREAKLINE_H_
39