| 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 "xfa/fwl/core/fwl_noteimp.h" | 7 #include "xfa/fwl/core/fwl_noteimp.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
| 10 #include "xfa/fwl/basewidget/fwl_tooltipctrlimp.h" | 10 #include "xfa/fwl/basewidget/fwl_tooltipctrlimp.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 if (iTrackLoop <= 0) | 463 if (iTrackLoop <= 0) |
| 464 return FALSE; | 464 return FALSE; |
| 465 if (iTrackLoop == 1) { | 465 if (iTrackLoop == 1) { |
| 466 if (pMessageForm->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) { | 466 if (pMessageForm->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) { |
| 467 return FALSE; | 467 return FALSE; |
| 468 } | 468 } |
| 469 if (pMsg->m_pSrcTarget && | 469 if (pMsg->m_pSrcTarget && |
| 470 pMsg->m_pSrcTarget->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) { | 470 pMsg->m_pSrcTarget->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) { |
| 471 return FALSE; | 471 return FALSE; |
| 472 } | 472 } |
| 473 if (pMsg->m_pSrcTarget && pMsg->m_pSrcTarget->GetClassID() == 1111984755) { | 473 if (pMsg->m_pSrcTarget && |
| 474 pMsg->m_pSrcTarget->GetClassID() == FWL_Type::ToolTip) { |
| 474 return FALSE; | 475 return FALSE; |
| 475 } | 476 } |
| 476 return TRUE; | 477 return TRUE; |
| 477 } | 478 } |
| 478 IFWL_Widget* pDst = pMsg->m_pDstTarget; | 479 IFWL_Widget* pDst = pMsg->m_pDstTarget; |
| 479 if (!pDst) | 480 if (!pDst) |
| 480 return FALSE; | 481 return FALSE; |
| 481 #if (_FX_OS_ == _FX_MACOSX_) | 482 #if (_FX_OS_ == _FX_MACOSX_) |
| 482 if (pDst == pMessageForm && pDst->IsInstance(L"FWL_FORMPROXY")) { | 483 if (pDst == pMessageForm && pDst->IsInstance(L"FWL_FORMPROXY")) { |
| 483 return TRUE; | 484 return TRUE; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 return; | 654 return; |
| 654 } | 655 } |
| 655 if (m_pHover) { | 656 if (m_pHover) { |
| 656 CFWL_MsgMouse msLeave; | 657 CFWL_MsgMouse msLeave; |
| 657 msLeave.m_pDstTarget = m_pHover; | 658 msLeave.m_pDstTarget = m_pHover; |
| 658 msLeave.m_fx = pMsg->m_fx; | 659 msLeave.m_fx = pMsg->m_fx; |
| 659 msLeave.m_fy = pMsg->m_fy; | 660 msLeave.m_fy = pMsg->m_fy; |
| 660 pTarget->TransformTo(m_pHover, msLeave.m_fx, msLeave.m_fy); | 661 pTarget->TransformTo(m_pHover, msLeave.m_fx, msLeave.m_fy); |
| 661 msLeave.m_dwFlags = 0; | 662 msLeave.m_dwFlags = 0; |
| 662 msLeave.m_dwCmd = FWL_MSGMOUSECMD_MouseLeave; | 663 msLeave.m_dwCmd = FWL_MSGMOUSECMD_MouseLeave; |
| 663 DispatchMessage(&msLeave, NULL); | 664 DispatchMessage(&msLeave, nullptr); |
| 664 } | 665 } |
| 665 if (pTarget->GetClassID() == FWL_CLASSHASH_Form) { | 666 if (pTarget->GetClassID() == FWL_Type::Form) { |
| 666 m_pHover = NULL; | 667 m_pHover = nullptr; |
| 667 return; | 668 return; |
| 668 } | 669 } |
| 669 m_pHover = pTarget; | 670 m_pHover = pTarget; |
| 670 CFWL_MsgMouse msHover; | 671 CFWL_MsgMouse msHover; |
| 671 msHover.m_pDstTarget = pTarget; | 672 msHover.m_pDstTarget = pTarget; |
| 672 msHover.m_fx = pMsg->m_fx; | 673 msHover.m_fx = pMsg->m_fx; |
| 673 msHover.m_fy = pMsg->m_fy; | 674 msHover.m_fy = pMsg->m_fy; |
| 674 msHover.m_dwFlags = 0; | 675 msHover.m_dwFlags = 0; |
| 675 msHover.m_dwCmd = FWL_MSGMOUSECMD_MouseHover; | 676 msHover.m_dwCmd = FWL_MSGMOUSECMD_MouseHover; |
| 676 DispatchMessage(&msHover, NULL); | 677 DispatchMessage(&msHover, nullptr); |
| 677 } | 678 } |
| 678 FX_BOOL CFWL_NoteDriver::IsValidMessage(CFWL_Message* pMessage) { | 679 FX_BOOL CFWL_NoteDriver::IsValidMessage(CFWL_Message* pMessage) { |
| 679 if (pMessage->GetClassID() == CFWL_MessageType::Post) | 680 if (pMessage->GetClassID() == CFWL_MessageType::Post) |
| 680 return TRUE; | 681 return TRUE; |
| 681 | 682 |
| 682 int32_t iCount = m_noteLoopQueue.GetSize(); | 683 int32_t iCount = m_noteLoopQueue.GetSize(); |
| 683 for (int32_t i = 0; i < iCount; i++) { | 684 for (int32_t i = 0; i < iCount; i++) { |
| 684 CFWL_NoteLoop* pNoteLoop = static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[i]); | 685 CFWL_NoteLoop* pNoteLoop = static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[i]); |
| 685 CFWL_WidgetImp* pForm = pNoteLoop->GetForm(); | 686 CFWL_WidgetImp* pForm = pNoteLoop->GetForm(); |
| 686 if (pForm && (pForm->GetInterface() == pMessage->m_pDstTarget)) | 687 if (pForm && (pForm->GetInterface() == pMessage->m_pDstTarget)) |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 if (HasToolTip(pEvt->m_pDstTarget) && NULL != m_pToolTipImp) { | 969 if (HasToolTip(pEvt->m_pDstTarget) && NULL != m_pToolTipImp) { |
| 969 m_pToolTipImp->Hide(); | 970 m_pToolTipImp->Hide(); |
| 970 pCurTarget = NULL; | 971 pCurTarget = NULL; |
| 971 return TRUE; | 972 return TRUE; |
| 972 } | 973 } |
| 973 return FALSE; | 974 return FALSE; |
| 974 } | 975 } |
| 975 IFWL_ToolTipTarget* CFWL_ToolTipContainer::GetCurrentToolTipTarget() { | 976 IFWL_ToolTipTarget* CFWL_ToolTipContainer::GetCurrentToolTipTarget() { |
| 976 return pCurTarget; | 977 return pCurTarget; |
| 977 } | 978 } |
| OLD | NEW |