| 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 <unordered_map> | 11 #include <unordered_map> |
| 11 | 12 |
| 12 #include "xfa/fwl/core/cfwl_event.h" | 13 #include "xfa/fwl/core/cfwl_event.h" |
| 13 #include "xfa/fwl/core/cfwl_message.h" | 14 #include "xfa/fwl/core/cfwl_message.h" |
| 14 #include "xfa/fwl/core/fwl_error.h" | 15 #include "xfa/fwl/core/fwl_error.h" |
| 15 #include "xfa/fwl/core/ifwl_widget.h" | 16 #include "xfa/fwl/core/ifwl_widget.h" |
| 16 #include "xfa/fxgraphics/include/cfx_graphics.h" | 17 #include "xfa/fxgraphics/include/cfx_graphics.h" |
| 17 | 18 |
| 18 enum FWL_KeyFlag { | 19 enum FWL_KeyFlag { |
| 19 FWL_KEYFLAG_Ctrl = 1 << 0, | 20 FWL_KEYFLAG_Ctrl = 1 << 0, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 IFWL_Widget* GetMessageForm(IFWL_Widget* pDstTarget); | 109 IFWL_Widget* GetMessageForm(IFWL_Widget* pDstTarget); |
| 109 void ClearInvalidEventTargets(FX_BOOL bRemoveAll); | 110 void ClearInvalidEventTargets(FX_BOOL bRemoveAll); |
| 110 | 111 |
| 111 CFX_ArrayTemplate<CFWL_WidgetImp*> m_forms; | 112 CFX_ArrayTemplate<CFWL_WidgetImp*> m_forms; |
| 112 CFX_ArrayTemplate<CFWL_Message*> m_noteQueue; | 113 CFX_ArrayTemplate<CFWL_Message*> m_noteQueue; |
| 113 CFX_ArrayTemplate<CFWL_NoteLoop*> m_noteLoopQueue; | 114 CFX_ArrayTemplate<CFWL_NoteLoop*> m_noteLoopQueue; |
| 114 std::unordered_map<uint32_t, CFWL_EventTarget*> m_eventTargets; | 115 std::unordered_map<uint32_t, CFWL_EventTarget*> m_eventTargets; |
| 115 IFWL_Widget* m_pHover; | 116 IFWL_Widget* m_pHover; |
| 116 IFWL_Widget* m_pFocus; | 117 IFWL_Widget* m_pFocus; |
| 117 IFWL_Widget* m_pGrab; | 118 IFWL_Widget* m_pGrab; |
| 118 CFWL_NoteLoop* m_pNoteLoop; | 119 std::unique_ptr<CFWL_NoteLoop> m_pNoteLoop; |
| 119 }; | 120 }; |
| 120 | 121 |
| 121 class CFWL_EventTarget { | 122 class CFWL_EventTarget { |
| 122 public: | 123 public: |
| 123 CFWL_EventTarget(CFWL_NoteDriver* pNoteDriver, IFWL_Widget* pListener); | 124 CFWL_EventTarget(CFWL_NoteDriver* pNoteDriver, IFWL_Widget* pListener); |
| 124 ~CFWL_EventTarget(); | 125 ~CFWL_EventTarget(); |
| 125 | 126 |
| 126 int32_t SetEventSource(IFWL_Widget* pSource, | 127 int32_t SetEventSource(IFWL_Widget* pSource, |
| 127 uint32_t dwFilter = FWL_EVENT_ALL_MASK); | 128 uint32_t dwFilter = FWL_EVENT_ALL_MASK); |
| 128 FX_BOOL ProcessEvent(CFWL_Event* pEvent); | 129 FX_BOOL ProcessEvent(CFWL_Event* pEvent); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 140 class CFWL_ToolTipContainer final { | 141 class CFWL_ToolTipContainer final { |
| 141 public: | 142 public: |
| 142 static CFWL_ToolTipContainer* getInstance(); | 143 static CFWL_ToolTipContainer* getInstance(); |
| 143 static void DeleteInstance(); | 144 static void DeleteInstance(); |
| 144 | 145 |
| 145 protected: | 146 protected: |
| 146 CFWL_ToolTipContainer(); | 147 CFWL_ToolTipContainer(); |
| 147 ~CFWL_ToolTipContainer(); | 148 ~CFWL_ToolTipContainer(); |
| 148 | 149 |
| 149 CFWL_ToolTipImp* m_pToolTipImp; | 150 CFWL_ToolTipImp* m_pToolTipImp; |
| 150 CFWL_CoreToolTipDP* m_ToolTipDp; | 151 std::unique_ptr<CFWL_CoreToolTipDP> m_pToolTipDp; |
| 151 | 152 |
| 152 private: | 153 private: |
| 153 static CFWL_ToolTipContainer* s_pInstance; | 154 static CFWL_ToolTipContainer* s_pInstance; |
| 154 }; | 155 }; |
| 155 | 156 |
| 156 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ | 157 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ |
| OLD | NEW |