| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_FWL_NOTEIMP_H_ | 7 #ifndef XFA_FWL_CORE_FWL_NOTEIMP_H_ |
| 8 #define XFA_FWL_CORE_FWL_NOTEIMP_H_ | 8 #define XFA_FWL_CORE_FWL_NOTEIMP_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <unordered_map> | 11 #include <unordered_map> |
| 12 | 12 |
| 13 #include "xfa/fwl/core/cfwl_event.h" | 13 #include "xfa/fwl/core/cfwl_event.h" |
| 14 #include "xfa/fwl/core/cfwl_message.h" | 14 #include "xfa/fwl/core/cfwl_message.h" |
| 15 #include "xfa/fwl/core/ifwl_tooltip.h" | 15 #include "xfa/fwl/core/ifwl_tooltip.h" |
| 16 #include "xfa/fwl/core/ifwl_widget.h" | 16 #include "xfa/fwl/core/ifwl_widget.h" |
| 17 #include "xfa/fxgraphics/cfx_graphics.h" | 17 #include "xfa/fxgraphics/cfx_graphics.h" |
| 18 | 18 |
| 19 class CFWL_EventTarget; | 19 class CFWL_EventTarget; |
| 20 class CFWL_MsgKey; | |
| 21 class CFWL_MsgKillFocus; | |
| 22 class CFWL_MsgMouse; | |
| 23 class CFWL_MsgMouseWheel; | |
| 24 class CFWL_MsgSetFocus; | |
| 25 class CFWL_TargetImp; | 20 class CFWL_TargetImp; |
| 26 class IFWL_ToolTip; | 21 class IFWL_ToolTip; |
| 27 class IFWL_Widget; | 22 class IFWL_Widget; |
| 28 | 23 |
| 29 class CFWL_NoteLoop { | 24 class CFWL_NoteLoop { |
| 30 public: | 25 public: |
| 31 CFWL_NoteLoop(); | 26 CFWL_NoteLoop(); |
| 32 ~CFWL_NoteLoop() {} | 27 ~CFWL_NoteLoop() {} |
| 33 | 28 |
| 34 IFWL_Widget* GetForm() const { return m_pForm; } | 29 IFWL_Widget* GetForm() const { return m_pForm; } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 65 } | 60 } |
| 66 | 61 |
| 67 void Run(); | 62 void Run(); |
| 68 | 63 |
| 69 void NotifyTargetHide(IFWL_Widget* pNoteTarget); | 64 void NotifyTargetHide(IFWL_Widget* pNoteTarget); |
| 70 void NotifyTargetDestroy(IFWL_Widget* pNoteTarget); | 65 void NotifyTargetDestroy(IFWL_Widget* pNoteTarget); |
| 71 | 66 |
| 72 void RegisterForm(IFWL_Widget* pForm); | 67 void RegisterForm(IFWL_Widget* pForm); |
| 73 void UnRegisterForm(IFWL_Widget* pForm); | 68 void UnRegisterForm(IFWL_Widget* pForm); |
| 74 | 69 |
| 75 bool QueueMessage(CFWL_Message* pMessage); | 70 void QueueMessage(CFWL_Message* pMessage); |
| 76 bool UnqueueMessage(CFWL_NoteLoop* pNoteLoop); | 71 void UnqueueMessage(CFWL_NoteLoop* pNoteLoop); |
| 77 bool ProcessMessage(CFWL_Message* pMessage); | 72 void ProcessMessage(CFWL_Message* pMessage); |
| 78 | 73 |
| 79 private: | 74 private: |
| 80 bool DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm); | 75 bool DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm); |
| 81 bool DoSetFocus(CFWL_MsgSetFocus* pMsg, IFWL_Widget* pMessageForm); | 76 bool DoSetFocus(CFWL_Message* pMsg, IFWL_Widget* pMessageForm); |
| 82 bool DoKillFocus(CFWL_MsgKillFocus* pMsg, IFWL_Widget* pMessageForm); | 77 bool DoKillFocus(CFWL_Message* pMsg, IFWL_Widget* pMessageForm); |
| 83 bool DoKey(CFWL_MsgKey* pMsg, IFWL_Widget* pMessageForm); | 78 bool DoKey(CFWL_Message* pMsg, IFWL_Widget* pMessageForm); |
| 84 bool DoMouse(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm); | 79 bool DoMouse(CFWL_Message* pMsg, IFWL_Widget* pMessageForm); |
| 85 bool DoWheel(CFWL_MsgMouseWheel* pMsg, IFWL_Widget* pMessageForm); | 80 bool DoWheel(CFWL_Message* pMsg, IFWL_Widget* pMessageForm); |
| 86 bool DoMouseEx(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm); | 81 bool DoMouseEx(CFWL_Message* pMsg, IFWL_Widget* pMessageForm); |
| 87 void MouseSecondary(CFWL_MsgMouse* pMsg); | 82 void MouseSecondary(CFWL_Message* pMsg); |
| 88 bool IsValidMessage(CFWL_Message* pMessage); | 83 bool IsValidMessage(CFWL_Message* pMessage); |
| 89 IFWL_Widget* GetMessageForm(IFWL_Widget* pDstTarget); | 84 IFWL_Widget* GetMessageForm(IFWL_Widget* pDstTarget); |
| 90 | 85 |
| 91 CFX_ArrayTemplate<IFWL_Widget*> m_forms; | 86 CFX_ArrayTemplate<IFWL_Widget*> m_forms; |
| 92 CFX_ArrayTemplate<CFWL_Message*> m_noteQueue; | 87 CFX_ArrayTemplate<CFWL_Message*> m_noteQueue; |
| 93 CFX_ArrayTemplate<CFWL_NoteLoop*> m_noteLoopQueue; | 88 CFX_ArrayTemplate<CFWL_NoteLoop*> m_noteLoopQueue; |
| 94 std::unordered_map<uint32_t, CFWL_EventTarget*> m_eventTargets; | 89 std::unordered_map<uint32_t, CFWL_EventTarget*> m_eventTargets; |
| 95 IFWL_Widget* m_pHover; | 90 IFWL_Widget* m_pHover; |
| 96 IFWL_Widget* m_pFocus; | 91 IFWL_Widget* m_pFocus; |
| 97 IFWL_Widget* m_pGrab; | 92 IFWL_Widget* m_pGrab; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 112 | 107 |
| 113 private: | 108 private: |
| 114 bool IsFilterEvent(CFWL_Event* pEvent, uint32_t dwFilter) const; | 109 bool IsFilterEvent(CFWL_Event* pEvent, uint32_t dwFilter) const; |
| 115 | 110 |
| 116 CFX_MapPtrTemplate<void*, uint32_t> m_eventSources; | 111 CFX_MapPtrTemplate<void*, uint32_t> m_eventSources; |
| 117 IFWL_Widget* m_pListener; | 112 IFWL_Widget* m_pListener; |
| 118 bool m_bInvalid; | 113 bool m_bInvalid; |
| 119 }; | 114 }; |
| 120 | 115 |
| 121 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ | 116 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ |
| OLD | NEW |