| 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/fxfa/app/xfa_fffield.h" | 7 #include "xfa/fxfa/app/xfa_fffield.h" |
| 8 | 8 |
| 9 #include "xfa/fwl/basewidget/ifwl_edit.h" | 9 #include "xfa/fwl/basewidget/ifwl_edit.h" |
| 10 #include "xfa/fwl/core/cfwl_message.h" | 10 #include "xfa/fwl/core/cfwl_message.h" |
| 11 #include "xfa/fwl/core/ifwl_widgetmgrdelegate.h" | 11 #include "xfa/fwl/core/fwl_widgetmgrimp.h" |
| 12 #include "xfa/fwl/lightwidget/cfwl_edit.h" | 12 #include "xfa/fwl/lightwidget/cfwl_edit.h" |
| 13 #include "xfa/fwl/lightwidget/cfwl_picturebox.h" | 13 #include "xfa/fwl/lightwidget/cfwl_picturebox.h" |
| 14 #include "xfa/fxfa/app/xfa_fwltheme.h" | 14 #include "xfa/fxfa/app/xfa_fwltheme.h" |
| 15 #include "xfa/fxfa/app/xfa_textlayout.h" | 15 #include "xfa/fxfa/app/xfa_textlayout.h" |
| 16 #include "xfa/fxfa/include/xfa_ffapp.h" | 16 #include "xfa/fxfa/include/xfa_ffapp.h" |
| 17 #include "xfa/fxfa/include/xfa_ffdoc.h" | 17 #include "xfa/fxfa/include/xfa_ffdoc.h" |
| 18 #include "xfa/fxfa/include/xfa_ffdocview.h" | 18 #include "xfa/fxfa/include/xfa_ffdocview.h" |
| 19 #include "xfa/fxfa/include/xfa_ffpageview.h" | 19 #include "xfa/fxfa/include/xfa_ffpageview.h" |
| 20 #include "xfa/fxfa/include/xfa_ffwidget.h" | 20 #include "xfa/fxfa/include/xfa_ffwidget.h" |
| 21 #include "xfa/fxgraphics/cfx_color.h" | 21 #include "xfa/fxgraphics/cfx_color.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 if (pUiNode && pUiNode->GetClassID() == XFA_ELEMENT_DefaultUi) { | 327 if (pUiNode && pUiNode->GetClassID() == XFA_ELEMENT_DefaultUi) { |
| 328 dwStyle = FWL_STYLEEXT_EDT_ReadOnly; | 328 dwStyle = FWL_STYLEEXT_EDT_ReadOnly; |
| 329 } | 329 } |
| 330 return dwStyle; | 330 return dwStyle; |
| 331 } | 331 } |
| 332 void CXFA_FFField::SetFWLRect() { | 332 void CXFA_FFField::SetFWLRect() { |
| 333 if (!m_pNormalWidget) { | 333 if (!m_pNormalWidget) { |
| 334 return; | 334 return; |
| 335 } | 335 } |
| 336 CFX_RectF rtUi = m_rtUI; | 336 CFX_RectF rtUi = m_rtUI; |
| 337 if (rtUi.width < 1.0) { | 337 if (rtUi.width < 1.0) |
| 338 ASSERT(rtUi.width < 1.0); | |
| 339 rtUi.width = 1.0; | 338 rtUi.width = 1.0; |
| 340 } | |
| 341 if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { | 339 if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { |
| 342 FX_FLOAT fFontSize = m_pDataAcc->GetFontSize(); | 340 FX_FLOAT fFontSize = m_pDataAcc->GetFontSize(); |
| 343 if (rtUi.height < fFontSize) { | 341 if (rtUi.height < fFontSize) { |
| 344 rtUi.height = fFontSize; | 342 rtUi.height = fFontSize; |
| 345 } | 343 } |
| 346 } | 344 } |
| 347 m_pNormalWidget->SetWidgetRect(rtUi); | 345 m_pNormalWidget->SetWidgetRect(rtUi); |
| 348 } | 346 } |
| 349 FX_BOOL CXFA_FFField::OnMouseEnter() { | 347 FX_BOOL CXFA_FFField::OnMouseEnter() { |
| 350 if (!m_pNormalWidget) { | 348 if (!m_pNormalWidget) { |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 default: | 830 default: |
| 833 break; | 831 break; |
| 834 } | 832 } |
| 835 return FWL_ERR_Succeeded; | 833 return FWL_ERR_Succeeded; |
| 836 } | 834 } |
| 837 | 835 |
| 838 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, | 836 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, |
| 839 const CFX_Matrix* pMatrix) { | 837 const CFX_Matrix* pMatrix) { |
| 840 return FWL_ERR_Succeeded; | 838 return FWL_ERR_Succeeded; |
| 841 } | 839 } |
| OLD | NEW |