| 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 if (!pWidget) | 660 if (!pWidget) |
| 661 return FALSE; | 661 return FALSE; |
| 662 if (!pWidget->IsInstance(FX_WSTRC(FWL_CLASS_Form))) { | 662 if (!pWidget->IsInstance(FX_WSTRC(FWL_CLASS_Form))) { |
| 663 return FALSE; | 663 return FALSE; |
| 664 } | 664 } |
| 665 uint32_t dwStyles = pWidget->GetStyles(); | 665 uint32_t dwStyles = pWidget->GetStyles(); |
| 666 return ((dwStyles & FWL_WGTSTYLE_WindowTypeMask) == | 666 return ((dwStyles & FWL_WGTSTYLE_WindowTypeMask) == |
| 667 FWL_WGTSTYLE_OverLapper) || | 667 FWL_WGTSTYLE_OverLapper) || |
| 668 (dwStyles & FWL_WGTSTYLE_Popup); | 668 (dwStyles & FWL_WGTSTYLE_Popup); |
| 669 } | 669 } |
| 670 FX_BOOL CFWL_WidgetMgr::IsThreadEnabled() { | 670 |
| 671 bool CFWL_WidgetMgr::IsThreadEnabled() { |
| 671 return !(m_dwCapability & FWL_WGTMGR_DisableThread); | 672 return !(m_dwCapability & FWL_WGTMGR_DisableThread); |
| 672 } | 673 } |
| 673 FX_BOOL CFWL_WidgetMgr::IsFormDisabled() { | 674 |
| 674 return m_dwCapability & FWL_WGTMGR_DisableForm; | 675 bool CFWL_WidgetMgr::IsFormDisabled() { |
| 676 return !!(m_dwCapability & FWL_WGTMGR_DisableForm); |
| 675 } | 677 } |
| 678 |
| 676 FX_BOOL CFWL_WidgetMgr::GetAdapterPopupPos(IFWL_Widget* pWidget, | 679 FX_BOOL CFWL_WidgetMgr::GetAdapterPopupPos(IFWL_Widget* pWidget, |
| 677 FX_FLOAT fMinHeight, | 680 FX_FLOAT fMinHeight, |
| 678 FX_FLOAT fMaxHeight, | 681 FX_FLOAT fMaxHeight, |
| 679 const CFX_RectF& rtAnchor, | 682 const CFX_RectF& rtAnchor, |
| 680 CFX_RectF& rtPopup) { | 683 CFX_RectF& rtPopup) { |
| 681 IFWL_AdapterWidgetMgr* pSDApapter = GetAdapterWidgetMgr(); | 684 IFWL_AdapterWidgetMgr* pSDApapter = GetAdapterWidgetMgr(); |
| 682 return pSDApapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor, | 685 return pSDApapter->GetPopupPos(pWidget, fMinHeight, fMaxHeight, rtAnchor, |
| 683 rtPopup); | 686 rtPopup); |
| 684 } | 687 } |
| 685 CFWL_WidgetMgrDelegate::CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr) | 688 CFWL_WidgetMgrDelegate::CFWL_WidgetMgrDelegate(CFWL_WidgetMgr* pWidgetMgr) |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 CFX_RectF temp(m_pWidgetMgr->m_rtScreen); | 1003 CFX_RectF temp(m_pWidgetMgr->m_rtScreen); |
| 1001 temp.Deflate(50, 50); | 1004 temp.Deflate(50, 50); |
| 1002 if (!temp.Contains(r)) { | 1005 if (!temp.Contains(r)) { |
| 1003 return FALSE; | 1006 return FALSE; |
| 1004 } | 1007 } |
| 1005 pItem->bOutsideChanged = FALSE; | 1008 pItem->bOutsideChanged = FALSE; |
| 1006 } | 1009 } |
| 1007 #endif | 1010 #endif |
| 1008 return pItem->iRedrawCounter == 0; | 1011 return pItem->iRedrawCounter == 0; |
| 1009 } | 1012 } |
| OLD | NEW |