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_FXFA_CXFA_TEXTTABSTOPSCONTEXT_H_ 8 #define XFA_FXFA_CXFA_TEXTTABSTOPSCONTEXT_H_ 9 10 #include <stdint.h> 11 12 #include <vector> 13 14 struct XFA_TABSTOPS { 15 uint32_t dwAlign; 16 float fTabstops; 17 18 bool operator<(const XFA_TABSTOPS& that) const { 19 return fTabstops < that.fTabstops; 20 } 21 }; 22 23 class CXFA_TextTabstopsContext { 24 public: 25 CXFA_TextTabstopsContext(); 26 ~CXFA_TextTabstopsContext(); 27 28 void Append(uint32_t dwAlign, float fTabstops); 29 void RemoveAll(); 30 void Reset(); 31 32 int32_t m_iTabIndex; 33 bool m_bTabstops; 34 float m_fTabWidth; 35 float m_fLeft; 36 std::vector<XFA_TABSTOPS> m_tabstops; 37 }; 38 39 #endif // XFA_FXFA_CXFA_TEXTTABSTOPSCONTEXT_H_ 40