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_FXFA_CXFA_FFTEXT_H_
8 #define XFA_FXFA_CXFA_FFTEXT_H_
9 
10 #include "xfa/fxfa/cxfa_ffwidget.h"
11 
12 class CXFA_FFText final : public CXFA_FFWidget {
13  public:
14   explicit CXFA_FFText(CXFA_Node* pNode);
15   ~CXFA_FFText() override;
16 
17   // CXFA_FFWidget
18   bool AcceptsFocusOnButtonDown(uint32_t dwFlags,
19                                 const CFX_PointF& point,
20                                 FWL_MouseCommand command) override;
21   bool OnLButtonDown(uint32_t dwFlags, const CFX_PointF& point) override;
22   bool OnLButtonUp(uint32_t dwFlags, const CFX_PointF& point) override;
23   bool OnMouseMove(uint32_t dwFlags, const CFX_PointF& point) override;
24   FWL_WidgetHit HitTest(const CFX_PointF& point) override;
25   void RenderWidget(CXFA_Graphics* pGS,
26                     const CFX_Matrix& matrix,
27                     HighlightOption highlight) override;
28   bool IsLoaded() override;
29   bool PerformLayout() override;
30 
31  private:
32   const wchar_t* GetLinkURLAtPoint(const CFX_PointF& point);
33 };
34 
35 #endif  // XFA_FXFA_CXFA_FFTEXT_H_
36