• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The PDFium Authors
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 FPDFSDK_FORMFILLER_CFFL_TEXTOBJECT_H_
8 #define FPDFSDK_FORMFILLER_CFFL_TEXTOBJECT_H_
9 
10 #include <memory>
11 
12 #include "fpdfsdk/formfiller/cffl_formfield.h"
13 
14 class CPDF_BAFontMap;
15 
16 // Class to implement common functionality for CFFL_FormField sub-classes with
17 // text fields.
18 class CFFL_TextObject : public CFFL_FormField {
19  public:
20   // CFFL_FormField:
21   CPWL_Wnd* ResetPWLWindow(const CPDFSDK_PageView* pPageView) override;
22   CPWL_Wnd* RestorePWLWindow(const CPDFSDK_PageView* pPageView) override;
23 
24  protected:
25   CFFL_TextObject(CFFL_InteractiveFormFiller* pFormFiller,
26                   CPDFSDK_Widget* pWidget);
27   ~CFFL_TextObject() override;
28 
29   CPDF_BAFontMap* GetOrCreateFontMap();
30 
31  private:
32   std::unique_ptr<CPDF_BAFontMap> m_pFontMap;
33 };
34 
35 #endif  // FPDFSDK_FORMFILLER_CFFL_TEXTOBJECT_H_
36