Dan Sinclair | 1f5d498 | 2017-01-10 16:37:32 -0500 | [diff] [blame^] | 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_APP_CXFA_TEXTPARSECONTEXT_H_ |
| 8 | #define XFA_FXFA_APP_CXFA_TEXTPARSECONTEXT_H_ |
| 9 | |
| 10 | #include "xfa/fde/css/fde_css.h" |
| 11 | #include "xfa/fgas/crt/fgas_memory.h" |
| 12 | |
| 13 | class CFDE_CSSDeclaration; |
| 14 | class IFDE_CSSComputedStyle; |
| 15 | |
| 16 | class CXFA_TextParseContext : public CFX_Target { |
| 17 | public: |
| 18 | CXFA_TextParseContext(); |
| 19 | ~CXFA_TextParseContext() override; |
| 20 | |
| 21 | void SetDisplay(FDE_CSSDISPLAY eDisplay) { m_eDisplay = eDisplay; } |
| 22 | FDE_CSSDISPLAY GetDisplay() const { return m_eDisplay; } |
| 23 | |
| 24 | void SetDecls(const CFDE_CSSDeclaration** ppDeclArray, int32_t iDeclCount); |
| 25 | const CFDE_CSSDeclaration** GetDecls() { |
| 26 | return const_cast<const CFDE_CSSDeclaration**>(m_ppMatchedDecls); |
| 27 | } |
| 28 | uint32_t CountDecls() const { return m_dwMatchedDecls; } |
| 29 | |
| 30 | IFDE_CSSComputedStyle* m_pParentStyle; |
| 31 | |
| 32 | protected: |
| 33 | CFDE_CSSDeclaration** m_ppMatchedDecls; |
| 34 | uint32_t m_dwMatchedDecls; |
| 35 | FDE_CSSDISPLAY m_eDisplay; |
| 36 | }; |
| 37 | |
| 38 | #endif // XFA_FXFA_APP_CXFA_TEXTPARSECONTEXT_H_ |