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 _FWL_ToolTip_LIGHT_H 8 #define _FWL_ToolTip_LIGHT_H 9 class CFWL_Widget; 10 class CFWL_WidgetProperties; 11 class IFWL_ToolTipDP; 12 class CFWL_ToolTip; 13 class CFWL_ToolTipDP; 14 class CFWL_ToolTip : public CFWL_Widget { 15 public: 16 static CFWL_ToolTip* Create(); 17 FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL); 18 FWL_ERR GetCaption(CFX_WideString& wsCaption); 19 FWL_ERR SetCaption(const CFX_WideStringC& wsCaption); 20 int32_t GetInitialDelay(); 21 int32_t SetInitialDelay(int32_t nDelayTime); 22 int32_t GetAutoPopDelay(); 23 int32_t SetAutoPopDelay(int32_t nDelayTime); 24 CFX_DIBitmap* GetToolTipIcon(); 25 FWL_ERR SetToolTipIcon(CFX_DIBitmap* pBitmap); 26 CFX_SizeF GetToolTipIconSize(); 27 FWL_ERR SetToolTipIconSize(CFX_SizeF fSize); 28 FWL_ERR SetAnchor(const CFX_RectF& rtAnchor); 29 FWL_ERR Show(); 30 FWL_ERR Hide(); 31 CFWL_ToolTip(); 32 virtual ~CFWL_ToolTip(); 33 34 protected: 35 class CFWL_ToolTipDP : public IFWL_ToolTipDP { 36 public: 37 CFWL_ToolTipDP(); 38 FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption); 39 int32_t GetInitialDelay(IFWL_Widget* pWidget); 40 int32_t GetAutoPopDelay(IFWL_Widget* pWidget); 41 CFX_DIBitmap* GetToolTipIcon(IFWL_Widget* pWidget); 42 CFX_SizeF GetToolTipIconSize(IFWL_Widget* pWidget); 43 CFX_RectF GetAnchor(); 44 CFX_WideString m_wsCaption; 45 int32_t m_nInitDelayTime; 46 int32_t m_nAutoPopDelayTime; 47 CFX_DIBitmap* m_pBitmap; 48 CFX_SizeF m_fIconSize; 49 CFX_RectF m_fAnchor; 50 }; 51 CFWL_ToolTipDP m_tooltipData; 52 }; 53 #endif 54