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_FFWIDGETACC_H_ | 7 #ifndef XFA_FXFA_APP_XFA_FFWIDGETACC_H_ |
8 #define XFA_FXFA_APP_XFA_FFWIDGETACC_H_ | 8 #define XFA_FXFA_APP_XFA_FFWIDGETACC_H_ |
9 | 9 |
10 #include "xfa/fxfa/app/xfa_textlayout.h" | 10 #include "xfa/fxfa/app/xfa_textlayout.h" |
11 | 11 |
12 enum XFA_TEXTPROVIDERTYPE { | 12 enum XFA_TEXTPROVIDERTYPE { |
13 XFA_TEXTPROVIDERTYPE_Text, | 13 XFA_TEXTPROVIDERTYPE_Text, |
14 XFA_TEXTPROVIDERTYPE_Datasets, | 14 XFA_TEXTPROVIDERTYPE_Datasets, |
15 XFA_TEXTPROVIDERTYPE_Caption, | 15 XFA_TEXTPROVIDERTYPE_Caption, |
16 XFA_TEXTPROVIDERTYPE_Rollover, | 16 XFA_TEXTPROVIDERTYPE_Rollover, |
17 XFA_TEXTPROVIDERTYPE_Down, | 17 XFA_TEXTPROVIDERTYPE_Down, |
18 }; | 18 }; |
19 | 19 |
20 class CXFA_TextProvider { | 20 class CXFA_TextProvider { |
21 public: | 21 public: |
22 CXFA_TextProvider(CXFA_WidgetAcc* pWidgetAcc, | 22 CXFA_TextProvider(CXFA_WidgetAcc* pWidgetAcc, |
23 XFA_TEXTPROVIDERTYPE eType, | 23 XFA_TEXTPROVIDERTYPE eType, |
24 CXFA_Node* pTextNode = nullptr) | 24 CXFA_Node* pTextNode = nullptr) |
25 : m_pWidgetAcc(pWidgetAcc), m_eType(eType), m_pTextNode(pTextNode) { | 25 : m_pWidgetAcc(pWidgetAcc), m_eType(eType), m_pTextNode(pTextNode) { |
26 ASSERT(m_pWidgetAcc); | 26 ASSERT(m_pWidgetAcc); |
27 } | 27 } |
28 ~CXFA_TextProvider() {} | 28 ~CXFA_TextProvider() {} |
29 | 29 |
30 CXFA_Node* GetTextNode(FX_BOOL& bRichText); | 30 CXFA_Node* GetTextNode(bool& bRichText); |
31 CXFA_Para GetParaNode(); | 31 CXFA_Para GetParaNode(); |
32 CXFA_Font GetFontNode(); | 32 CXFA_Font GetFontNode(); |
33 FX_BOOL IsCheckButtonAndAutoWidth(); | 33 bool IsCheckButtonAndAutoWidth(); |
34 CXFA_FFDoc* GetDocNode() { return m_pWidgetAcc->GetDoc(); } | 34 CXFA_FFDoc* GetDocNode() { return m_pWidgetAcc->GetDoc(); } |
35 FX_BOOL GetEmbbedObj(FX_BOOL bURI, | 35 bool GetEmbbedObj(bool bURI, |
36 FX_BOOL bRaw, | 36 bool bRaw, |
37 const CFX_WideString& wsAttr, | 37 const CFX_WideString& wsAttr, |
38 CFX_WideString& wsValue); | 38 CFX_WideString& wsValue); |
39 | 39 |
40 protected: | 40 protected: |
41 CXFA_WidgetAcc* m_pWidgetAcc; | 41 CXFA_WidgetAcc* m_pWidgetAcc; |
42 XFA_TEXTPROVIDERTYPE m_eType; | 42 XFA_TEXTPROVIDERTYPE m_eType; |
43 CXFA_Node* m_pTextNode; | 43 CXFA_Node* m_pTextNode; |
44 }; | 44 }; |
45 | 45 |
46 #endif // XFA_FXFA_APP_XFA_FFWIDGETACC_H_ | 46 #endif // XFA_FXFA_APP_XFA_FFWIDGETACC_H_ |
OLD | NEW |