| 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_widgetimp.h" | 7 #include "xfa/fwl/core/fwl_widgetimp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 IFWL_Custom* pCustom = new IFWL_Custom; | 1078 IFWL_Custom* pCustom = new IFWL_Custom; |
| 1079 CFWL_CustomImp* pCustomImpl = new CFWL_CustomImp(properties, pOuter); | 1079 CFWL_CustomImp* pCustomImpl = new CFWL_CustomImp(properties, pOuter); |
| 1080 pCustom->SetImpl(pCustomImpl); | 1080 pCustom->SetImpl(pCustomImpl); |
| 1081 pCustomImpl->SetInterface(pCustom); | 1081 pCustomImpl->SetInterface(pCustom); |
| 1082 return pCustom; | 1082 return pCustom; |
| 1083 } | 1083 } |
| 1084 IFWL_Custom::IFWL_Custom() {} | 1084 IFWL_Custom::IFWL_Custom() {} |
| 1085 FWL_ERR IFWL_Custom::SetProxy(IFWL_Proxy* pProxy) { | 1085 FWL_ERR IFWL_Custom::SetProxy(IFWL_Proxy* pProxy) { |
| 1086 return static_cast<CFWL_CustomImp*>(GetImpl())->SetProxy(pProxy); | 1086 return static_cast<CFWL_CustomImp*>(GetImpl())->SetProxy(pProxy); |
| 1087 } | 1087 } |
| 1088 void FWL_SetWidgetRect(IFWL_Widget* widget, const CFX_RectF& rect) { | |
| 1089 static_cast<CFWL_WidgetImp*>(widget->GetImpl())->m_pProperties->m_rtWidget = | |
| 1090 rect; | |
| 1091 } | |
| 1092 void FWL_SetWidgetStates(IFWL_Widget* widget, uint32_t dwStates) { | |
| 1093 static_cast<CFWL_WidgetImp*>(widget->GetImpl())->m_pProperties->m_dwStates = | |
| 1094 dwStates; | |
| 1095 } | |
| 1096 void FWL_SetWidgetStyles(IFWL_Widget* widget, uint32_t dwStyles) { | |
| 1097 static_cast<CFWL_WidgetImp*>(widget->GetImpl())->m_pProperties->m_dwStyles = | |
| 1098 dwStyles; | |
| 1099 } | |
| 1100 FWL_ERR FWL_EnabelWidget(IFWL_Widget* widget, FX_BOOL bEnable) { | |
| 1101 widget->SetStates(FWL_WGTSTATE_Disabled, !bEnable); | |
| 1102 IFWL_WidgetMgr* widgetMgr = FWL_GetWidgetMgr(); | |
| 1103 IFWL_Widget* child = widgetMgr->GetWidget(widget, FWL_WGTRELATION_FirstChild); | |
| 1104 while (child) { | |
| 1105 FWL_EnabelWidget(child, bEnable); | |
| 1106 child = widgetMgr->GetWidget(child, FWL_WGTRELATION_NextSibling); | |
| 1107 } | |
| 1108 return FWL_ERR_Succeeded; | |
| 1109 } | |
| OLD | NEW |