1 // Copyright 2016 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_FWL_CFWL_MESSAGEMOUSE_H_
8 #define XFA_FWL_CFWL_MESSAGEMOUSE_H_
9 
10 #include <memory>
11 
12 #include "core/fxcrt/fx_coordinates.h"
13 #include "xfa/fwl/cfwl_message.h"
14 
15 enum class FWL_MouseCommand {
16   LeftButtonDown,
17   LeftButtonUp,
18   LeftButtonDblClk,
19   RightButtonDown,
20   RightButtonUp,
21   RightButtonDblClk,
22   Move,
23   Enter,
24   Leave,
25   Hover
26 };
27 
28 class CFWL_MessageMouse final : public CFWL_Message {
29  public:
30   CFWL_MessageMouse(CFWL_Widget* pDstTarget, FWL_MouseCommand cmd);
31   CFWL_MessageMouse(CFWL_Widget* pDstTarget,
32                     FWL_MouseCommand cmd,
33                     uint32_t flags,
34                     CFX_PointF pos);
35   ~CFWL_MessageMouse() override;
36 
37   const FWL_MouseCommand m_dwCmd;
38   uint32_t m_dwFlags = 0;
39   CFX_PointF m_pos;
40 };
41 
42 #endif  // XFA_FWL_CFWL_MESSAGEMOUSE_H_
43