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/fwl_error.h" | 15 #include "xfa/fwl/core/fwl_error.h" |
| 16 #include "xfa/fwl/core/ifwl_tooltip.h" |
16 #include "xfa/fwl/core/ifwl_widget.h" | 17 #include "xfa/fwl/core/ifwl_widget.h" |
17 #include "xfa/fxgraphics/cfx_graphics.h" | 18 #include "xfa/fxgraphics/cfx_graphics.h" |
18 | 19 |
19 class CFWL_CoreToolTipDP; | |
20 class CFWL_EventTarget; | 20 class CFWL_EventTarget; |
21 class CFWL_MsgActivate; | 21 class CFWL_MsgActivate; |
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; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 bool IsInvalid() { return m_bInvalid; } | 120 bool IsInvalid() { return m_bInvalid; } |
121 void FlagInvalid() { m_bInvalid = true; } | 121 void FlagInvalid() { m_bInvalid = true; } |
122 | 122 |
123 protected: | 123 protected: |
124 CFX_MapPtrTemplate<void*, uint32_t> m_eventSources; | 124 CFX_MapPtrTemplate<void*, uint32_t> m_eventSources; |
125 IFWL_Widget* m_pListener; | 125 IFWL_Widget* m_pListener; |
126 CFWL_NoteDriver* m_pNoteDriver; | 126 CFWL_NoteDriver* m_pNoteDriver; |
127 bool m_bInvalid; | 127 bool m_bInvalid; |
128 }; | 128 }; |
129 | 129 |
130 class CFWL_ToolTipContainer final { | 130 class CFWL_ToolTipContainer final : public IFWL_ToolTipDP { |
131 public: | 131 public: |
132 static CFWL_ToolTipContainer* getInstance(); | 132 static CFWL_ToolTipContainer* getInstance(); |
133 static void DeleteInstance(); | 133 static void DeleteInstance(); |
134 | 134 |
| 135 // IFWL_ToolTipDP |
| 136 FWL_Error GetCaption(IFWL_Widget* pWidget, |
| 137 CFX_WideString& wsCaption) override; |
| 138 int32_t GetInitialDelay(IFWL_Widget* pWidget) override; |
| 139 int32_t GetAutoPopDelay(IFWL_Widget* pWidget) override; |
| 140 CFX_DIBitmap* GetToolTipIcon(IFWL_Widget* pWidget) override; |
| 141 CFX_SizeF GetToolTipIconSize(IFWL_Widget* pWidget) override; |
| 142 |
135 protected: | 143 protected: |
136 CFWL_ToolTipContainer(); | 144 CFWL_ToolTipContainer(); |
137 ~CFWL_ToolTipContainer(); | 145 ~CFWL_ToolTipContainer() override; |
138 | 146 |
139 std::unique_ptr<CFWL_CoreToolTipDP> m_pToolTipDp; | 147 CFX_RectF GetAnchor(); |
140 | 148 |
141 private: | 149 private: |
142 static CFWL_ToolTipContainer* s_pInstance; | 150 static CFWL_ToolTipContainer* s_pInstance; |
| 151 CFX_WideString m_wsCaption; |
| 152 int32_t m_nInitDelayTime; |
| 153 int32_t m_nAutoPopDelayTime; |
| 154 CFX_RectF m_fAnchor; |
143 }; | 155 }; |
144 | 156 |
145 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ | 157 #endif // XFA_FWL_CORE_FWL_NOTEIMP_H_ |
OLD | NEW |