| 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_formimp.h" | 7 #include "xfa/fwl/core/fwl_formimp.h" |
| 8 | 8 |
| 9 #include "xfa/fde/tto/fde_textout.h" | 9 #include "xfa/fde/tto/fde_textout.h" |
| 10 #include "xfa/fwl/basewidget/fwl_formproxyimp.h" | 10 #include "xfa/fwl/basewidget/fwl_formproxyimp.h" |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 void CFWL_FormImp::UpdateCaption() { | 815 void CFWL_FormImp::UpdateCaption() { |
| 816 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); | 816 CFWL_WidgetMgr* pWidgetMgr = static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); |
| 817 if (!pWidgetMgr) | 817 if (!pWidgetMgr) |
| 818 return; | 818 return; |
| 819 IFWL_FormDP* pData = | 819 IFWL_FormDP* pData = |
| 820 static_cast<IFWL_FormDP*>(m_pProperties->m_pDataProvider); | 820 static_cast<IFWL_FormDP*>(m_pProperties->m_pDataProvider); |
| 821 if (!pData) | 821 if (!pData) |
| 822 return; | 822 return; |
| 823 CFX_WideString text; | 823 CFX_WideString text; |
| 824 pData->GetCaption(m_pInterface, text); | 824 pData->GetCaption(m_pInterface, text); |
| 825 pWidgetMgr->SetWidgetCaption_Native(m_pInterface, text.AsWideStringC()); | 825 pWidgetMgr->SetWidgetCaption_Native(m_pInterface, text.AsStringC()); |
| 826 } | 826 } |
| 827 void CFWL_FormImp::DoWidthLimit(FX_FLOAT& fLeft, | 827 void CFWL_FormImp::DoWidthLimit(FX_FLOAT& fLeft, |
| 828 FX_FLOAT& fWidth, | 828 FX_FLOAT& fWidth, |
| 829 FX_FLOAT fCurX, | 829 FX_FLOAT fCurX, |
| 830 FX_FLOAT fSpace, | 830 FX_FLOAT fSpace, |
| 831 FX_FLOAT fLimitMin, | 831 FX_FLOAT fLimitMin, |
| 832 FX_FLOAT fLimitMax, | 832 FX_FLOAT fLimitMax, |
| 833 FX_BOOL bLeft) { | 833 FX_BOOL bLeft) { |
| 834 FX_FLOAT fx = fCurX; | 834 FX_FLOAT fx = fCurX; |
| 835 FX_FLOAT fy = 0; | 835 FX_FLOAT fy = 0; |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 eClose.m_pSrcTarget = m_pOwner->m_pInterface; | 1170 eClose.m_pSrcTarget = m_pOwner->m_pInterface; |
| 1171 m_pOwner->DispatchEvent(&eClose); | 1171 m_pOwner->DispatchEvent(&eClose); |
| 1172 } | 1172 } |
| 1173 FWL_ERR FWL_Accelerator_SetForm(IFWL_Form* pFrom, | 1173 FWL_ERR FWL_Accelerator_SetForm(IFWL_Form* pFrom, |
| 1174 CFX_MapAccelerators* pMapAccel) { | 1174 CFX_MapAccelerators* pMapAccel) { |
| 1175 CFWL_FormImp* pImp = static_cast<CFWL_FormImp*>(pFrom->GetImpl()); | 1175 CFWL_FormImp* pImp = static_cast<CFWL_FormImp*>(pFrom->GetImpl()); |
| 1176 if (!pImp) | 1176 if (!pImp) |
| 1177 return FWL_ERR_Indefinite; | 1177 return FWL_ERR_Indefinite; |
| 1178 return FWL_ERR_Succeeded; | 1178 return FWL_ERR_Succeeded; |
| 1179 } | 1179 } |
| OLD | NEW |