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_FFSIGNATURE_H_ 8 #define XFA_FXFA_CXFA_FFSIGNATURE_H_ 9 10 #include "xfa/fxfa/cxfa_fffield.h" 11 12 class CXFA_FFSignature final : public CXFA_FFField { 13 public: 14 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED; 15 ~CXFA_FFSignature() override; 16 17 // CXFA_FFField 18 void RenderWidget(CFGAS_GEGraphics* pGS, 19 const CFX_Matrix& matrix, 20 HighlightOption highlight) override; 21 bool LoadWidget() override; 22 bool AcceptsFocusOnButtonDown( 23 Mask<XFA_FWL_KeyFlag> dwFlags, 24 const CFX_PointF& point, 25 CFWL_MessageMouse::MouseCommand command) override; 26 bool OnMouseEnter() override; 27 bool OnMouseExit() override; 28 bool OnLButtonDown(Mask<XFA_FWL_KeyFlag> dwFlags, 29 const CFX_PointF& point) override; 30 bool OnLButtonUp(Mask<XFA_FWL_KeyFlag> dwFlags, 31 const CFX_PointF& point) override; 32 bool OnLButtonDblClk(Mask<XFA_FWL_KeyFlag> dwFlags, 33 const CFX_PointF& point) override; 34 bool OnMouseMove(Mask<XFA_FWL_KeyFlag> dwFlags, 35 const CFX_PointF& point) override; 36 bool OnMouseWheel(Mask<XFA_FWL_KeyFlag> dwFlags, 37 const CFX_PointF& point, 38 const CFX_Vector& delta) override; 39 bool OnRButtonDown(Mask<XFA_FWL_KeyFlag> dwFlags, 40 const CFX_PointF& point) override; 41 bool OnRButtonUp(Mask<XFA_FWL_KeyFlag> dwFlags, 42 const CFX_PointF& point) override; 43 bool OnRButtonDblClk(Mask<XFA_FWL_KeyFlag> dwFlags, 44 const CFX_PointF& point) override; 45 bool OnKeyDown(XFA_FWL_VKEYCODE dwKeyCode, 46 Mask<XFA_FWL_KeyFlag> dwFlags) override; 47 bool OnChar(uint32_t dwChar, Mask<XFA_FWL_KeyFlag> dwFlags) override; 48 FWL_WidgetHit HitTest(const CFX_PointF& point) override; 49 FormFieldType GetFormFieldType() override; 50 51 private: 52 explicit CXFA_FFSignature(CXFA_Node* pNode); 53 }; 54 55 #endif // XFA_FXFA_CXFA_FFSIGNATURE_H_ 56