| 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_BASEWIDGET_IFWL_TOOLTIP_H_ | 7 #ifndef XFA_FWL_BASEWIDGET_IFWL_TOOLTIP_H_ |
| 8 #define XFA_FWL_BASEWIDGET_IFWL_TOOLTIP_H_ | 8 #define XFA_FWL_BASEWIDGET_IFWL_TOOLTIP_H_ |
| 9 | 9 |
| 10 #include "xfa/fwl/core/ifwl_form.h" | 10 #include "xfa/fwl/core/ifwl_form.h" |
| 11 | 11 |
| 12 class CFWL_WidgetImpProperties; | 12 class CFWL_WidgetImpProperties; |
| 13 class IFWL_ToolTip; | 13 class IFWL_ToolTip; |
| 14 | 14 |
| 15 #define FWL_CLASS_ToolTip L"FWL_TOOLTIP" | 15 #define FWL_CLASS_ToolTip L"FWL_TOOLTIP" |
| 16 #define FWL_STYLEEXT_TTP_Rectangle (0L << 3) | 16 #define FWL_STYLEEXT_TTP_Rectangle (0L << 3) |
| 17 #define FWL_STYLEEXT_TTP_RoundCorner (1L << 3) | 17 #define FWL_STYLEEXT_TTP_RoundCorner (1L << 3) |
| 18 #define FWL_STYLEEXT_TTP_Balloon (1L << 4) | 18 #define FWL_STYLEEXT_TTP_Balloon (1L << 4) |
| 19 #define FWL_STYLEEXT_TTP_Multiline (1L << 5) | 19 #define FWL_STYLEEXT_TTP_Multiline (1L << 5) |
| 20 #define FWL_STYLEEXT_TTP_NoAnchor (1L << 6) | 20 #define FWL_STYLEEXT_TTP_NoAnchor (1L << 6) |
| 21 | 21 |
| 22 class IFWL_ToolTipDP : public IFWL_DataProvider { | 22 class IFWL_ToolTipDP : public IFWL_DataProvider { |
| 23 public: | 23 public: |
| 24 virtual FWL_Error GetCaption(IFWL_Widget* pWidget, | 24 // IFWL_DataProvider |
| 25 CFX_WideString& wsCaption) = 0; | 25 FWL_Error GetCaption(IFWL_Widget* pWidget, |
| 26 CFX_WideString& wsCaption) override = 0; |
| 27 |
| 26 virtual int32_t GetInitialDelay(IFWL_Widget* pWidget) = 0; | 28 virtual int32_t GetInitialDelay(IFWL_Widget* pWidget) = 0; |
| 27 virtual int32_t GetAutoPopDelay(IFWL_Widget* pWidget) = 0; | 29 virtual int32_t GetAutoPopDelay(IFWL_Widget* pWidget) = 0; |
| 28 virtual CFX_DIBitmap* GetToolTipIcon(IFWL_Widget* pWidget) = 0; | 30 virtual CFX_DIBitmap* GetToolTipIcon(IFWL_Widget* pWidget) = 0; |
| 29 virtual CFX_SizeF GetToolTipIconSize(IFWL_Widget* pWidget) = 0; | 31 virtual CFX_SizeF GetToolTipIconSize(IFWL_Widget* pWidget) = 0; |
| 30 }; | 32 }; |
| 31 | 33 |
| 32 class IFWL_ToolTip : public IFWL_Form { | 34 class IFWL_ToolTip : public IFWL_Form { |
| 33 public: | 35 public: |
| 34 static IFWL_ToolTip* Create(const CFWL_WidgetImpProperties& properties, | 36 static IFWL_ToolTip* Create(const CFWL_WidgetImpProperties& properties, |
| 35 IFWL_Widget* pOuter); | 37 IFWL_Widget* pOuter); |
| 36 | 38 |
| 37 void SetAnchor(const CFX_RectF& rtAnchor); | 39 void SetAnchor(const CFX_RectF& rtAnchor); |
| 38 void Show(); | 40 void Show(); |
| 39 void Hide(); | 41 void Hide(); |
| 40 | 42 |
| 41 protected: | 43 protected: |
| 42 IFWL_ToolTip(); | 44 IFWL_ToolTip(); |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 #endif // XFA_FWL_BASEWIDGET_IFWL_TOOLTIP_H_ | 47 #endif // XFA_FWL_BASEWIDGET_IFWL_TOOLTIP_H_ |
| OLD | NEW |