| 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 #include "../../../foxitlib.h" | 7 #include "../../../foxitlib.h" |
| 8 #include "include/fwl_targetimp.h" | 8 #include "include/fwl_targetimp.h" |
| 9 #include "include/fwl_widgetimp.h" | 9 #include "include/fwl_widgetimp.h" |
| 10 #include "include/fwl_widgetmgrimp.h" | 10 #include "include/fwl_widgetmgrimp.h" |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 FX_BOOL CFWL_ToolTipContainer::ProcessEnter(CFWL_EvtMouse* pEvt, | 984 FX_BOOL CFWL_ToolTipContainer::ProcessEnter(CFWL_EvtMouse* pEvt, |
| 985 IFWL_Widget* pOwner) { | 985 IFWL_Widget* pOwner) { |
| 986 if (HasToolTip(pEvt->m_pDstTarget)) { | 986 if (HasToolTip(pEvt->m_pDstTarget)) { |
| 987 if (NULL == m_pToolTipImp) { | 987 if (NULL == m_pToolTipImp) { |
| 988 CFWL_WidgetImpProperties prop; | 988 CFWL_WidgetImpProperties prop; |
| 989 prop.m_pDataProvider = m_ToolTipDp; | 989 prop.m_pDataProvider = m_ToolTipDp; |
| 990 prop.m_pOwner = pOwner; | 990 prop.m_pOwner = pOwner; |
| 991 CFX_RectF rtTooltip; | 991 CFX_RectF rtTooltip; |
| 992 rtTooltip.Set(150, 150, 100, 50); | 992 rtTooltip.Set(150, 150, 100, 50); |
| 993 prop.m_rtWidget = rtTooltip; | 993 prop.m_rtWidget = rtTooltip; |
| 994 m_pToolTipImp = new CFWL_ToolTipImp(prop); | 994 IFWL_ToolTip* pToolTip = IFWL_ToolTip::Create(prop, nullptr); |
| 995 IFWL_ToolTip* pToolTip = new IFWL_ToolTip; | 995 pToolTip->Initialize(); |
| 996 m_pToolTipImp->SetInterface(pToolTip); | 996 m_pToolTipImp = static_cast<CFWL_ToolTipImp*>(pToolTip->GetImpl()); |
| 997 pToolTip->SetImpl(m_pToolTipImp); | |
| 998 m_pToolTipImp->Initialize(); | |
| 999 m_pToolTipImp->ModifyStylesEx(FWL_STYLEEXT_TTP_Multiline, 0); | 997 m_pToolTipImp->ModifyStylesEx(FWL_STYLEEXT_TTP_Multiline, 0); |
| 1000 m_pToolTipImp->SetStates(FWL_WGTSTATE_Invisible, TRUE); | 998 m_pToolTipImp->SetStates(FWL_WGTSTATE_Invisible, TRUE); |
| 1001 } | 999 } |
| 1002 if (pCurTarget->IsShowed()) { | 1000 if (pCurTarget->IsShowed()) { |
| 1003 CFX_WideString wsCaption; | 1001 CFX_WideString wsCaption; |
| 1004 pCurTarget->GetCaption(wsCaption); | 1002 pCurTarget->GetCaption(wsCaption); |
| 1005 if (!wsCaption.IsEmpty()) { | 1003 if (!wsCaption.IsEmpty()) { |
| 1006 m_ToolTipDp->m_wsCaption = wsCaption; | 1004 m_ToolTipDp->m_wsCaption = wsCaption; |
| 1007 } | 1005 } |
| 1008 CFX_RectF rt; | 1006 CFX_RectF rt; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 return NULL; | 1088 return NULL; |
| 1091 return widget->GetInterface(); | 1089 return widget->GetInterface(); |
| 1092 } | 1090 } |
| 1093 FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver, | 1091 FWL_ERR FWL_SetHook(IFWL_NoteDriver* driver, |
| 1094 FWLMessageHookCallback callback, | 1092 FWLMessageHookCallback callback, |
| 1095 void* info) { | 1093 void* info) { |
| 1096 CFWL_NoteDriver* noteDriver = (CFWL_NoteDriver*)driver; | 1094 CFWL_NoteDriver* noteDriver = (CFWL_NoteDriver*)driver; |
| 1097 noteDriver->SetHook(callback, info); | 1095 noteDriver->SetHook(callback, info); |
| 1098 return FWL_ERR_Succeeded; | 1096 return FWL_ERR_Succeeded; |
| 1099 } | 1097 } |
| OLD | NEW |