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_widgetmgrimp.h" | 7 #include "xfa/fwl/core/fwl_widgetmgrimp.h" |
8 | 8 |
9 #include "xfa/fwl/core/cfwl_message.h" | 9 #include "xfa/fwl/core/cfwl_message.h" |
10 #include "xfa/fwl/core/fwl_appimp.h" | 10 #include "xfa/fwl/core/fwl_appimp.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 if (pItem->pParent->pChild == pChild) { | 213 if (pItem->pParent->pChild == pChild) { |
214 pItem->pParent->pChild = pItem; | 214 pItem->pParent->pChild = pItem; |
215 } | 215 } |
216 } else { | 216 } else { |
217 pItem->pParent->pChild = pItem; | 217 pItem->pParent->pChild = pItem; |
218 pItem->pPrevious = NULL; | 218 pItem->pPrevious = NULL; |
219 pItem->pNext = NULL; | 219 pItem->pNext = NULL; |
220 } | 220 } |
221 return TRUE; | 221 return TRUE; |
222 } | 222 } |
223 FWL_ERR CFWL_WidgetMgr::RepaintWidget(IFWL_Widget* pWidget, | 223 FWL_Error CFWL_WidgetMgr::RepaintWidget(IFWL_Widget* pWidget, |
224 const CFX_RectF* pRect) { | 224 const CFX_RectF* pRect) { |
225 if (!m_pAdapter) | 225 if (!m_pAdapter) |
226 return FWL_ERR_Indefinite; | 226 return FWL_Error::Indefinite; |
227 IFWL_Widget* pNative = pWidget; | 227 IFWL_Widget* pNative = pWidget; |
228 CFX_RectF rect(*pRect); | 228 CFX_RectF rect(*pRect); |
229 if (IsFormDisabled()) { | 229 if (IsFormDisabled()) { |
230 IFWL_Widget* pOuter = pWidget->GetOuter(); | 230 IFWL_Widget* pOuter = pWidget->GetOuter(); |
231 while (pOuter) { | 231 while (pOuter) { |
232 CFX_RectF rtTemp; | 232 CFX_RectF rtTemp; |
233 pNative->GetWidgetRect(rtTemp); | 233 pNative->GetWidgetRect(rtTemp); |
234 rect.left += rtTemp.left; | 234 rect.left += rtTemp.left; |
235 rect.top += rtTemp.top; | 235 rect.top += rtTemp.top; |
236 pNative = pOuter; | 236 pNative = pOuter; |
237 pOuter = pOuter->GetOuter(); | 237 pOuter = pOuter->GetOuter(); |
238 } | 238 } |
239 } else if (!IsAbleNative(pWidget)) { | 239 } else if (!IsAbleNative(pWidget)) { |
240 pNative = GetWidget(pWidget, FWL_WGTRELATION_SystemForm); | 240 pNative = GetWidget(pWidget, FWL_WGTRELATION_SystemForm); |
241 if (!pNative) | 241 if (!pNative) |
242 return FWL_ERR_Indefinite; | 242 return FWL_Error::Indefinite; |
243 pWidget->TransformTo(pNative, rect.left, rect.top); | 243 pWidget->TransformTo(pNative, rect.left, rect.top); |
244 } | 244 } |
245 AddRedrawCounts(pNative); | 245 AddRedrawCounts(pNative); |
246 return m_pAdapter->RepaintWidget(pNative, &rect); | 246 return m_pAdapter->RepaintWidget(pNative, &rect); |
247 } | 247 } |
248 void CFWL_WidgetMgr::AddWidget(IFWL_Widget* pWidget) { | 248 void CFWL_WidgetMgr::AddWidget(IFWL_Widget* pWidget) { |
249 CFWL_WidgetMgrItem* pParentItem = GetWidgetMgrItem(NULL); | 249 CFWL_WidgetMgrItem* pParentItem = GetWidgetMgrItem(NULL); |
250 CFWL_WidgetMgrItem* pItem = GetWidgetMgrItem(pWidget); | 250 CFWL_WidgetMgrItem* pItem = GetWidgetMgrItem(pWidget); |
251 if (!pItem) { | 251 if (!pItem) { |
252 pItem = new CFWL_WidgetMgrItem; | 252 pItem = new CFWL_WidgetMgrItem; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 FX_BOOL CFWL_WidgetMgr::IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent) { | 367 FX_BOOL CFWL_WidgetMgr::IsChild(IFWL_Widget* pChild, IFWL_Widget* pParent) { |
368 IFWL_Widget* pTemp = pChild; | 368 IFWL_Widget* pTemp = pChild; |
369 do { | 369 do { |
370 if (pTemp == pParent) { | 370 if (pTemp == pParent) { |
371 return TRUE; | 371 return TRUE; |
372 } | 372 } |
373 pTemp = GetWidget(pTemp, FWL_WGTRELATION_Parent); | 373 pTemp = GetWidget(pTemp, FWL_WGTRELATION_Parent); |
374 } while (pTemp); | 374 } while (pTemp); |
375 return FALSE; | 375 return FALSE; |
376 } | 376 } |
377 FWL_ERR CFWL_WidgetMgr::CreateWidget_Native(IFWL_Widget* pWidget) { | 377 FWL_Error CFWL_WidgetMgr::CreateWidget_Native(IFWL_Widget* pWidget) { |
378 if (!IsAbleNative(pWidget)) { | 378 if (!IsAbleNative(pWidget)) { |
379 return FWL_ERR_Succeeded; | 379 return FWL_Error::Succeeded; |
380 } | 380 } |
381 return m_pAdapter->CreateWidget(pWidget, pWidget->GetOwner()); | 381 return m_pAdapter->CreateWidget(pWidget, pWidget->GetOwner()); |
382 } | 382 } |
383 FWL_ERR CFWL_WidgetMgr::DestroyWidget_Native(IFWL_Widget* pWidget) { | 383 FWL_Error CFWL_WidgetMgr::DestroyWidget_Native(IFWL_Widget* pWidget) { |
384 if (!IsAbleNative(pWidget)) { | 384 if (!IsAbleNative(pWidget)) { |
385 return FWL_ERR_Succeeded; | 385 return FWL_Error::Succeeded; |
386 } | 386 } |
387 return m_pAdapter->DestroyWidget(pWidget); | 387 return m_pAdapter->DestroyWidget(pWidget); |
388 } | 388 } |
389 FWL_ERR CFWL_WidgetMgr::GetWidgetRect_Native(IFWL_Widget* pWidget, | 389 FWL_Error CFWL_WidgetMgr::GetWidgetRect_Native(IFWL_Widget* pWidget, |
390 CFX_RectF& rect) { | 390 CFX_RectF& rect) { |
391 if (!IsAbleNative(pWidget)) { | 391 if (!IsAbleNative(pWidget)) { |
392 return FWL_ERR_Succeeded; | 392 return FWL_Error::Succeeded; |
393 } | 393 } |
394 return m_pAdapter->GetWidgetRect(pWidget, rect); | 394 return m_pAdapter->GetWidgetRect(pWidget, rect); |
395 } | 395 } |
396 FWL_ERR CFWL_WidgetMgr::SetWidgetRect_Native(IFWL_Widget* pWidget, | 396 FWL_Error CFWL_WidgetMgr::SetWidgetRect_Native(IFWL_Widget* pWidget, |
397 const CFX_RectF& rect) { | 397 const CFX_RectF& rect) { |
398 if (FWL_UseOffscreen(pWidget)) { | 398 if (FWL_UseOffscreen(pWidget)) { |
399 CFWL_WidgetMgrItem* pItem = GetWidgetMgrItem(pWidget); | 399 CFWL_WidgetMgrItem* pItem = GetWidgetMgrItem(pWidget); |
400 pItem->iRedrawCounter++; | 400 pItem->iRedrawCounter++; |
401 if (pItem->pOffscreen) { | 401 if (pItem->pOffscreen) { |
402 CFX_RenderDevice* pDevice = pItem->pOffscreen->GetRenderDevice(); | 402 CFX_RenderDevice* pDevice = pItem->pOffscreen->GetRenderDevice(); |
403 if (pDevice && pDevice->GetBitmap()) { | 403 if (pDevice && pDevice->GetBitmap()) { |
404 CFX_DIBitmap* pBitmap = pDevice->GetBitmap(); | 404 CFX_DIBitmap* pBitmap = pDevice->GetBitmap(); |
405 if (pBitmap->GetWidth() - rect.width > 1 || | 405 if (pBitmap->GetWidth() - rect.width > 1 || |
406 pBitmap->GetHeight() - rect.height > 1) { | 406 pBitmap->GetHeight() - rect.height > 1) { |
407 delete pItem->pOffscreen; | 407 delete pItem->pOffscreen; |
408 pItem->pOffscreen = NULL; | 408 pItem->pOffscreen = NULL; |
409 } | 409 } |
410 } | 410 } |
411 } | 411 } |
412 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) | 412 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) |
413 pItem->bOutsideChanged = !m_rtScreen.Contains(rect); | 413 pItem->bOutsideChanged = !m_rtScreen.Contains(rect); |
414 #endif | 414 #endif |
415 } | 415 } |
416 return m_pAdapter->SetWidgetRect(pWidget, rect); | 416 return m_pAdapter->SetWidgetRect(pWidget, rect); |
417 } | 417 } |
418 FWL_ERR CFWL_WidgetMgr::SetWidgetPosition_Native(IFWL_Widget* pWidget, | 418 FWL_Error CFWL_WidgetMgr::SetWidgetPosition_Native(IFWL_Widget* pWidget, |
419 FX_FLOAT fx, | 419 FX_FLOAT fx, |
420 FX_FLOAT fy) { | 420 FX_FLOAT fy) { |
421 return m_pAdapter->SetWidgetPosition(pWidget, fx, fy); | 421 return m_pAdapter->SetWidgetPosition(pWidget, fx, fy); |
422 } | 422 } |
423 FWL_ERR CFWL_WidgetMgr::SetWidgetIcon_Native(IFWL_Widget* pWidget, | 423 FWL_Error CFWL_WidgetMgr::SetWidgetIcon_Native(IFWL_Widget* pWidget, |
424 const CFX_DIBitmap* pIcon, | 424 const CFX_DIBitmap* pIcon, |
425 FX_BOOL bBig) { | 425 FX_BOOL bBig) { |
426 return m_pAdapter->SetWidgetIcon(pWidget, pIcon, bBig); | 426 return m_pAdapter->SetWidgetIcon(pWidget, pIcon, bBig); |
427 } | 427 } |
428 FWL_ERR CFWL_WidgetMgr::SetWidgetCaption_Native( | 428 FWL_Error CFWL_WidgetMgr::SetWidgetCaption_Native( |
429 IFWL_Widget* pWidget, | 429 IFWL_Widget* pWidget, |
430 const CFX_WideStringC& wsCaption) { | 430 const CFX_WideStringC& wsCaption) { |
431 return m_pAdapter->SetWidgetCaption(pWidget, wsCaption); | 431 return m_pAdapter->SetWidgetCaption(pWidget, wsCaption); |
432 } | 432 } |
433 FWL_ERR CFWL_WidgetMgr::SetBorderRegion_Native(IFWL_Widget* pWidget, | 433 FWL_Error CFWL_WidgetMgr::SetBorderRegion_Native(IFWL_Widget* pWidget, |
434 CFX_Path* pPath) { | 434 CFX_Path* pPath) { |
435 return m_pAdapter->SetBorderRegion(pWidget, pPath); | 435 return m_pAdapter->SetBorderRegion(pWidget, pPath); |
436 } | 436 } |
437 FWL_ERR CFWL_WidgetMgr::ShowWidget_Native(IFWL_Widget* pWidget) { | 437 FWL_Error CFWL_WidgetMgr::ShowWidget_Native(IFWL_Widget* pWidget) { |
438 return m_pAdapter->ShowWidget(pWidget); | 438 return m_pAdapter->ShowWidget(pWidget); |
439 } | 439 } |
440 FWL_ERR CFWL_WidgetMgr::HideWidget_Native(IFWL_Widget* pWidget) { | 440 FWL_Error CFWL_WidgetMgr::HideWidget_Native(IFWL_Widget* pWidget) { |
441 return m_pAdapter->HideWidget(pWidget); | 441 return m_pAdapter->HideWidget(pWidget); |
442 } | 442 } |
443 FWL_ERR CFWL_WidgetMgr::SetNormal_Native(IFWL_Widget* pWidget) { | 443 FWL_Error CFWL_WidgetMgr::SetNormal_Native(IFWL_Widget* pWidget) { |
444 return m_pAdapter->SetNormal(pWidget); | 444 return m_pAdapter->SetNormal(pWidget); |
445 } | 445 } |
446 FWL_ERR CFWL_WidgetMgr::SetMaximize_Native(IFWL_Widget* pWidget) { | 446 FWL_Error CFWL_WidgetMgr::SetMaximize_Native(IFWL_Widget* pWidget) { |
447 return m_pAdapter->SetMaximize(pWidget); | 447 return m_pAdapter->SetMaximize(pWidget); |
448 } | 448 } |
449 FWL_ERR CFWL_WidgetMgr::SetMinimize_Native(IFWL_Widget* pWidget) { | 449 FWL_Error CFWL_WidgetMgr::SetMinimize_Native(IFWL_Widget* pWidget) { |
450 return m_pAdapter->SetMinimize(pWidget); | 450 return m_pAdapter->SetMinimize(pWidget); |
451 } | 451 } |
452 FX_BOOL CFWL_WidgetMgr::CheckMessage_Native() { | 452 FX_BOOL CFWL_WidgetMgr::CheckMessage_Native() { |
453 return m_pAdapter->CheckMessage(); | 453 return m_pAdapter->CheckMessage(); |
454 } | 454 } |
455 FWL_ERR CFWL_WidgetMgr::DispatchMessage_Native() { | 455 FWL_Error CFWL_WidgetMgr::DispatchMessage_Native() { |
456 return m_pAdapter->DispatchMessage(); | 456 return m_pAdapter->DispatchMessage(); |
457 } | 457 } |
458 FX_BOOL CFWL_WidgetMgr::IsIdleMessage_Native() { | 458 FX_BOOL CFWL_WidgetMgr::IsIdleMessage_Native() { |
459 return m_pAdapter->IsIdleMessage(); | 459 return m_pAdapter->IsIdleMessage(); |
460 } | 460 } |
461 FWL_ERR CFWL_WidgetMgr::Exit_Native(int32_t iExitCode) { | 461 FWL_Error CFWL_WidgetMgr::Exit_Native(int32_t iExitCode) { |
462 return m_pAdapter->Exit(iExitCode); | 462 return m_pAdapter->Exit(iExitCode); |
463 } | 463 } |
464 FWL_ERR CFWL_WidgetMgr::CreateWidgetWithNativeId_Native(IFWL_Widget* pWidget, | 464 FWL_Error CFWL_WidgetMgr::CreateWidgetWithNativeId_Native(IFWL_Widget* pWidget, |
465 void* vp) { | 465 void* vp) { |
466 return m_pAdapter->CreateWidgetWithNativeId(pWidget, vp); | 466 return m_pAdapter->CreateWidgetWithNativeId(pWidget, vp); |
467 } | 467 } |
468 IFWL_Widget* CFWL_WidgetMgr::GetWidgetAtPoint(IFWL_Widget* parent, | 468 IFWL_Widget* CFWL_WidgetMgr::GetWidgetAtPoint(IFWL_Widget* parent, |
469 FX_FLOAT x, | 469 FX_FLOAT x, |
470 FX_FLOAT y) { | 470 FX_FLOAT y) { |
471 if (!parent) | 471 if (!parent) |
472 return NULL; | 472 return NULL; |
473 FX_FLOAT x1; | 473 FX_FLOAT x1; |
474 FX_FLOAT y1; | 474 FX_FLOAT y1; |
475 IFWL_Widget* child = GetWidget(parent, FWL_WGTRELATION_LastChild); | 475 IFWL_Widget* child = GetWidget(parent, FWL_WGTRELATION_LastChild); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 FX_FLOAT fMinHeight, | 693 FX_FLOAT fMinHeight, |
694 FX_FLOAT fMaxHeight, | 694 FX_FLOAT fMaxHeight, |
695 const CFX_RectF& rtAnchor, | 695 const CFX_RectF& rtAnchor, |
696 CFX_RectF& rtPopup) { | 696 CFX_RectF& rtPopup) { |
697 IFWL_AdapterWidgetMgr* pSDApapter = GetAdapterWidgetMgr(); | 697 IFWL_AdapterWidgetMgr* pSDApapter = GetAdapterWidgetMgr(); |
698 return pSDApapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor, | 698 return pSDApapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor, |
699 rtPopup); | 699 rtPopup); |
700 } | 700 } |
701 CFWL_WidgetMgrDelegate::CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr) | 701 CFWL_WidgetMgrDelegate::CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr) |
702 : m_pWidgetMgr(pWidgetMgr) {} | 702 : m_pWidgetMgr(pWidgetMgr) {} |
703 FWL_ERR CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) { | 703 FWL_Error CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) { |
704 m_pWidgetMgr->m_dwCapability = dwCapability; | 704 m_pWidgetMgr->m_dwCapability = dwCapability; |
705 return FWL_ERR_Succeeded; | 705 return FWL_Error::Succeeded; |
706 } | 706 } |
707 int32_t CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) { | 707 |
| 708 void CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) { |
708 if (!pMessage) | 709 if (!pMessage) |
709 return 0; | 710 return; |
710 if (!pMessage->m_pDstTarget) | 711 if (!pMessage->m_pDstTarget) |
711 return 0; | 712 return; |
712 | 713 |
713 IFWL_Widget* pDstWidget = pMessage->m_pDstTarget; | 714 IFWL_Widget* pDstWidget = pMessage->m_pDstTarget; |
714 IFWL_App* pApp = pDstWidget->GetOwnerApp(); | 715 IFWL_App* pApp = pDstWidget->GetOwnerApp(); |
715 if (!pApp) | 716 if (!pApp) |
716 return 0; | 717 return; |
717 | 718 |
718 CFWL_NoteDriver* pNoteDriver = | 719 CFWL_NoteDriver* pNoteDriver = |
719 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); | 720 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); |
720 if (!pNoteDriver) | 721 if (!pNoteDriver) |
721 return 0; | 722 return; |
722 | 723 |
723 if (m_pWidgetMgr->IsThreadEnabled()) | 724 if (m_pWidgetMgr->IsThreadEnabled()) |
724 pMessage = static_cast<CFWL_Message*>(pMessage->Clone()); | 725 pMessage = static_cast<CFWL_Message*>(pMessage->Clone()); |
725 if (m_pWidgetMgr->IsFormDisabled()) | 726 if (m_pWidgetMgr->IsFormDisabled()) |
726 pNoteDriver->ProcessMessage(pMessage); | 727 pNoteDriver->ProcessMessage(pMessage); |
727 else | 728 else |
728 pNoteDriver->QueueMessage(pMessage); | 729 pNoteDriver->QueueMessage(pMessage); |
729 | 730 |
730 #if (_FX_OS_ == _FX_MACOSX_) | 731 #if (_FX_OS_ == _FX_MACOSX_) |
731 CFWL_NoteLoop* pTopLoop = pNoteDriver->GetTopLoop(); | 732 CFWL_NoteLoop* pTopLoop = pNoteDriver->GetTopLoop(); |
732 if (pTopLoop) { | 733 if (pTopLoop) |
733 pNoteDriver->UnqueueMessage(pTopLoop); | 734 pNoteDriver->UnqueueMessage(pTopLoop); |
734 } | |
735 #endif | 735 #endif |
736 if (m_pWidgetMgr->IsThreadEnabled()) { | 736 |
| 737 if (m_pWidgetMgr->IsThreadEnabled()) |
737 pMessage->Release(); | 738 pMessage->Release(); |
738 } | 739 |
739 return FWL_ERR_Succeeded; | 740 return; |
740 } | 741 } |
741 | 742 |
742 FWL_ERR CFWL_WidgetMgrDelegate::OnDrawWidget(IFWL_Widget* pWidget, | 743 FWL_Error CFWL_WidgetMgrDelegate::OnDrawWidget(IFWL_Widget* pWidget, |
743 CFX_Graphics* pGraphics, | 744 CFX_Graphics* pGraphics, |
744 const CFX_Matrix* pMatrix) { | 745 const CFX_Matrix* pMatrix) { |
745 if (!pWidget) | 746 if (!pWidget) |
746 return FWL_ERR_Indefinite; | 747 return FWL_Error::Indefinite; |
747 if (!pGraphics) | 748 if (!pGraphics) |
748 return FWL_ERR_Indefinite; | 749 return FWL_Error::Indefinite; |
749 | 750 |
750 CFX_Graphics* pTemp = DrawWidgetBefore(pWidget, pGraphics, pMatrix); | 751 CFX_Graphics* pTemp = DrawWidgetBefore(pWidget, pGraphics, pMatrix); |
751 CFX_RectF clipCopy; | 752 CFX_RectF clipCopy; |
752 pWidget->GetWidgetRect(clipCopy); | 753 pWidget->GetWidgetRect(clipCopy); |
753 clipCopy.left = clipCopy.top = 0; | 754 clipCopy.left = clipCopy.top = 0; |
754 if (bUseOffscreenDirect(pWidget)) { | 755 if (bUseOffscreenDirect(pWidget)) { |
755 DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix); | 756 DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix); |
756 return FWL_ERR_Succeeded; | 757 return FWL_Error::Succeeded; |
757 } | 758 } |
758 CFX_RectF clipBounds; | 759 CFX_RectF clipBounds; |
759 | 760 |
760 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) || \ | 761 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) || \ |
761 (_FX_OS_ == _FX_LINUX_DESKTOP_) || (_FX_OS_ == _FX_ANDROID_) | 762 (_FX_OS_ == _FX_LINUX_DESKTOP_) || (_FX_OS_ == _FX_ANDROID_) |
762 IFWL_WidgetDelegate* pDelegate = pWidget->SetDelegate(NULL); | 763 IFWL_WidgetDelegate* pDelegate = pWidget->SetDelegate(NULL); |
763 pDelegate->OnDrawWidget(pTemp, pMatrix); | 764 pDelegate->OnDrawWidget(pTemp, pMatrix); |
764 pGraphics->GetClipRect(clipBounds); | 765 pGraphics->GetClipRect(clipBounds); |
765 clipCopy = clipBounds; | 766 clipCopy = clipBounds; |
766 #elif(_FX_OS_ == _FX_MACOSX_) | 767 #elif(_FX_OS_ == _FX_MACOSX_) |
(...skipping 13 matching lines...) Expand all Loading... |
780 if (!m_pWidgetMgr->IsFormDisabled()) { | 781 if (!m_pWidgetMgr->IsFormDisabled()) { |
781 CFX_RectF rtClient; | 782 CFX_RectF rtClient; |
782 pWidget->GetClientRect(rtClient); | 783 pWidget->GetClientRect(rtClient); |
783 clipBounds.Intersect(rtClient); | 784 clipBounds.Intersect(rtClient); |
784 } | 785 } |
785 if (!clipBounds.IsEmpty()) | 786 if (!clipBounds.IsEmpty()) |
786 DrawChild(pWidget, clipBounds, pTemp, pMatrix); | 787 DrawChild(pWidget, clipBounds, pTemp, pMatrix); |
787 | 788 |
788 DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix); | 789 DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix); |
789 m_pWidgetMgr->ResetRedrawCounts(pWidget); | 790 m_pWidgetMgr->ResetRedrawCounts(pWidget); |
790 return FWL_ERR_Succeeded; | 791 return FWL_Error::Succeeded; |
791 } | 792 } |
792 | 793 |
793 void CFWL_WidgetMgrDelegate::DrawChild(IFWL_Widget* parent, | 794 void CFWL_WidgetMgrDelegate::DrawChild(IFWL_Widget* parent, |
794 const CFX_RectF& rtClip, | 795 const CFX_RectF& rtClip, |
795 CFX_Graphics* pGraphics, | 796 CFX_Graphics* pGraphics, |
796 const CFX_Matrix* pMatrix) { | 797 const CFX_Matrix* pMatrix) { |
797 if (!parent) | 798 if (!parent) |
798 return; | 799 return; |
799 | 800 |
800 FX_BOOL bFormDisable = m_pWidgetMgr->IsFormDisabled(); | 801 FX_BOOL bFormDisable = m_pWidgetMgr->IsFormDisabled(); |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 temp.Deflate(50, 50); | 1003 temp.Deflate(50, 50); |
1003 if (!temp.Contains(r)) | 1004 if (!temp.Contains(r)) |
1004 return FALSE; | 1005 return FALSE; |
1005 | 1006 |
1006 pItem->bOutsideChanged = FALSE; | 1007 pItem->bOutsideChanged = FALSE; |
1007 } | 1008 } |
1008 #endif | 1009 #endif |
1009 | 1010 |
1010 return pItem->iRedrawCounter == 0; | 1011 return pItem->iRedrawCounter == 0; |
1011 } | 1012 } |
OLD | NEW |