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 "xfa/fwl/core/ifwl_notedriver.h" | 10 #include "xfa/fwl/core/ifwl_notedriver.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 IFWL_NoteLoop* PopNoteLoop() override; | 63 IFWL_NoteLoop* PopNoteLoop() override; |
64 IFWL_Widget* GetFocus() override; | 64 IFWL_Widget* GetFocus() override; |
65 FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE) override; | 65 FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE) override; |
66 void SetGrab(IFWL_Widget* pGrab, FX_BOOL bSet) override; | 66 void SetGrab(IFWL_Widget* pGrab, FX_BOOL bSet) override; |
67 FWL_ERR Run() override; | 67 FWL_ERR Run() override; |
68 | 68 |
69 IFWL_Widget* GetHover(); | 69 IFWL_Widget* GetHover(); |
70 void SetHover(IFWL_Widget* pHover); | 70 void SetHover(IFWL_Widget* pHover); |
71 void NotifyTargetHide(IFWL_Widget* pNoteTarget); | 71 void NotifyTargetHide(IFWL_Widget* pNoteTarget); |
72 void NotifyTargetDestroy(IFWL_Widget* pNoteTarget); | 72 void NotifyTargetDestroy(IFWL_Widget* pNoteTarget); |
73 void NotifyFullScreenMode(IFWL_Widget* pNoteTarget, FX_BOOL bFullScreen); | |
74 FWL_ERR RegisterForm(CFWL_WidgetImp* pForm); | 73 FWL_ERR RegisterForm(CFWL_WidgetImp* pForm); |
75 FWL_ERR UnRegisterForm(CFWL_WidgetImp* pForm); | 74 FWL_ERR UnRegisterForm(CFWL_WidgetImp* pForm); |
76 FX_BOOL QueueMessage(CFWL_Message* pMessage); | 75 FX_BOOL QueueMessage(CFWL_Message* pMessage); |
77 FX_BOOL UnqueueMessage(CFWL_NoteLoop* pNoteLoop); | 76 FX_BOOL UnqueueMessage(CFWL_NoteLoop* pNoteLoop); |
78 CFWL_NoteLoop* GetTopLoop(); | 77 CFWL_NoteLoop* GetTopLoop(); |
79 int32_t CountLoop(); | 78 int32_t CountLoop(); |
80 FX_BOOL ProcessMessage(CFWL_Message* pMessage); | 79 FX_BOOL ProcessMessage(CFWL_Message* pMessage); |
81 | 80 |
82 protected: | 81 protected: |
83 FX_BOOL DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm); | 82 FX_BOOL DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm); |
(...skipping 10 matching lines...) Expand all Loading... |
94 FX_BOOL DoMouseEx(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm); | 93 FX_BOOL DoMouseEx(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm); |
95 void MouseSecondary(CFWL_MsgMouse* pMsg); | 94 void MouseSecondary(CFWL_MsgMouse* pMsg); |
96 FX_BOOL IsValidMessage(CFWL_Message* pMessage); | 95 FX_BOOL IsValidMessage(CFWL_Message* pMessage); |
97 IFWL_Widget* GetMessageForm(IFWL_Widget* pDstTarget); | 96 IFWL_Widget* GetMessageForm(IFWL_Widget* pDstTarget); |
98 void ClearInvalidEventTargets(FX_BOOL bRemoveAll); | 97 void ClearInvalidEventTargets(FX_BOOL bRemoveAll); |
99 CFX_PtrArray m_forms; | 98 CFX_PtrArray m_forms; |
100 CFX_PtrArray m_noteQueue; | 99 CFX_PtrArray m_noteQueue; |
101 CFX_PtrArray m_noteLoopQueue; | 100 CFX_PtrArray m_noteLoopQueue; |
102 CFX_MapPtrToPtr m_eventTargets; | 101 CFX_MapPtrToPtr m_eventTargets; |
103 int32_t m_sendEventCalled; | 102 int32_t m_sendEventCalled; |
104 FX_BOOL m_bFullScreen; | |
105 IFWL_Widget* m_pHover; | 103 IFWL_Widget* m_pHover; |
106 IFWL_Widget* m_pFocus; | 104 IFWL_Widget* m_pFocus; |
107 IFWL_Widget* m_pGrab; | 105 IFWL_Widget* m_pGrab; |
108 CFWL_NoteLoop* m_pNoteLoop; | 106 CFWL_NoteLoop* m_pNoteLoop; |
109 }; | 107 }; |
110 | 108 |
111 typedef CFX_MapPtrTemplate<void*, uint32_t> CFWL_EventSource; | |
112 | |
113 class CFWL_EventTarget { | 109 class CFWL_EventTarget { |
114 public: | 110 public: |
115 CFWL_EventTarget(CFWL_NoteDriver* pNoteDriver, IFWL_Widget* pListener) | 111 CFWL_EventTarget(CFWL_NoteDriver* pNoteDriver, IFWL_Widget* pListener) |
116 : m_pListener(pListener), m_pNoteDriver(pNoteDriver), m_bInvalid(FALSE) {} | 112 : m_pListener(pListener), m_pNoteDriver(pNoteDriver), m_bInvalid(FALSE) {} |
117 ~CFWL_EventTarget(); | 113 ~CFWL_EventTarget(); |
118 int32_t SetEventSource(IFWL_Widget* pSource, | 114 int32_t SetEventSource(IFWL_Widget* pSource, |
119 uint32_t dwFilter = FWL_EVENT_ALL_MASK); | 115 uint32_t dwFilter = FWL_EVENT_ALL_MASK); |
120 FX_BOOL ProcessEvent(CFWL_Event* pEvent); | 116 FX_BOOL ProcessEvent(CFWL_Event* pEvent); |
121 FX_BOOL IsFilterEvent(CFWL_Event* pEvent, uint32_t dwFilter); | 117 FX_BOOL IsFilterEvent(CFWL_Event* pEvent, uint32_t dwFilter); |
122 FX_BOOL IsInvalid() { return m_bInvalid; } | 118 FX_BOOL IsInvalid() { return m_bInvalid; } |
123 void FlagInvalid() { m_bInvalid = TRUE; } | 119 void FlagInvalid() { m_bInvalid = TRUE; } |
124 | 120 |
125 protected: | 121 protected: |
126 CFWL_EventSource m_eventSources; | 122 CFX_MapPtrTemplate<void*, uint32_t> m_eventSources; |
127 IFWL_Widget* m_pListener; | 123 IFWL_Widget* m_pListener; |
128 CFWL_NoteDriver* m_pNoteDriver; | 124 CFWL_NoteDriver* m_pNoteDriver; |
129 FX_BOOL m_bInvalid; | 125 FX_BOOL m_bInvalid; |
130 }; | 126 }; |
131 | 127 |
132 class CFWL_ToolTipContainer { | 128 class CFWL_ToolTipContainer { |
133 public: | 129 public: |
134 static CFWL_ToolTipContainer* getInstance(); | 130 static CFWL_ToolTipContainer* getInstance(); |
135 static void DeleteInstance(); | 131 static void DeleteInstance(); |
136 | 132 |
(...skipping 13 matching lines...) Expand all Loading... |
150 IFWL_ToolTipTarget* pCurTarget; | 146 IFWL_ToolTipTarget* pCurTarget; |
151 CFWL_ToolTipImp* m_pToolTipImp; | 147 CFWL_ToolTipImp* m_pToolTipImp; |
152 CFWL_CoreToolTipDP* m_ToolTipDp; | 148 CFWL_CoreToolTipDP* m_ToolTipDp; |
153 CFX_PtrArray m_arrWidget; | 149 CFX_PtrArray m_arrWidget; |
154 | 150 |
155 private: | 151 private: |
156 static CFWL_ToolTipContainer* s_pInstance; | 152 static CFWL_ToolTipContainer* s_pInstance; |
157 }; | 153 }; |
158 | 154 |
159 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ | 155 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ |
OLD | NEW |