| 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 if (iTrackLoop <= 0) | 419 if (iTrackLoop <= 0) |
| 420 return FALSE; | 420 return FALSE; |
| 421 if (iTrackLoop == 1) { | 421 if (iTrackLoop == 1) { |
| 422 if (pMessageForm->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) { | 422 if (pMessageForm->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) { |
| 423 return FALSE; | 423 return FALSE; |
| 424 } | 424 } |
| 425 if (pMsg->m_pSrcTarget && | 425 if (pMsg->m_pSrcTarget && |
| 426 pMsg->m_pSrcTarget->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) { | 426 pMsg->m_pSrcTarget->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) { |
| 427 return FALSE; | 427 return FALSE; |
| 428 } | 428 } |
| 429 if (pMsg->m_pSrcTarget && pMsg->m_pSrcTarget->GetClassID() == 1111984755) { | 429 if (pMsg->m_pSrcTarget && |
| 430 pMsg->m_pSrcTarget->GetClassID() == FWL_Type::ToolTip) { |
| 430 return FALSE; | 431 return FALSE; |
| 431 } | 432 } |
| 432 return TRUE; | 433 return TRUE; |
| 433 } | 434 } |
| 434 IFWL_Widget* pDst = pMsg->m_pDstTarget; | 435 IFWL_Widget* pDst = pMsg->m_pDstTarget; |
| 435 if (!pDst) | 436 if (!pDst) |
| 436 return FALSE; | 437 return FALSE; |
| 437 #if (_FX_OS_ == _FX_MACOSX_) | 438 #if (_FX_OS_ == _FX_MACOSX_) |
| 438 if (pDst == pMessageForm && pDst->IsInstance(L"FWL_FORMPROXY")) { | 439 if (pDst == pMessageForm && pDst->IsInstance(L"FWL_FORMPROXY")) { |
| 439 return TRUE; | 440 return TRUE; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 return; | 610 return; |
| 610 } | 611 } |
| 611 if (m_pHover) { | 612 if (m_pHover) { |
| 612 CFWL_MsgMouse msLeave; | 613 CFWL_MsgMouse msLeave; |
| 613 msLeave.m_pDstTarget = m_pHover; | 614 msLeave.m_pDstTarget = m_pHover; |
| 614 msLeave.m_fx = pMsg->m_fx; | 615 msLeave.m_fx = pMsg->m_fx; |
| 615 msLeave.m_fy = pMsg->m_fy; | 616 msLeave.m_fy = pMsg->m_fy; |
| 616 pTarget->TransformTo(m_pHover, msLeave.m_fx, msLeave.m_fy); | 617 pTarget->TransformTo(m_pHover, msLeave.m_fx, msLeave.m_fy); |
| 617 msLeave.m_dwFlags = 0; | 618 msLeave.m_dwFlags = 0; |
| 618 msLeave.m_dwCmd = FWL_MouseCommand::Leave; | 619 msLeave.m_dwCmd = FWL_MouseCommand::Leave; |
| 619 DispatchMessage(&msLeave, NULL); | 620 DispatchMessage(&msLeave, nullptr); |
| 620 } | 621 } |
| 621 if (pTarget->GetClassID() == FWL_CLASSHASH_Form) { | 622 if (pTarget->GetClassID() == FWL_Type::Form) { |
| 622 m_pHover = NULL; | 623 m_pHover = nullptr; |
| 623 return; | 624 return; |
| 624 } | 625 } |
| 625 m_pHover = pTarget; | 626 m_pHover = pTarget; |
| 626 CFWL_MsgMouse msHover; | 627 CFWL_MsgMouse msHover; |
| 627 msHover.m_pDstTarget = pTarget; | 628 msHover.m_pDstTarget = pTarget; |
| 628 msHover.m_fx = pMsg->m_fx; | 629 msHover.m_fx = pMsg->m_fx; |
| 629 msHover.m_fy = pMsg->m_fy; | 630 msHover.m_fy = pMsg->m_fy; |
| 630 msHover.m_dwFlags = 0; | 631 msHover.m_dwFlags = 0; |
| 631 msHover.m_dwCmd = FWL_MouseCommand::Hover; | 632 msHover.m_dwCmd = FWL_MouseCommand::Hover; |
| 632 DispatchMessage(&msHover, NULL); | 633 DispatchMessage(&msHover, nullptr); |
| 633 } | 634 } |
| 634 FX_BOOL CFWL_NoteDriver::IsValidMessage(CFWL_Message* pMessage) { | 635 FX_BOOL CFWL_NoteDriver::IsValidMessage(CFWL_Message* pMessage) { |
| 635 if (pMessage->GetClassID() == CFWL_MessageType::Post) | 636 if (pMessage->GetClassID() == CFWL_MessageType::Post) |
| 636 return TRUE; | 637 return TRUE; |
| 637 | 638 |
| 638 int32_t iCount = m_noteLoopQueue.GetSize(); | 639 int32_t iCount = m_noteLoopQueue.GetSize(); |
| 639 for (int32_t i = 0; i < iCount; i++) { | 640 for (int32_t i = 0; i < iCount; i++) { |
| 640 CFWL_NoteLoop* pNoteLoop = static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[i]); | 641 CFWL_NoteLoop* pNoteLoop = static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[i]); |
| 641 CFWL_WidgetImp* pForm = pNoteLoop->GetForm(); | 642 CFWL_WidgetImp* pForm = pNoteLoop->GetForm(); |
| 642 if (pForm && (pForm->GetInterface() == pMessage->m_pDstTarget)) | 643 if (pForm && (pForm->GetInterface() == pMessage->m_pDstTarget)) |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 if (HasToolTip(pEvt->m_pDstTarget) && NULL != m_pToolTipImp) { | 906 if (HasToolTip(pEvt->m_pDstTarget) && NULL != m_pToolTipImp) { |
| 906 m_pToolTipImp->Hide(); | 907 m_pToolTipImp->Hide(); |
| 907 pCurTarget = NULL; | 908 pCurTarget = NULL; |
| 908 return TRUE; | 909 return TRUE; |
| 909 } | 910 } |
| 910 return FALSE; | 911 return FALSE; |
| 911 } | 912 } |
| 912 IFWL_ToolTipTarget* CFWL_ToolTipContainer::GetCurrentToolTipTarget() { | 913 IFWL_ToolTipTarget* CFWL_ToolTipContainer::GetCurrentToolTipTarget() { |
| 913 return pCurTarget; | 914 return pCurTarget; |
| 914 } | 915 } |
| OLD | NEW |