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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/cfwl_event.h
diff --git a/xfa/fwl/core/cfwl_event.h b/xfa/fwl/core/cfwl_event.h
index fe8e1b37f0eaf1d50857734d995a3798329b1974..aa435e54b22bbf503ce216835791a1fe01c4539e 100644
--- a/xfa/fwl/core/cfwl_event.h
+++ b/xfa/fwl/core/cfwl_event.h
@@ -14,41 +14,39 @@
#include "xfa/fwl/core/cfwl_msgmouse.h"
#include "xfa/fwl/core/fwl_error.h"
-enum class CFWL_EventType {
- None = 0,
-
- CheckStateChanged,
- CheckWord,
- Click,
- Close,
- EditChanged,
- Key,
- KillFocus,
- Mouse,
- MouseWheel,
- PostDropDown,
- PreDropDown,
- Scroll,
- SelectChanged,
- SetFocus,
- SizeChanged,
- TextChanged,
- TextFull,
- Validate
-};
-
class CFX_Graphics;
class CFWL_Widget;
class CFWL_Event {
public:
- CFWL_Event();
+ 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
+ CheckStateChanged,
+ CheckWord,
+ Click,
+ Close,
+ EditChanged,
+ Mouse,
+ PostDropDown,
+ PreDropDown,
+ Scroll,
+ SelectChanged,
+ TextChanged,
+ TextFull,
+ Validate
+ };
+
+ explicit CFWL_Event(Type type);
+ CFWL_Event(Type type, CFWL_Widget* pSrcTarget);
+ CFWL_Event(Type type, CFWL_Widget* pSrcTarget, CFWL_Widget* pDstTarget);
virtual ~CFWL_Event();
- virtual CFWL_EventType GetClassID() const;
+ Type GetType() const { return m_type; }
CFWL_Widget* m_pSrcTarget;
CFWL_Widget* m_pDstTarget;
+
+ private:
+ Type m_type;
};
#endif // XFA_FWL_CORE_CFWL_EVENT_H_
« 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