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

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

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
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
« no previous file with comments | « xfa/fwl/core/fwl_widgetmgrimp.h ('k') | xfa/fwl/core/ifwl_adapterwidgetmgr.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 FX_FLOAT fMinHeight, 696 FX_FLOAT fMinHeight,
697 FX_FLOAT fMaxHeight, 697 FX_FLOAT fMaxHeight,
698 const CFX_RectF& rtAnchor, 698 const CFX_RectF& rtAnchor,
699 CFX_RectF& rtPopup) { 699 CFX_RectF& rtPopup) {
700 IFWL_AdapterWidgetMgr* pSDApapter = GetAdapterWidgetMgr(); 700 IFWL_AdapterWidgetMgr* pSDApapter = GetAdapterWidgetMgr();
701 return pSDApapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor, 701 return pSDApapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor,
702 rtPopup); 702 rtPopup);
703 } 703 }
704 CFWL_WidgetMgrDelegate::CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr) 704 CFWL_WidgetMgrDelegate::CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr)
705 : m_pWidgetMgr(pWidgetMgr) {} 705 : m_pWidgetMgr(pWidgetMgr) {}
706 FWL_ERR CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) { 706 FWL_Error CFWL_WidgetMgrDelegate::OnSetCapability(uint32_t dwCapability) {
707 m_pWidgetMgr->m_dwCapability = dwCapability; 707 m_pWidgetMgr->m_dwCapability = dwCapability;
708 return FWL_ERR_Succeeded; 708 return FWL_Error::Succeeded;
709 } 709 }
710 int32_t CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) { 710
711 void CFWL_WidgetMgrDelegate::OnProcessMessageToForm(CFWL_Message* pMessage) {
711 if (!pMessage) 712 if (!pMessage)
712 return 0; 713 return;
713 if (!pMessage->m_pDstTarget) 714 if (!pMessage->m_pDstTarget)
714 return 0; 715 return;
715 716
716 IFWL_Widget* pDstWidget = pMessage->m_pDstTarget; 717 IFWL_Widget* pDstWidget = pMessage->m_pDstTarget;
717 IFWL_App* pApp = pDstWidget->GetOwnerApp(); 718 IFWL_App* pApp = pDstWidget->GetOwnerApp();
718 if (!pApp) 719 if (!pApp)
719 return 0; 720 return;
720 721
721 CFWL_NoteDriver* pNoteDriver = 722 CFWL_NoteDriver* pNoteDriver =
722 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); 723 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
723 if (!pNoteDriver) 724 if (!pNoteDriver)
724 return 0; 725 return;
725 726
726 if (m_pWidgetMgr->IsThreadEnabled()) 727 if (m_pWidgetMgr->IsThreadEnabled())
727 pMessage = static_cast<CFWL_Message*>(pMessage->Clone()); 728 pMessage = static_cast<CFWL_Message*>(pMessage->Clone());
728 if (m_pWidgetMgr->IsFormDisabled()) 729 if (m_pWidgetMgr->IsFormDisabled())
729 pNoteDriver->ProcessMessage(pMessage); 730 pNoteDriver->ProcessMessage(pMessage);
730 else 731 else
731 pNoteDriver->QueueMessage(pMessage); 732 pNoteDriver->QueueMessage(pMessage);
732 733
733 #if (_FX_OS_ == _FX_MACOSX_) 734 #if (_FX_OS_ == _FX_MACOSX_)
734 CFWL_NoteLoop* pTopLoop = pNoteDriver->GetTopLoop(); 735 CFWL_NoteLoop* pTopLoop = pNoteDriver->GetTopLoop();
735 if (pTopLoop) { 736 if (pTopLoop)
736 pNoteDriver->UnqueueMessage(pTopLoop); 737 pNoteDriver->UnqueueMessage(pTopLoop);
737 }
738 #endif 738 #endif
739 if (m_pWidgetMgr->IsThreadEnabled()) { 739
740 if (m_pWidgetMgr->IsThreadEnabled())
740 pMessage->Release(); 741 pMessage->Release();
741 } 742
742 return FWL_ERR_Succeeded; 743 return;
743 } 744 }
744 745
745 FWL_ERR CFWL_WidgetMgrDelegate::OnDrawWidget(IFWL_Widget* pWidget, 746 void CFWL_WidgetMgrDelegate::OnDrawWidget(IFWL_Widget* pWidget,
746 CFX_Graphics* pGraphics, 747 CFX_Graphics* pGraphics,
747 const CFX_Matrix* pMatrix) { 748 const CFX_Matrix* pMatrix) {
748 if (!pWidget) 749 if (!pWidget || !pGraphics)
749 return FWL_ERR_Indefinite; 750 return;
750 if (!pGraphics)
751 return FWL_ERR_Indefinite;
752 751
753 CFX_Graphics* pTemp = DrawWidgetBefore(pWidget, pGraphics, pMatrix); 752 CFX_Graphics* pTemp = DrawWidgetBefore(pWidget, pGraphics, pMatrix);
754 CFX_RectF clipCopy; 753 CFX_RectF clipCopy;
755 pWidget->GetWidgetRect(clipCopy); 754 pWidget->GetWidgetRect(clipCopy);
756 clipCopy.left = clipCopy.top = 0; 755 clipCopy.left = clipCopy.top = 0;
757 if (bUseOffscreenDirect(pWidget)) { 756 if (bUseOffscreenDirect(pWidget)) {
758 DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix); 757 DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix);
759 return FWL_ERR_Succeeded; 758 return;
760 } 759 }
761 CFX_RectF clipBounds; 760 CFX_RectF clipBounds;
762 761
763 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) || \ 762 #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) || \
764 (_FX_OS_ == _FX_LINUX_DESKTOP_) || (_FX_OS_ == _FX_ANDROID_) 763 (_FX_OS_ == _FX_LINUX_DESKTOP_) || (_FX_OS_ == _FX_ANDROID_)
765 IFWL_WidgetDelegate* pDelegate = pWidget->SetDelegate(NULL); 764 IFWL_WidgetDelegate* pDelegate = pWidget->SetDelegate(NULL);
766 pDelegate->OnDrawWidget(pTemp, pMatrix); 765 pDelegate->OnDrawWidget(pTemp, pMatrix);
767 pGraphics->GetClipRect(clipBounds); 766 pGraphics->GetClipRect(clipBounds);
768 clipCopy = clipBounds; 767 clipCopy = clipBounds;
769 #elif(_FX_OS_ == _FX_MACOSX_) 768 #elif(_FX_OS_ == _FX_MACOSX_)
(...skipping 13 matching lines...) Expand all
783 if (!m_pWidgetMgr->IsFormDisabled()) { 782 if (!m_pWidgetMgr->IsFormDisabled()) {
784 CFX_RectF rtClient; 783 CFX_RectF rtClient;
785 pWidget->GetClientRect(rtClient); 784 pWidget->GetClientRect(rtClient);
786 clipBounds.Intersect(rtClient); 785 clipBounds.Intersect(rtClient);
787 } 786 }
788 if (!clipBounds.IsEmpty()) 787 if (!clipBounds.IsEmpty())
789 DrawChild(pWidget, clipBounds, pTemp, pMatrix); 788 DrawChild(pWidget, clipBounds, pTemp, pMatrix);
790 789
791 DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix); 790 DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix);
792 m_pWidgetMgr->ResetRedrawCounts(pWidget); 791 m_pWidgetMgr->ResetRedrawCounts(pWidget);
793 return FWL_ERR_Succeeded;
794 } 792 }
795 793
796 void CFWL_WidgetMgrDelegate::DrawChild(IFWL_Widget* parent, 794 void CFWL_WidgetMgrDelegate::DrawChild(IFWL_Widget* parent,
797 const CFX_RectF& rtClip, 795 const CFX_RectF& rtClip,
798 CFX_Graphics* pGraphics, 796 CFX_Graphics* pGraphics,
799 const CFX_Matrix* pMatrix) { 797 const CFX_Matrix* pMatrix) {
800 if (!parent) 798 if (!parent)
801 return; 799 return;
802 800
803 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
1005 temp.Deflate(50, 50); 1003 temp.Deflate(50, 50);
1006 if (!temp.Contains(r)) 1004 if (!temp.Contains(r))
1007 return FALSE; 1005 return FALSE;
1008 1006
1009 pItem->bOutsideChanged = FALSE; 1007 pItem->bOutsideChanged = FALSE;
1010 } 1008 }
1011 #endif 1009 #endif
1012 1010
1013 return pItem->iRedrawCounter == 0; 1011 return pItem->iRedrawCounter == 0;
1014 } 1012 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/fwl_widgetmgrimp.h ('k') | xfa/fwl/core/ifwl_adapterwidgetmgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698