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_MESSAGE_H_ 8 #define XFA_FWL_CFWL_MESSAGE_H_ 9 10 #include <memory> 11 12 #include "core/fxcrt/fx_basic.h" 13 #include "core/fxcrt/fx_string.h" 14 #include "core/fxcrt/fx_system.h" 15 16 class CFWL_Widget; 17 18 class CFWL_Message { 19 public: 20 enum class Type { Key, KillFocus, Mouse, MouseWheel, SetFocus }; 21 22 explicit CFWL_Message(Type type); 23 CFWL_Message(Type type, CFWL_Widget* pSrcTarget); 24 CFWL_Message(Type type, CFWL_Widget* pSrcTarget, CFWL_Widget* pDstTarget); 25 virtual ~CFWL_Message(); 26 27 virtual std::unique_ptr<CFWL_Message> Clone(); GetType()28 Type GetType() const { return m_type; } 29 30 CFWL_Widget* m_pSrcTarget; 31 CFWL_Widget* m_pDstTarget; 32 33 private: 34 Type m_type; 35 }; 36 37 #endif // XFA_FWL_CFWL_MESSAGE_H_ 38