blob: 778e1e20797723b795dd7db3cc5493442536ad3c [file] [log] [blame]
Dan Sinclair398a43d2016-03-23 15:51:01 -04001// 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
dsinclair447b1f32016-12-08 10:06:32 -08007#ifndef XFA_FWL_CFWL_MESSAGE_H_
8#define XFA_FWL_CFWL_MESSAGE_H_
Dan Sinclair398a43d2016-03-23 15:51:01 -04009
dsinclair242b95e2016-11-16 14:25:01 -080010#include <memory>
11
dsinclairfb505592016-10-20 06:44:03 -070012#include "core/fxcrt/fx_basic.h"
dsinclaira52ab742016-09-29 13:59:29 -070013#include "core/fxcrt/fx_string.h"
14#include "core/fxcrt/fx_system.h"
Dan Sinclair398a43d2016-03-23 15:51:01 -040015
dsinclair2c489cc2016-11-23 16:17:20 -080016class CFWL_Widget;
Dan Sinclair398a43d2016-03-23 15:51:01 -040017
dsinclair5d9da0c2016-04-21 13:12:06 -070018class CFWL_Message {
Dan Sinclair398a43d2016-03-23 15:51:01 -040019 public:
dsinclair4614b452016-12-07 17:01:58 -080020 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);
weili4ce94e12016-06-18 06:21:57 -070025 virtual ~CFWL_Message();
dsinclair5d9da0c2016-04-21 13:12:06 -070026
dsinclair242b95e2016-11-16 14:25:01 -080027 virtual std::unique_ptr<CFWL_Message> Clone();
dsinclair4614b452016-12-07 17:01:58 -080028 Type GetType() const { return m_type; }
dsinclair5d9da0c2016-04-21 13:12:06 -070029
dsinclair2c489cc2016-11-23 16:17:20 -080030 CFWL_Widget* m_pSrcTarget;
31 CFWL_Widget* m_pDstTarget;
dsinclair4614b452016-12-07 17:01:58 -080032
33 private:
34 Type m_type;
Dan Sinclair398a43d2016-03-23 15:51:01 -040035};
36
dsinclair447b1f32016-12-08 10:06:32 -080037#endif // XFA_FWL_CFWL_MESSAGE_H_