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