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> |
(...skipping 11 matching lines...) Expand all Loading... |
22 class CFWL_MsgDeactivate; | 22 class CFWL_MsgDeactivate; |
23 class CFWL_MsgDropFiles; | 23 class CFWL_MsgDropFiles; |
24 class CFWL_MsgKey; | 24 class CFWL_MsgKey; |
25 class CFWL_MsgKillFocus; | 25 class CFWL_MsgKillFocus; |
26 class CFWL_MsgMouse; | 26 class CFWL_MsgMouse; |
27 class CFWL_MsgMouseWheel; | 27 class CFWL_MsgMouseWheel; |
28 class CFWL_MsgSetFocus; | 28 class CFWL_MsgSetFocus; |
29 class CFWL_MsgSize; | 29 class CFWL_MsgSize; |
30 class CFWL_MsgWindowMove; | 30 class CFWL_MsgWindowMove; |
31 class CFWL_TargetImp; | 31 class CFWL_TargetImp; |
32 class CFWL_ToolTipImp; | 32 class IFWL_ToolTip; |
33 class CFWL_WidgetImp; | 33 class IFWL_Widget; |
34 | 34 |
35 class CFWL_NoteLoop { | 35 class CFWL_NoteLoop { |
36 public: | 36 public: |
37 CFWL_NoteLoop(CFWL_WidgetImp* pForm = nullptr); | 37 CFWL_NoteLoop(IFWL_Widget* pForm = nullptr); |
38 ~CFWL_NoteLoop() {} | 38 ~CFWL_NoteLoop() {} |
39 | 39 |
40 FWL_Error Idle(int32_t count); | 40 FWL_Error Idle(int32_t count); |
41 CFWL_WidgetImp* GetForm(); | 41 IFWL_Widget* GetForm(); |
42 FX_BOOL ContinueModal(); | 42 FX_BOOL ContinueModal(); |
43 FWL_Error EndModalLoop(); | 43 FWL_Error EndModalLoop(); |
44 FWL_Error SetMainForm(CFWL_WidgetImp* pForm); | 44 FWL_Error SetMainForm(IFWL_Widget* pForm); |
45 | 45 |
46 protected: | 46 protected: |
47 void GenerateCommondEvent(uint32_t dwCommand); | 47 void GenerateCommondEvent(uint32_t dwCommand); |
48 | 48 |
49 CFWL_WidgetImp* m_pForm; | 49 IFWL_Widget* m_pForm; |
50 FX_BOOL m_bContinueModal; | 50 FX_BOOL m_bContinueModal; |
51 }; | 51 }; |
52 | 52 |
53 class CFWL_NoteDriver { | 53 class CFWL_NoteDriver { |
54 public: | 54 public: |
55 CFWL_NoteDriver(); | 55 CFWL_NoteDriver(); |
56 ~CFWL_NoteDriver(); | 56 ~CFWL_NoteDriver(); |
57 | 57 |
58 void SendEvent(CFWL_Event* pNote); | 58 void SendEvent(CFWL_Event* pNote); |
59 FWL_Error RegisterEventTarget(IFWL_Widget* pListener, | 59 FWL_Error RegisterEventTarget(IFWL_Widget* pListener, |
60 IFWL_Widget* pEventSource = nullptr, | 60 IFWL_Widget* pEventSource = nullptr, |
61 uint32_t dwFilter = FWL_EVENT_ALL_MASK); | 61 uint32_t dwFilter = FWL_EVENT_ALL_MASK); |
62 FWL_Error UnregisterEventTarget(IFWL_Widget* pListener); | 62 FWL_Error UnregisterEventTarget(IFWL_Widget* pListener); |
63 void ClearEventTargets(FX_BOOL bRemoveAll); | 63 void ClearEventTargets(FX_BOOL bRemoveAll); |
64 IFWL_App* GetOwnerApp() const; | 64 IFWL_App* GetOwnerApp() const; |
65 FWL_Error PushNoteLoop(CFWL_NoteLoop* pNoteLoop); | 65 FWL_Error PushNoteLoop(CFWL_NoteLoop* pNoteLoop); |
66 CFWL_NoteLoop* PopNoteLoop(); | 66 CFWL_NoteLoop* PopNoteLoop(); |
67 IFWL_Widget* GetFocus(); | 67 IFWL_Widget* GetFocus(); |
68 FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE); | 68 FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE); |
69 void SetGrab(IFWL_Widget* pGrab, FX_BOOL bSet); | 69 void SetGrab(IFWL_Widget* pGrab, FX_BOOL bSet); |
70 FWL_Error Run(); | 70 FWL_Error Run(); |
71 | 71 |
72 IFWL_Widget* GetHover(); | 72 IFWL_Widget* GetHover(); |
73 void SetHover(IFWL_Widget* pHover); | 73 void SetHover(IFWL_Widget* pHover); |
74 void NotifyTargetHide(IFWL_Widget* pNoteTarget); | 74 void NotifyTargetHide(IFWL_Widget* pNoteTarget); |
75 void NotifyTargetDestroy(IFWL_Widget* pNoteTarget); | 75 void NotifyTargetDestroy(IFWL_Widget* pNoteTarget); |
76 FWL_Error RegisterForm(CFWL_WidgetImp* pForm); | 76 FWL_Error RegisterForm(IFWL_Widget* pForm); |
77 FWL_Error UnRegisterForm(CFWL_WidgetImp* pForm); | 77 FWL_Error UnRegisterForm(IFWL_Widget* pForm); |
78 FX_BOOL QueueMessage(CFWL_Message* pMessage); | 78 FX_BOOL QueueMessage(CFWL_Message* pMessage); |
79 FX_BOOL UnqueueMessage(CFWL_NoteLoop* pNoteLoop); | 79 FX_BOOL UnqueueMessage(CFWL_NoteLoop* pNoteLoop); |
80 CFWL_NoteLoop* GetTopLoop(); | 80 CFWL_NoteLoop* GetTopLoop(); |
81 int32_t CountLoop(); | 81 int32_t CountLoop(); |
82 FX_BOOL ProcessMessage(CFWL_Message* pMessage); | 82 FX_BOOL ProcessMessage(CFWL_Message* pMessage); |
83 | 83 |
84 protected: | 84 protected: |
85 FX_BOOL DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm); | 85 FX_BOOL DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm); |
86 FX_BOOL DoActivate(CFWL_MsgActivate* pMsg, IFWL_Widget* pMessageForm); | 86 FX_BOOL DoActivate(CFWL_MsgActivate* pMsg, IFWL_Widget* pMessageForm); |
87 FX_BOOL DoDeactivate(CFWL_MsgDeactivate* pMsg, IFWL_Widget* pMessageForm); | 87 FX_BOOL DoDeactivate(CFWL_MsgDeactivate* pMsg, IFWL_Widget* pMessageForm); |
88 FX_BOOL DoSetFocus(CFWL_MsgSetFocus* pMsg, IFWL_Widget* pMessageForm); | 88 FX_BOOL DoSetFocus(CFWL_MsgSetFocus* pMsg, IFWL_Widget* pMessageForm); |
89 FX_BOOL DoKillFocus(CFWL_MsgKillFocus* pMsg, IFWL_Widget* pMessageForm); | 89 FX_BOOL DoKillFocus(CFWL_MsgKillFocus* pMsg, IFWL_Widget* pMessageForm); |
90 FX_BOOL DoKey(CFWL_MsgKey* pMsg, IFWL_Widget* pMessageForm); | 90 FX_BOOL DoKey(CFWL_MsgKey* pMsg, IFWL_Widget* pMessageForm); |
91 FX_BOOL DoMouse(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm); | 91 FX_BOOL DoMouse(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm); |
92 FX_BOOL DoWheel(CFWL_MsgMouseWheel* pMsg, IFWL_Widget* pMessageForm); | 92 FX_BOOL DoWheel(CFWL_MsgMouseWheel* pMsg, IFWL_Widget* pMessageForm); |
93 FX_BOOL DoSize(CFWL_MsgSize* pMsg); | 93 FX_BOOL DoSize(CFWL_MsgSize* pMsg); |
94 FX_BOOL DoWindowMove(CFWL_MsgWindowMove* pMsg, IFWL_Widget* pMessageForm); | 94 FX_BOOL DoWindowMove(CFWL_MsgWindowMove* pMsg, IFWL_Widget* pMessageForm); |
95 FX_BOOL DoDragFiles(CFWL_MsgDropFiles* pMsg, IFWL_Widget* pMessageForm); | 95 FX_BOOL DoDragFiles(CFWL_MsgDropFiles* pMsg, IFWL_Widget* pMessageForm); |
96 FX_BOOL DoMouseEx(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm); | 96 FX_BOOL DoMouseEx(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm); |
97 void MouseSecondary(CFWL_MsgMouse* pMsg); | 97 void MouseSecondary(CFWL_MsgMouse* pMsg); |
98 FX_BOOL IsValidMessage(CFWL_Message* pMessage); | 98 FX_BOOL IsValidMessage(CFWL_Message* pMessage); |
99 IFWL_Widget* GetMessageForm(IFWL_Widget* pDstTarget); | 99 IFWL_Widget* GetMessageForm(IFWL_Widget* pDstTarget); |
100 void ClearInvalidEventTargets(FX_BOOL bRemoveAll); | 100 void ClearInvalidEventTargets(FX_BOOL bRemoveAll); |
101 | 101 |
102 CFX_ArrayTemplate<CFWL_WidgetImp*> m_forms; | 102 CFX_ArrayTemplate<IFWL_Widget*> m_forms; |
103 CFX_ArrayTemplate<CFWL_Message*> m_noteQueue; | 103 CFX_ArrayTemplate<CFWL_Message*> m_noteQueue; |
104 CFX_ArrayTemplate<CFWL_NoteLoop*> m_noteLoopQueue; | 104 CFX_ArrayTemplate<CFWL_NoteLoop*> m_noteLoopQueue; |
105 std::unordered_map<uint32_t, CFWL_EventTarget*> m_eventTargets; | 105 std::unordered_map<uint32_t, CFWL_EventTarget*> m_eventTargets; |
106 IFWL_Widget* m_pHover; | 106 IFWL_Widget* m_pHover; |
107 IFWL_Widget* m_pFocus; | 107 IFWL_Widget* m_pFocus; |
108 IFWL_Widget* m_pGrab; | 108 IFWL_Widget* m_pGrab; |
109 std::unique_ptr<CFWL_NoteLoop> m_pNoteLoop; | 109 std::unique_ptr<CFWL_NoteLoop> m_pNoteLoop; |
110 }; | 110 }; |
111 | 111 |
112 class CFWL_EventTarget { | 112 class CFWL_EventTarget { |
(...skipping 17 matching lines...) Expand all Loading... |
130 | 130 |
131 class CFWL_ToolTipContainer final { | 131 class CFWL_ToolTipContainer final { |
132 public: | 132 public: |
133 static CFWL_ToolTipContainer* getInstance(); | 133 static CFWL_ToolTipContainer* getInstance(); |
134 static void DeleteInstance(); | 134 static void DeleteInstance(); |
135 | 135 |
136 protected: | 136 protected: |
137 CFWL_ToolTipContainer(); | 137 CFWL_ToolTipContainer(); |
138 ~CFWL_ToolTipContainer(); | 138 ~CFWL_ToolTipContainer(); |
139 | 139 |
140 CFWL_ToolTipImp* m_pToolTipImp; | 140 IFWL_ToolTip* m_pToolTipImp; |
141 std::unique_ptr<CFWL_CoreToolTipDP> m_pToolTipDp; | 141 std::unique_ptr<CFWL_CoreToolTipDP> m_pToolTipDp; |
142 | 142 |
143 private: | 143 private: |
144 static CFWL_ToolTipContainer* s_pInstance; | 144 static CFWL_ToolTipContainer* s_pInstance; |
145 }; | 145 }; |
146 | 146 |
147 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ | 147 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ |
OLD | NEW |