1 // Copyright 2014 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 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 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED; 15 ~CXFA_FFText() override; 16 17 // CXFA_FFWidget 18 bool AcceptsFocusOnButtonDown( 19 Mask<XFA_FWL_KeyFlag> dwFlags, 20 const CFX_PointF& point, 21 CFWL_MessageMouse::MouseCommand command) override; 22 bool OnLButtonDown(Mask<XFA_FWL_KeyFlag> dwFlags, 23 const CFX_PointF& point) override; 24 bool OnLButtonUp(Mask<XFA_FWL_KeyFlag> dwFlags, 25 const CFX_PointF& point) override; 26 bool OnMouseMove(Mask<XFA_FWL_KeyFlag> dwFlags, 27 const CFX_PointF& point) override; 28 FWL_WidgetHit HitTest(const CFX_PointF& point) override; 29 void RenderWidget(CFGAS_GEGraphics* pGS, 30 const CFX_Matrix& matrix, 31 HighlightOption highlight) override; 32 bool IsLoaded() override; 33 bool PerformLayout() override; 34 35 private: 36 explicit CXFA_FFText(CXFA_Node* pNode); 37 38 // Returns empty string when no link is present. 39 WideString GetLinkURLAtPoint(const CFX_PointF& point); 40 }; 41 42 #endif // XFA_FXFA_CXFA_FFTEXT_H_ 43