Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Side by Side Diff: xfa/fwl/core/cfwl_event.h

Issue 2530993002: Cleanup FWL Event and Message code. (Closed)
Patch Set: Review feedback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/cfwl_edit.cpp ('k') | xfa/fwl/core/cfwl_event.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FWL_CORE_CFWL_EVENT_H_ 7 #ifndef XFA_FWL_CORE_CFWL_EVENT_H_
8 #define XFA_FWL_CORE_CFWL_EVENT_H_ 8 #define XFA_FWL_CORE_CFWL_EVENT_H_
9 9
10 #include "core/fxcrt/fx_coordinates.h" 10 #include "core/fxcrt/fx_coordinates.h"
11 #include "core/fxcrt/fx_string.h" 11 #include "core/fxcrt/fx_string.h"
12 #include "core/fxcrt/fx_system.h" 12 #include "core/fxcrt/fx_system.h"
13 #include "xfa/fwl/core/cfwl_msgkey.h" 13 #include "xfa/fwl/core/cfwl_msgkey.h"
14 #include "xfa/fwl/core/cfwl_msgmouse.h" 14 #include "xfa/fwl/core/cfwl_msgmouse.h"
15 #include "xfa/fwl/core/fwl_error.h" 15 #include "xfa/fwl/core/fwl_error.h"
16 16
17 enum class CFWL_EventType {
18 None = 0,
19
20 CheckStateChanged,
21 CheckWord,
22 Click,
23 Close,
24 EditChanged,
25 Key,
26 KillFocus,
27 Mouse,
28 MouseWheel,
29 PostDropDown,
30 PreDropDown,
31 Scroll,
32 SelectChanged,
33 SetFocus,
34 SizeChanged,
35 TextChanged,
36 TextFull,
37 Validate
38 };
39
40 class CFX_Graphics; 17 class CFX_Graphics;
41 class CFWL_Widget; 18 class CFWL_Widget;
42 19
43 class CFWL_Event { 20 class CFWL_Event {
44 public: 21 public:
45 CFWL_Event(); 22 enum class Type {
Tom Sepez 2016/12/08 00:56:46 nit: given that we're already qualifiying the nam
dsinclair 2016/12/08 00:59:54 I prefer to keep this an enum class so that we can
23 CheckStateChanged,
24 CheckWord,
25 Click,
26 Close,
27 EditChanged,
28 Mouse,
29 PostDropDown,
30 PreDropDown,
31 Scroll,
32 SelectChanged,
33 TextChanged,
34 TextFull,
35 Validate
36 };
37
38 explicit CFWL_Event(Type type);
39 CFWL_Event(Type type, CFWL_Widget* pSrcTarget);
40 CFWL_Event(Type type, CFWL_Widget* pSrcTarget, CFWL_Widget* pDstTarget);
46 virtual ~CFWL_Event(); 41 virtual ~CFWL_Event();
47 42
48 virtual CFWL_EventType GetClassID() const; 43 Type GetType() const { return m_type; }
49 44
50 CFWL_Widget* m_pSrcTarget; 45 CFWL_Widget* m_pSrcTarget;
51 CFWL_Widget* m_pDstTarget; 46 CFWL_Widget* m_pDstTarget;
47
48 private:
49 Type m_type;
52 }; 50 };
53 51
54 #endif // XFA_FWL_CORE_CFWL_EVENT_H_ 52 #endif // XFA_FWL_CORE_CFWL_EVENT_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_edit.cpp ('k') | xfa/fwl/core/cfwl_event.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698