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/cfwl_event.h" | 10 #include "xfa/fwl/core/cfwl_event.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 class CFWL_TargetImp; | 37 class CFWL_TargetImp; |
38 class CFWL_ToolTipImp; | 38 class CFWL_ToolTipImp; |
39 class CFWL_WidgetImp; | 39 class CFWL_WidgetImp; |
40 class IFWL_ToolTipTarget; | 40 class IFWL_ToolTipTarget; |
41 | 41 |
42 class CFWL_NoteLoop { | 42 class CFWL_NoteLoop { |
43 public: | 43 public: |
44 CFWL_NoteLoop(CFWL_WidgetImp* pForm = nullptr); | 44 CFWL_NoteLoop(CFWL_WidgetImp* pForm = nullptr); |
45 ~CFWL_NoteLoop() {} | 45 ~CFWL_NoteLoop() {} |
46 | 46 |
47 FWL_ERR Idle(int32_t count); | 47 FWL_Error Idle(int32_t count); |
48 CFWL_WidgetImp* GetForm(); | 48 CFWL_WidgetImp* GetForm(); |
49 FX_BOOL ContinueModal(); | 49 FX_BOOL ContinueModal(); |
50 FWL_ERR EndModalLoop(); | 50 FWL_Error EndModalLoop(); |
51 FWL_ERR SetMainForm(CFWL_WidgetImp* pForm); | 51 FWL_Error SetMainForm(CFWL_WidgetImp* pForm); |
52 | 52 |
53 protected: | 53 protected: |
54 void GenerateCommondEvent(uint32_t dwCommand); | 54 void GenerateCommondEvent(uint32_t dwCommand); |
55 | 55 |
56 CFWL_WidgetImp* m_pForm; | 56 CFWL_WidgetImp* m_pForm; |
57 FX_BOOL m_bContinueModal; | 57 FX_BOOL m_bContinueModal; |
58 }; | 58 }; |
59 | 59 |
60 class CFWL_NoteDriver { | 60 class CFWL_NoteDriver { |
61 public: | 61 public: |
62 CFWL_NoteDriver(); | 62 CFWL_NoteDriver(); |
63 ~CFWL_NoteDriver(); | 63 ~CFWL_NoteDriver(); |
64 | 64 |
65 FX_BOOL SendEvent(CFWL_Event* pNote); | 65 FX_BOOL SendEvent(CFWL_Event* pNote); |
66 FWL_ERR RegisterEventTarget(IFWL_Widget* pListener, | 66 FWL_Error RegisterEventTarget(IFWL_Widget* pListener, |
67 IFWL_Widget* pEventSource = nullptr, | 67 IFWL_Widget* pEventSource = nullptr, |
68 uint32_t dwFilter = FWL_EVENT_ALL_MASK); | 68 uint32_t dwFilter = FWL_EVENT_ALL_MASK); |
69 FWL_ERR UnregisterEventTarget(IFWL_Widget* pListener); | 69 FWL_Error UnregisterEventTarget(IFWL_Widget* pListener); |
70 void ClearEventTargets(FX_BOOL bRemoveAll); | 70 void ClearEventTargets(FX_BOOL bRemoveAll); |
71 IFWL_App* GetOwnerApp() const; | 71 IFWL_App* GetOwnerApp() const; |
72 FWL_ERR PushNoteLoop(CFWL_NoteLoop* pNoteLoop); | 72 FWL_Error PushNoteLoop(CFWL_NoteLoop* pNoteLoop); |
73 CFWL_NoteLoop* PopNoteLoop(); | 73 CFWL_NoteLoop* PopNoteLoop(); |
74 IFWL_Widget* GetFocus(); | 74 IFWL_Widget* GetFocus(); |
75 FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE); | 75 FX_BOOL SetFocus(IFWL_Widget* pFocus, FX_BOOL bNotify = FALSE); |
76 void SetGrab(IFWL_Widget* pGrab, FX_BOOL bSet); | 76 void SetGrab(IFWL_Widget* pGrab, FX_BOOL bSet); |
77 FWL_ERR Run(); | 77 FWL_Error Run(); |
78 | 78 |
79 IFWL_Widget* GetHover(); | 79 IFWL_Widget* GetHover(); |
80 void SetHover(IFWL_Widget* pHover); | 80 void SetHover(IFWL_Widget* pHover); |
81 void NotifyTargetHide(IFWL_Widget* pNoteTarget); | 81 void NotifyTargetHide(IFWL_Widget* pNoteTarget); |
82 void NotifyTargetDestroy(IFWL_Widget* pNoteTarget); | 82 void NotifyTargetDestroy(IFWL_Widget* pNoteTarget); |
83 FWL_ERR RegisterForm(CFWL_WidgetImp* pForm); | 83 FWL_Error RegisterForm(CFWL_WidgetImp* pForm); |
84 FWL_ERR UnRegisterForm(CFWL_WidgetImp* pForm); | 84 FWL_Error UnRegisterForm(CFWL_WidgetImp* pForm); |
85 FX_BOOL QueueMessage(CFWL_Message* pMessage); | 85 FX_BOOL QueueMessage(CFWL_Message* pMessage); |
86 FX_BOOL UnqueueMessage(CFWL_NoteLoop* pNoteLoop); | 86 FX_BOOL UnqueueMessage(CFWL_NoteLoop* pNoteLoop); |
87 CFWL_NoteLoop* GetTopLoop(); | 87 CFWL_NoteLoop* GetTopLoop(); |
88 int32_t CountLoop(); | 88 int32_t CountLoop(); |
89 FX_BOOL ProcessMessage(CFWL_Message* pMessage); | 89 FX_BOOL ProcessMessage(CFWL_Message* pMessage); |
90 | 90 |
91 protected: | 91 protected: |
92 FX_BOOL DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm); | 92 FX_BOOL DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm); |
93 FX_BOOL DoActivate(CFWL_MsgActivate* pMsg, IFWL_Widget* pMessageForm); | 93 FX_BOOL DoActivate(CFWL_MsgActivate* pMsg, IFWL_Widget* pMessageForm); |
94 FX_BOOL DoDeactivate(CFWL_MsgDeactivate* pMsg, IFWL_Widget* pMessageForm); | 94 FX_BOOL DoDeactivate(CFWL_MsgDeactivate* pMsg, IFWL_Widget* pMessageForm); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 IFWL_Widget* m_pListener; | 134 IFWL_Widget* m_pListener; |
135 CFWL_NoteDriver* m_pNoteDriver; | 135 CFWL_NoteDriver* m_pNoteDriver; |
136 FX_BOOL m_bInvalid; | 136 FX_BOOL m_bInvalid; |
137 }; | 137 }; |
138 | 138 |
139 class CFWL_ToolTipContainer { | 139 class CFWL_ToolTipContainer { |
140 public: | 140 public: |
141 static CFWL_ToolTipContainer* getInstance(); | 141 static CFWL_ToolTipContainer* getInstance(); |
142 static void DeleteInstance(); | 142 static void DeleteInstance(); |
143 | 143 |
144 FX_ERR AddToolTipTarget(IFWL_ToolTipTarget* pTarget); | 144 FWL_Error AddToolTipTarget(IFWL_ToolTipTarget* pTarget); |
145 FX_ERR RemoveToolTipTarget(IFWL_ToolTipTarget* pTarget); | 145 FWL_Error RemoveToolTipTarget(IFWL_ToolTipTarget* pTarget); |
146 IFWL_ToolTipTarget* GetCurrentToolTipTarget(); | 146 IFWL_ToolTipTarget* GetCurrentToolTipTarget(); |
147 | 147 |
148 FX_BOOL HasToolTip(IFWL_Widget* pWidget); | 148 FX_BOOL HasToolTip(IFWL_Widget* pWidget); |
149 | 149 |
150 FX_BOOL ProcessEnter(CFWL_EvtMouse* pEvt, IFWL_Widget* pOwner); | 150 FX_BOOL ProcessEnter(CFWL_EvtMouse* pEvt, IFWL_Widget* pOwner); |
151 FX_BOOL ProcessLeave(CFWL_EvtMouse* pEvt); | 151 FX_BOOL ProcessLeave(CFWL_EvtMouse* pEvt); |
152 | 152 |
153 protected: | 153 protected: |
154 CFWL_ToolTipContainer(); | 154 CFWL_ToolTipContainer(); |
155 virtual ~CFWL_ToolTipContainer(); | 155 virtual ~CFWL_ToolTipContainer(); |
156 | 156 |
157 IFWL_ToolTipTarget* pCurTarget; | 157 IFWL_ToolTipTarget* pCurTarget; |
158 CFWL_ToolTipImp* m_pToolTipImp; | 158 CFWL_ToolTipImp* m_pToolTipImp; |
159 CFWL_CoreToolTipDP* m_ToolTipDp; | 159 CFWL_CoreToolTipDP* m_ToolTipDp; |
160 CFX_ArrayTemplate<IFWL_ToolTipTarget*> m_arrWidget; | 160 CFX_ArrayTemplate<IFWL_ToolTipTarget*> m_arrWidget; |
161 | 161 |
162 private: | 162 private: |
163 static CFWL_ToolTipContainer* s_pInstance; | 163 static CFWL_ToolTipContainer* s_pInstance; |
164 }; | 164 }; |
165 | 165 |
166 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ | 166 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ |
OLD | NEW |