Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: xfa/fwl/core/fwl_noteimp.cpp

Issue 2004213002: Remove IWFL_WidgetMgr in favor of CFWL_WidgetMgr (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 ms.m_pSrcTarget = pPrev; 165 ms.m_pSrcTarget = pPrev;
166 if (bNotify) { 166 if (bNotify) {
167 ms.m_dwExtend = 1; 167 ms.m_dwExtend = 1;
168 } 168 }
169 IFWL_WidgetDelegate* pDelegate = pPrev->SetDelegate(NULL); 169 IFWL_WidgetDelegate* pDelegate = pPrev->SetDelegate(NULL);
170 if (pDelegate) { 170 if (pDelegate) {
171 pDelegate->OnProcessMessage(&ms); 171 pDelegate->OnProcessMessage(&ms);
172 } 172 }
173 } 173 }
174 if (pFocus) { 174 if (pFocus) {
175 IFWL_Widget* pWidget = 175 IFWL_Widget* pWidget = IFWL_WidgetMgr::GetInstance()->GetWidget(
176 FWL_GetWidgetMgr()->GetWidget(pFocus, FWL_WGTRELATION_SystemForm); 176 pFocus, FWL_WGTRELATION_SystemForm);
177 CFWL_FormImp* pForm = 177 CFWL_FormImp* pForm =
178 pWidget ? static_cast<CFWL_FormImp*>(pWidget->GetImpl()) : nullptr; 178 pWidget ? static_cast<CFWL_FormImp*>(pWidget->GetImpl()) : nullptr;
179 if (pForm) { 179 if (pForm) {
180 CFWL_WidgetImp* pNewFocus = 180 CFWL_WidgetImp* pNewFocus =
181 static_cast<CFWL_WidgetImp*>(pFocus->GetImpl()); 181 static_cast<CFWL_WidgetImp*>(pFocus->GetImpl());
182 pForm->SetSubFocus(pNewFocus); 182 pForm->SetSubFocus(pNewFocus);
183 } 183 }
184 CFWL_MsgSetFocus ms; 184 CFWL_MsgSetFocus ms;
185 ms.m_pDstTarget = pFocus; 185 ms.m_pDstTarget = pFocus;
186 if (bNotify) { 186 if (bNotify) {
187 ms.m_dwExtend = 1; 187 ms.m_dwExtend = 1;
188 } 188 }
189 IFWL_WidgetDelegate* pDelegate = pFocus->SetDelegate(NULL); 189 IFWL_WidgetDelegate* pDelegate = pFocus->SetDelegate(NULL);
190 if (pDelegate) { 190 if (pDelegate) {
191 pDelegate->OnProcessMessage(&ms); 191 pDelegate->OnProcessMessage(&ms);
192 } 192 }
193 } 193 }
194 return TRUE; 194 return TRUE;
195 } 195 }
196 FWL_Error CFWL_NoteDriver::Run() { 196 FWL_Error CFWL_NoteDriver::Run() {
197 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 197 CFWL_WidgetMgr* pWidgetMgr =
198 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance());
198 if (!pWidgetMgr) 199 if (!pWidgetMgr)
199 return FWL_Error::Indefinite; 200 return FWL_Error::Indefinite;
200 201
201 #if (_FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_WIN32_DESKTOP_ || \ 202 #if (_FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_WIN32_DESKTOP_ || \
202 _FX_OS_ == _FX_WIN64_) 203 _FX_OS_ == _FX_WIN64_)
203 CFWL_NoteLoop* pTopLoop = NULL; 204 CFWL_NoteLoop* pTopLoop = NULL;
204 for (;;) { 205 for (;;) {
205 pTopLoop = GetTopLoop(); 206 pTopLoop = GetTopLoop();
206 if (!pTopLoop || !pTopLoop->ContinueModal()) 207 if (!pTopLoop || !pTopLoop->ContinueModal())
207 break; 208 break;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 int32_t size = m_noteLoopQueue.GetSize(); 313 int32_t size = m_noteLoopQueue.GetSize();
313 if (size <= 0) 314 if (size <= 0)
314 return nullptr; 315 return nullptr;
315 return static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[size - 1]); 316 return static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[size - 1]);
316 } 317 }
317 int32_t CFWL_NoteDriver::CountLoop() { 318 int32_t CFWL_NoteDriver::CountLoop() {
318 return m_noteLoopQueue.GetSize(); 319 return m_noteLoopQueue.GetSize();
319 } 320 }
320 321
321 FX_BOOL CFWL_NoteDriver::ProcessMessage(CFWL_Message* pMessage) { 322 FX_BOOL CFWL_NoteDriver::ProcessMessage(CFWL_Message* pMessage) {
322 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 323 CFWL_WidgetMgr* pWidgetMgr =
324 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance());
323 IFWL_Widget* pMessageForm = pWidgetMgr->IsFormDisabled() 325 IFWL_Widget* pMessageForm = pWidgetMgr->IsFormDisabled()
324 ? pMessage->m_pDstTarget 326 ? pMessage->m_pDstTarget
325 : GetMessageForm(pMessage->m_pDstTarget); 327 : GetMessageForm(pMessage->m_pDstTarget);
326 if (!pMessageForm) 328 if (!pMessageForm)
327 return FALSE; 329 return FALSE;
328 if (DispatchMessage(pMessage, pMessageForm)) { 330 if (DispatchMessage(pMessage, pMessageForm)) {
329 if (pMessage->GetClassID() == CFWL_MessageType::Mouse) 331 if (pMessage->GetClassID() == CFWL_MessageType::Mouse)
330 MouseSecondary(static_cast<CFWL_MsgMouse*>(pMessage)); 332 MouseSecondary(static_cast<CFWL_MsgMouse*>(pMessage));
331 return TRUE; 333 return TRUE;
332 } 334 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 if (pDst == pMessageForm && pDst->IsInstance(L"FWL_FORMPROXY")) { 431 if (pDst == pMessageForm && pDst->IsInstance(L"FWL_FORMPROXY")) {
430 return TRUE; 432 return TRUE;
431 } 433 }
432 #endif 434 #endif
433 return pDst != pMessageForm && 435 return pDst != pMessageForm &&
434 !pDst->IsInstance(FX_WSTRC(L"FWL_FORMPROXY")) && 436 !pDst->IsInstance(FX_WSTRC(L"FWL_FORMPROXY")) &&
435 !pMessageForm->IsInstance(FX_WSTRC(L"FWL_FORMPROXY")); 437 !pMessageForm->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"));
436 } 438 }
437 FX_BOOL CFWL_NoteDriver::DoSetFocus(CFWL_MsgSetFocus* pMsg, 439 FX_BOOL CFWL_NoteDriver::DoSetFocus(CFWL_MsgSetFocus* pMsg,
438 IFWL_Widget* pMessageForm) { 440 IFWL_Widget* pMessageForm) {
439 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 441 CFWL_WidgetMgr* pWidgetMgr =
442 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance());
440 if (pWidgetMgr->IsFormDisabled()) { 443 if (pWidgetMgr->IsFormDisabled()) {
441 m_pFocus = pMsg->m_pDstTarget; 444 m_pFocus = pMsg->m_pDstTarget;
442 return TRUE; 445 return TRUE;
443 } else { 446 } else {
444 IFWL_Widget* pWidget = pMsg->m_pDstTarget; 447 IFWL_Widget* pWidget = pMsg->m_pDstTarget;
445 CFWL_FormImp* pForm = 448 CFWL_FormImp* pForm =
446 pWidget ? static_cast<CFWL_FormImp*>(pWidget->GetImpl()) : nullptr; 449 pWidget ? static_cast<CFWL_FormImp*>(pWidget->GetImpl()) : nullptr;
447 if (pForm) { 450 if (pForm) {
448 CFWL_WidgetImp* pSubFocus = pForm->GetSubFocus(); 451 CFWL_WidgetImp* pSubFocus = pForm->GetSubFocus();
449 if (pSubFocus && ((pSubFocus->GetStates() & FWL_WGTSTATE_Focused) == 0)) { 452 if (pSubFocus && ((pSubFocus->GetStates() & FWL_WGTSTATE_Focused) == 0)) {
450 pMsg->m_pDstTarget = pSubFocus->GetInterface(); 453 pMsg->m_pDstTarget = pSubFocus->GetInterface();
451 if (m_pFocus != pMsg->m_pDstTarget) { 454 if (m_pFocus != pMsg->m_pDstTarget) {
452 m_pFocus = pMsg->m_pDstTarget; 455 m_pFocus = pMsg->m_pDstTarget;
453 return TRUE; 456 return TRUE;
454 } 457 }
455 } 458 }
456 } 459 }
457 } 460 }
458 return FALSE; 461 return FALSE;
459 } 462 }
460 FX_BOOL CFWL_NoteDriver::DoKillFocus(CFWL_MsgKillFocus* pMsg, 463 FX_BOOL CFWL_NoteDriver::DoKillFocus(CFWL_MsgKillFocus* pMsg,
461 IFWL_Widget* pMessageForm) { 464 IFWL_Widget* pMessageForm) {
462 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 465 CFWL_WidgetMgr* pWidgetMgr =
466 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance());
463 if (pWidgetMgr->IsFormDisabled()) { 467 if (pWidgetMgr->IsFormDisabled()) {
464 if (m_pFocus == pMsg->m_pDstTarget) { 468 if (m_pFocus == pMsg->m_pDstTarget) {
465 m_pFocus = NULL; 469 m_pFocus = NULL;
466 } 470 }
467 return TRUE; 471 return TRUE;
468 } 472 }
469 IFWL_Widget* pWidget = pMsg->m_pDstTarget; 473 IFWL_Widget* pWidget = pMsg->m_pDstTarget;
470 CFWL_FormImp* pForm = 474 CFWL_FormImp* pForm =
471 pWidget ? static_cast<CFWL_FormImp*>(pWidget->GetImpl()) : nullptr; 475 pWidget ? static_cast<CFWL_FormImp*>(pWidget->GetImpl()) : nullptr;
472 if (pForm) { 476 if (pForm) {
473 CFWL_WidgetImp* pSubFocus = pForm->GetSubFocus(); 477 CFWL_WidgetImp* pSubFocus = pForm->GetSubFocus();
474 if (pSubFocus && (pSubFocus->GetStates() & FWL_WGTSTATE_Focused)) { 478 if (pSubFocus && (pSubFocus->GetStates() & FWL_WGTSTATE_Focused)) {
475 pMsg->m_pDstTarget = pSubFocus->GetInterface(); 479 pMsg->m_pDstTarget = pSubFocus->GetInterface();
476 if (m_pFocus == pMsg->m_pDstTarget) { 480 if (m_pFocus == pMsg->m_pDstTarget) {
477 m_pFocus = NULL; 481 m_pFocus = NULL;
478 return TRUE; 482 return TRUE;
479 } 483 }
480 } 484 }
481 } 485 }
482 return FALSE; 486 return FALSE;
483 } 487 }
484 FX_BOOL CFWL_NoteDriver::DoKey(CFWL_MsgKey* pMsg, IFWL_Widget* pMessageForm) { 488 FX_BOOL CFWL_NoteDriver::DoKey(CFWL_MsgKey* pMsg, IFWL_Widget* pMessageForm) {
485 #if (_FX_OS_ != _FX_MACOSX_) 489 #if (_FX_OS_ != _FX_MACOSX_)
486 if (pMsg->m_dwCmd == FWL_KeyCommand::KeyDown && 490 if (pMsg->m_dwCmd == FWL_KeyCommand::KeyDown &&
487 pMsg->m_dwKeyCode == FWL_VKEY_Tab) { 491 pMsg->m_dwKeyCode == FWL_VKEY_Tab) {
488 CFWL_WidgetMgr* pWidgetMgr = 492 CFWL_WidgetMgr* pWidgetMgr =
489 static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 493 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance());
490 IFWL_Widget* pForm = GetMessageForm(pMsg->m_pDstTarget); 494 IFWL_Widget* pForm = GetMessageForm(pMsg->m_pDstTarget);
491 IFWL_Widget* pFocus = m_pFocus; 495 IFWL_Widget* pFocus = m_pFocus;
492 if (m_pFocus) { 496 if (m_pFocus) {
493 if (pWidgetMgr->GetWidget(m_pFocus, FWL_WGTRELATION_SystemForm) != 497 if (pWidgetMgr->GetWidget(m_pFocus, FWL_WGTRELATION_SystemForm) !=
494 pForm) { 498 pForm) {
495 pFocus = NULL; 499 pFocus = NULL;
496 } 500 }
497 } 501 }
498 FX_BOOL bFind = FALSE; 502 FX_BOOL bFind = FALSE;
499 IFWL_Widget* pNextTabStop = pWidgetMgr->nextTab(pForm, pFocus, bFind); 503 IFWL_Widget* pNextTabStop = pWidgetMgr->nextTab(pForm, pFocus, bFind);
500 if (!pNextTabStop) { 504 if (!pNextTabStop) {
501 bFind = FALSE; 505 bFind = FALSE;
502 pNextTabStop = pWidgetMgr->nextTab(pForm, NULL, bFind); 506 pNextTabStop = pWidgetMgr->nextTab(pForm, NULL, bFind);
503 } 507 }
504 if (pNextTabStop == pFocus) { 508 if (pNextTabStop == pFocus) {
505 return TRUE; 509 return TRUE;
506 } 510 }
507 if (pNextTabStop) { 511 if (pNextTabStop) {
508 SetFocus(pNextTabStop); 512 SetFocus(pNextTabStop);
509 } 513 }
510 return TRUE; 514 return TRUE;
511 } 515 }
512 #endif 516 #endif
513 if (!m_pFocus) { 517 if (!m_pFocus) {
514 if (pMsg->m_dwCmd == FWL_KeyCommand::KeyDown && 518 if (pMsg->m_dwCmd == FWL_KeyCommand::KeyDown &&
515 pMsg->m_dwKeyCode == FWL_VKEY_Return) { 519 pMsg->m_dwKeyCode == FWL_VKEY_Return) {
516 CFWL_WidgetMgr* pWidgetMgr = 520 CFWL_WidgetMgr* pWidgetMgr =
517 static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 521 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance());
518 IFWL_Widget* defButton = pWidgetMgr->GetDefaultButton(pMessageForm); 522 IFWL_Widget* defButton = pWidgetMgr->GetDefaultButton(pMessageForm);
519 if (defButton) { 523 if (defButton) {
520 pMsg->m_pDstTarget = defButton; 524 pMsg->m_pDstTarget = defButton;
521 return TRUE; 525 return TRUE;
522 } 526 }
523 } 527 }
524 return FALSE; 528 return FALSE;
525 } 529 }
526 pMsg->m_pDstTarget = m_pFocus; 530 pMsg->m_pDstTarget = m_pFocus;
527 return TRUE; 531 return TRUE;
528 } 532 }
529 FX_BOOL CFWL_NoteDriver::DoMouse(CFWL_MsgMouse* pMsg, 533 FX_BOOL CFWL_NoteDriver::DoMouse(CFWL_MsgMouse* pMsg,
530 IFWL_Widget* pMessageForm) { 534 IFWL_Widget* pMessageForm) {
531 if (pMsg->m_dwCmd == FWL_MouseCommand::Leave || 535 if (pMsg->m_dwCmd == FWL_MouseCommand::Leave ||
532 pMsg->m_dwCmd == FWL_MouseCommand::Hover || 536 pMsg->m_dwCmd == FWL_MouseCommand::Hover ||
533 pMsg->m_dwCmd == FWL_MouseCommand::Enter) { 537 pMsg->m_dwCmd == FWL_MouseCommand::Enter) {
534 return pMsg->m_pDstTarget != NULL; 538 return pMsg->m_pDstTarget != NULL;
535 } 539 }
536 if (pMsg->m_pDstTarget != pMessageForm) { 540 if (pMsg->m_pDstTarget != pMessageForm) {
537 pMsg->m_pDstTarget->TransformTo(pMessageForm, pMsg->m_fx, pMsg->m_fy); 541 pMsg->m_pDstTarget->TransformTo(pMessageForm, pMsg->m_fx, pMsg->m_fy);
538 } 542 }
539 if (!DoMouseEx(pMsg, pMessageForm)) { 543 if (!DoMouseEx(pMsg, pMessageForm)) {
540 pMsg->m_pDstTarget = pMessageForm; 544 pMsg->m_pDstTarget = pMessageForm;
541 } 545 }
542 return TRUE; 546 return TRUE;
543 } 547 }
544 FX_BOOL CFWL_NoteDriver::DoWheel(CFWL_MsgMouseWheel* pMsg, 548 FX_BOOL CFWL_NoteDriver::DoWheel(CFWL_MsgMouseWheel* pMsg,
545 IFWL_Widget* pMessageForm) { 549 IFWL_Widget* pMessageForm) {
546 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 550 CFWL_WidgetMgr* pWidgetMgr =
551 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance());
547 if (!pWidgetMgr) 552 if (!pWidgetMgr)
548 return FALSE; 553 return FALSE;
549 554
550 IFWL_Widget* pDst = 555 IFWL_Widget* pDst =
551 pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy); 556 pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy);
552 if (!pDst) 557 if (!pDst)
553 return FALSE; 558 return FALSE;
554 559
555 pMessageForm->TransformTo(pDst, pMsg->m_fx, pMsg->m_fy); 560 pMessageForm->TransformTo(pDst, pMsg->m_fx, pMsg->m_fy);
556 pMsg->m_pDstTarget = pDst; 561 pMsg->m_pDstTarget = pDst;
557 return TRUE; 562 return TRUE;
558 } 563 }
559 FX_BOOL CFWL_NoteDriver::DoSize(CFWL_MsgSize* pMsg) { 564 FX_BOOL CFWL_NoteDriver::DoSize(CFWL_MsgSize* pMsg) {
560 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 565 CFWL_WidgetMgr* pWidgetMgr =
566 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance());
561 if (!pWidgetMgr) 567 if (!pWidgetMgr)
562 return FALSE; 568 return FALSE;
563 pWidgetMgr->NotifySizeChanged(pMsg->m_pDstTarget, (FX_FLOAT)pMsg->m_iWidth, 569 pWidgetMgr->NotifySizeChanged(pMsg->m_pDstTarget, (FX_FLOAT)pMsg->m_iWidth,
564 (FX_FLOAT)pMsg->m_iHeight); 570 (FX_FLOAT)pMsg->m_iHeight);
565 return TRUE; 571 return TRUE;
566 } 572 }
567 FX_BOOL CFWL_NoteDriver::DoWindowMove(CFWL_MsgWindowMove* pMsg, 573 FX_BOOL CFWL_NoteDriver::DoWindowMove(CFWL_MsgWindowMove* pMsg,
568 IFWL_Widget* pMessageForm) { 574 IFWL_Widget* pMessageForm) {
569 return pMsg->m_pDstTarget == pMessageForm; 575 return pMsg->m_pDstTarget == pMessageForm;
570 } 576 }
571 FX_BOOL CFWL_NoteDriver::DoDragFiles(CFWL_MsgDropFiles* pMsg, 577 FX_BOOL CFWL_NoteDriver::DoDragFiles(CFWL_MsgDropFiles* pMsg,
572 IFWL_Widget* pMessageForm) { 578 IFWL_Widget* pMessageForm) {
573 return pMsg->m_pDstTarget == pMessageForm; 579 return pMsg->m_pDstTarget == pMessageForm;
574 } 580 }
575 FX_BOOL CFWL_NoteDriver::DoMouseEx(CFWL_MsgMouse* pMsg, 581 FX_BOOL CFWL_NoteDriver::DoMouseEx(CFWL_MsgMouse* pMsg,
576 IFWL_Widget* pMessageForm) { 582 IFWL_Widget* pMessageForm) {
577 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 583 CFWL_WidgetMgr* pWidgetMgr =
584 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance());
578 if (!pWidgetMgr) 585 if (!pWidgetMgr)
579 return FALSE; 586 return FALSE;
580 IFWL_Widget* pTarget = NULL; 587 IFWL_Widget* pTarget = NULL;
581 if (m_pGrab) 588 if (m_pGrab)
582 pTarget = m_pGrab; 589 pTarget = m_pGrab;
583 if (!pTarget) { 590 if (!pTarget) {
584 pTarget = 591 pTarget =
585 pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy); 592 pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->m_fx, pMsg->m_fy);
586 } 593 }
587 if (pTarget) { 594 if (pTarget) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 IFWL_Widget* pMessageForm = nullptr; 656 IFWL_Widget* pMessageForm = nullptr;
650 if (iTrackLoop > 1) { 657 if (iTrackLoop > 1) {
651 CFWL_NoteLoop* pNootLoop = 658 CFWL_NoteLoop* pNootLoop =
652 static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[iTrackLoop - 1]); 659 static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[iTrackLoop - 1]);
653 pMessageForm = pNootLoop->GetForm()->GetInterface(); 660 pMessageForm = pNootLoop->GetForm()->GetInterface();
654 } else if (m_forms.Find(pDstTarget->GetImpl()) < 0) { 661 } else if (m_forms.Find(pDstTarget->GetImpl()) < 0) {
655 pMessageForm = pDstTarget; 662 pMessageForm = pDstTarget;
656 } 663 }
657 if (!pMessageForm && pDstTarget) { 664 if (!pMessageForm && pDstTarget) {
658 CFWL_WidgetMgr* pWidgetMgr = 665 CFWL_WidgetMgr* pWidgetMgr =
659 static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 666 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance());
660 if (!pWidgetMgr) 667 if (!pWidgetMgr)
661 return nullptr; 668 return nullptr;
662 pMessageForm = 669 pMessageForm =
663 pWidgetMgr->GetWidget(pDstTarget, FWL_WGTRELATION_SystemForm); 670 pWidgetMgr->GetWidget(pDstTarget, FWL_WGTRELATION_SystemForm);
664 } 671 }
665 return pMessageForm; 672 return pMessageForm;
666 } 673 }
667 674
668 void CFWL_NoteDriver::ClearInvalidEventTargets(FX_BOOL bRemoveAll) { 675 void CFWL_NoteDriver::ClearInvalidEventTargets(FX_BOOL bRemoveAll) {
669 auto it = m_eventTargets.begin(); 676 auto it = m_eventTargets.begin();
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 if (HasToolTip(pEvt->m_pDstTarget) && NULL != m_pToolTipImp) { 902 if (HasToolTip(pEvt->m_pDstTarget) && NULL != m_pToolTipImp) {
896 m_pToolTipImp->Hide(); 903 m_pToolTipImp->Hide();
897 pCurTarget = NULL; 904 pCurTarget = NULL;
898 return TRUE; 905 return TRUE;
899 } 906 }
900 return FALSE; 907 return FALSE;
901 } 908 }
902 IFWL_ToolTipTarget* CFWL_ToolTipContainer::GetCurrentToolTipTarget() { 909 IFWL_ToolTipTarget* CFWL_ToolTipContainer::GetCurrentToolTipTarget() {
903 return pCurTarget; 910 return pCurTarget;
904 } 911 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698