• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_FFIMAGEEDIT_H_
8 #define XFA_FXFA_CXFA_FFIMAGEEDIT_H_
9 
10 #include "core/fxcrt/unowned_ptr.h"
11 #include "xfa/fxfa/cxfa_fffield.h"
12 
13 class CXFA_FFImageEdit final : public CXFA_FFField {
14  public:
15   explicit CXFA_FFImageEdit(CXFA_Node* pNode);
16   ~CXFA_FFImageEdit() override;
17 
18   // CXFA_FFField
19   void RenderWidget(CXFA_Graphics* pGS,
20                     const CFX_Matrix& matrix,
21                     HighlightOption highlight) override;
22   bool LoadWidget() override;
23   bool AcceptsFocusOnButtonDown(uint32_t dwFlags,
24                                 const CFX_PointF& point,
25                                 FWL_MouseCommand command) override;
26   bool OnLButtonDown(uint32_t dwFlags, const CFX_PointF& point) override;
27   void OnProcessMessage(CFWL_Message* pMessage) override;
28   void OnProcessEvent(CFWL_Event* pEvent) override;
29   void OnDrawWidget(CXFA_Graphics* pGraphics,
30                     const CFX_Matrix& matrix) override;
31   FormFieldType GetFormFieldType() override;
32 
33  private:
34   void SetFWLRect() override;
35   bool UpdateFWLData() override;
36   bool CommitData() override;
37 
38   UnownedPtr<IFWL_WidgetDelegate> m_pOldDelegate;
39 };
40 
41 #endif  // XFA_FXFA_CXFA_FFIMAGEEDIT_H_
42