Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 { | 17 enum class CFWL_EventType { |
|
Tom Sepez
2016/12/07 18:48:26
nit: If I were really compulsive, I'd nest this as
dsinclair
2016/12/07 20:02:01
Done.
| |
| 18 None = 0, | |
| 19 | |
| 20 CheckStateChanged, | 18 CheckStateChanged, |
| 21 CheckWord, | 19 CheckWord, |
| 22 Click, | 20 Click, |
| 23 Close, | 21 Close, |
| 24 EditChanged, | 22 EditChanged, |
| 25 Key, | |
| 26 KillFocus, | |
| 27 Mouse, | 23 Mouse, |
| 28 MouseWheel, | |
| 29 PostDropDown, | 24 PostDropDown, |
| 30 PreDropDown, | 25 PreDropDown, |
| 31 Scroll, | 26 Scroll, |
| 32 SelectChanged, | 27 SelectChanged, |
| 33 SetFocus, | |
| 34 SizeChanged, | |
| 35 TextChanged, | 28 TextChanged, |
| 36 TextFull, | 29 TextFull, |
| 37 Validate | 30 Validate |
| 38 }; | 31 }; |
| 39 | 32 |
| 40 class CFX_Graphics; | 33 class CFX_Graphics; |
| 41 class CFWL_Widget; | 34 class CFWL_Widget; |
| 42 | 35 |
| 43 class CFWL_Event { | 36 class CFWL_Event { |
| 44 public: | 37 public: |
| 45 CFWL_Event(); | 38 explicit CFWL_Event(CFWL_EventType type); |
|
Tom Sepez
2016/12/07 18:48:26
nit: let's add two more ctors:
CFWL_Event(CFWL_Ev
dsinclair
2016/12/07 20:02:01
Done.
| |
| 46 virtual ~CFWL_Event(); | 39 virtual ~CFWL_Event(); |
| 47 | 40 |
| 48 virtual CFWL_EventType GetClassID() const; | 41 CFWL_EventType GetClassID() const { return m_type; } |
|
Tom Sepez
2016/12/07 18:48:26
nit: bad name, maybe GetEventType() ?
dsinclair
2016/12/07 20:02:01
Went with GetType()
| |
| 49 | 42 |
| 50 CFWL_Widget* m_pSrcTarget; | 43 CFWL_Widget* m_pSrcTarget; |
| 51 CFWL_Widget* m_pDstTarget; | 44 CFWL_Widget* m_pDstTarget; |
| 45 | |
| 46 private: | |
| 47 CFWL_EventType m_type; | |
| 52 }; | 48 }; |
| 53 | 49 |
| 54 #endif // XFA_FWL_CORE_CFWL_EVENT_H_ | 50 #endif // XFA_FWL_CORE_CFWL_EVENT_H_ |
| OLD | NEW |