diff options
Diffstat (limited to 'xfa/fwl/core/cfwl_message.h')
-rw-r--r-- | xfa/fwl/core/cfwl_message.h | 87 |
1 files changed, 14 insertions, 73 deletions
diff --git a/xfa/fwl/core/cfwl_message.h b/xfa/fwl/core/cfwl_message.h index 0bfafb5a89..56e8185c29 100644 --- a/xfa/fwl/core/cfwl_message.h +++ b/xfa/fwl/core/cfwl_message.h @@ -14,22 +14,11 @@ enum class CFWL_MessageType { None = 0, - - Activate, - Close, - Cursor, - Deactivate, - DropFiles, Key, KillFocus, Mouse, MouseWheel, - Post, - SetFocus, - Size, - TaskClicked, - WindowMove, - WindowWillMove + SetFocus }; enum class FWL_MouseCommand { @@ -39,9 +28,6 @@ enum class FWL_MouseCommand { RightButtonDown, RightButtonUp, RightButtonDblClk, - MiddleButtonDown, - MiddleButtonUp, - MiddleButtonDblClk, Move, Enter, Leave, @@ -100,30 +86,19 @@ inline CFWL_Message* CFWL_Message::Retain() { return this; } -#define FWL_MESSAGE_CLASS_DEF(classname, msgType, ...) \ - class classname : public CFWL_Message { \ - public: \ - classname(); \ - ~classname() override; \ - CFWL_Message* Clone() override; \ - CFWL_MessageType GetClassID() const override; \ - __VA_ARGS__ \ - }; - -#define FWL_MESSAGE_FUNCTION_DEF(classname, msgType, ...) \ - inline classname::classname() {} \ - inline classname::~classname() {} \ - inline CFWL_Message* classname::Clone() { return new classname(*this); } \ - inline CFWL_MessageType classname::GetClassID() const { return msgType; } \ - __VA_ARGS__ - -#define FWL_MESSAGE_DEF(classname, msgType, ...) \ - FWL_MESSAGE_CLASS_DEF(classname, msgType, __VA_ARGS__) \ - FWL_MESSAGE_FUNCTION_DEF(classname, msgType) - -FWL_MESSAGE_DEF(CFWL_MsgActivate, CFWL_MessageType::Activate) - -FWL_MESSAGE_DEF(CFWL_MsgDeactivate, CFWL_MessageType::Deactivate) +#define FWL_MESSAGE_DEF(classname, msgType, ...) \ + class classname : public CFWL_Message { \ + public: \ + classname(); \ + ~classname() override; \ + CFWL_Message* Clone() override; \ + CFWL_MessageType GetClassID() const override; \ + __VA_ARGS__ \ + }; \ + inline classname::classname() {} \ + inline classname::~classname() {} \ + inline CFWL_Message* classname::Clone() { return new classname(*this); } \ + inline CFWL_MessageType classname::GetClassID() const { return msgType; } FWL_MESSAGE_DEF(CFWL_MsgMouse, CFWL_MessageType::Mouse, FX_FLOAT m_fx; FX_FLOAT m_fy; @@ -148,38 +123,4 @@ FWL_MESSAGE_DEF(CFWL_MsgKey, CFWL_MessageType::Key, uint32_t m_dwKeyCode; uint32_t m_dwFlags; FWL_KeyCommand m_dwCmd;) -FWL_MESSAGE_DEF(CFWL_MsgCursor, CFWL_MessageType::Cursor) - -FWL_MESSAGE_DEF(CFWL_MsgSize, CFWL_MessageType::Size, int32_t m_iWidth; - int32_t m_iHeight;) - -FWL_MESSAGE_DEF(CFWL_MsgWindowMove, CFWL_MessageType::WindowMove, FX_FLOAT m_fx; - FX_FLOAT m_fy;) - -FWL_MESSAGE_CLASS_DEF(CFWL_MsgDropFiles, - CFWL_MessageType::DropFiles, - CFWL_MsgDropFiles(const CFWL_MsgDropFiles& copy); - FX_FLOAT m_fx; - FX_FLOAT m_fy; - CFX_WideStringArray m_files;) -FWL_MESSAGE_FUNCTION_DEF( - CFWL_MsgDropFiles, - CFWL_MessageType::DropFiles, - inline CFWL_MsgDropFiles::CFWL_MsgDropFiles(const CFWL_MsgDropFiles& copy) { - m_pDstTarget = copy.m_pDstTarget; - m_pSrcTarget = copy.m_pSrcTarget; - m_fx = copy.m_fx; - m_fy = copy.m_fy; - m_files.Append(copy.m_files); - }) - -FWL_MESSAGE_DEF(CFWL_MsgTaskClicked, - CFWL_MessageType::TaskClicked, - FX_FLOAT m_fx; - FX_FLOAT m_fy;) - -FWL_MESSAGE_DEF(CFWL_MsgClose, CFWL_MessageType::Close) - -FWL_MESSAGE_DEF(CFWL_MsgWindowWillMove, CFWL_MessageType::WindowWillMove) - #endif // XFA_FWL_CORE_CFWL_MESSAGE_H_ |