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