Dan Sinclair | 398a43d | 2016-03-23 15:51:01 -0400 | [diff] [blame] | 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 | |
dsinclair | 447b1f3 | 2016-12-08 10:06:32 -0800 | [diff] [blame] | 7 | #ifndef XFA_FWL_CFWL_MESSAGE_H_ |
| 8 | #define XFA_FWL_CFWL_MESSAGE_H_ |
Dan Sinclair | 398a43d | 2016-03-23 15:51:01 -0400 | [diff] [blame] | 9 | |
dsinclair | 242b95e | 2016-11-16 14:25:01 -0800 | [diff] [blame] | 10 | #include <memory> |
| 11 | |
dsinclair | fb50559 | 2016-10-20 06:44:03 -0700 | [diff] [blame] | 12 | #include "core/fxcrt/fx_basic.h" |
dsinclair | a52ab74 | 2016-09-29 13:59:29 -0700 | [diff] [blame] | 13 | #include "core/fxcrt/fx_string.h" |
| 14 | #include "core/fxcrt/fx_system.h" |
Dan Sinclair | 398a43d | 2016-03-23 15:51:01 -0400 | [diff] [blame] | 15 | |
dsinclair | 2c489cc | 2016-11-23 16:17:20 -0800 | [diff] [blame] | 16 | class CFWL_Widget; |
Dan Sinclair | 398a43d | 2016-03-23 15:51:01 -0400 | [diff] [blame] | 17 | |
dsinclair | 5d9da0c | 2016-04-21 13:12:06 -0700 | [diff] [blame] | 18 | class CFWL_Message { |
Dan Sinclair | 398a43d | 2016-03-23 15:51:01 -0400 | [diff] [blame] | 19 | public: |
dsinclair | 4614b45 | 2016-12-07 17:01:58 -0800 | [diff] [blame] | 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); |
weili | 4ce94e1 | 2016-06-18 06:21:57 -0700 | [diff] [blame] | 25 | virtual ~CFWL_Message(); |
dsinclair | 5d9da0c | 2016-04-21 13:12:06 -0700 | [diff] [blame] | 26 | |
dsinclair | 242b95e | 2016-11-16 14:25:01 -0800 | [diff] [blame] | 27 | virtual std::unique_ptr<CFWL_Message> Clone(); |
dsinclair | 4614b45 | 2016-12-07 17:01:58 -0800 | [diff] [blame] | 28 | Type GetType() const { return m_type; } |
dsinclair | 5d9da0c | 2016-04-21 13:12:06 -0700 | [diff] [blame] | 29 | |
dsinclair | 2c489cc | 2016-11-23 16:17:20 -0800 | [diff] [blame] | 30 | CFWL_Widget* m_pSrcTarget; |
| 31 | CFWL_Widget* m_pDstTarget; |
dsinclair | 4614b45 | 2016-12-07 17:01:58 -0800 | [diff] [blame] | 32 | |
| 33 | private: |
| 34 | Type m_type; |
Dan Sinclair | 398a43d | 2016-03-23 15:51:01 -0400 | [diff] [blame] | 35 | }; |
| 36 | |
dsinclair | 447b1f3 | 2016-12-08 10:06:32 -0800 | [diff] [blame] | 37 | #endif // XFA_FWL_CFWL_MESSAGE_H_ |