OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_INCLUDE_FWL_BASEWIDGET_FWL_TOOLTIPCTRL_H_ | |
8 #define XFA_INCLUDE_FWL_BASEWIDGET_FWL_TOOLTIPCTRL_H_ | |
9 | |
10 #include "xfa/include/fwl/core/fwl_form.h" | |
11 | |
12 class CFWL_WidgetImpProperties; | |
13 class IFWL_ToolTip; | |
14 | |
15 #define FWL_CLASS_ToolTip L"FWL_TOOLTIP" | |
16 #define FWL_CLASSHASH_ToolTip 1111984755 | |
17 #define FWL_STYLEEXT_TTP_Rectangle (0L << 3) | |
18 #define FWL_STYLEEXT_TTP_RoundCorner (1L << 3) | |
19 #define FWL_STYLEEXT_TTP_Balloon (1L << 4) | |
20 #define FWL_STYLEEXT_TTP_Multiline (1L << 5) | |
21 #define FWL_STYLEEXT_TTP_NoAnchor (1L << 6) | |
22 #define FWL_PART_TTP_Border 1 | |
23 #define FWL_PART_TTP_Background 2 | |
24 #define FWL_PART_TTP_Caption 3 | |
25 | |
26 class IFWL_ToolTipDP : public IFWL_DataProvider { | |
27 public: | |
28 virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, | |
29 CFX_WideString& wsCaption) = 0; | |
30 virtual int32_t GetInitialDelay(IFWL_Widget* pWidget) = 0; | |
31 virtual int32_t GetAutoPopDelay(IFWL_Widget* pWidget) = 0; | |
32 virtual CFX_DIBitmap* GetToolTipIcon(IFWL_Widget* pWidget) = 0; | |
33 virtual CFX_SizeF GetToolTipIconSize(IFWL_Widget* pWidget) = 0; | |
34 }; | |
35 class IFWL_ToolTip : public IFWL_Form { | |
36 public: | |
37 static IFWL_ToolTip* Create(const CFWL_WidgetImpProperties& properties, | |
38 IFWL_Widget* pOuter); | |
39 | |
40 FWL_ERR SetAnchor(const CFX_RectF& rtAnchor); | |
41 FWL_ERR Show(); | |
42 FWL_ERR Hide(); | |
43 | |
44 protected: | |
45 IFWL_ToolTip(); | |
46 }; | |
47 | |
48 #endif // XFA_INCLUDE_FWL_BASEWIDGET_FWL_TOOLTIPCTRL_H_ | |
OLD | NEW |