| 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/lightwidget/cfwl_widget.h" | 7 #include "xfa/fwl/lightwidget/cfwl_widget.h" |
| 8 | 8 |
| 9 #include "xfa/fde/tto/fde_textout.h" | 9 #include "xfa/fde/tto/fde_textout.h" |
| 10 #include "xfa/fwl/core/cfwl_themetext.h" | 10 #include "xfa/fwl/core/cfwl_themetext.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 return FWL_ERR_Indefinite; | 157 return FWL_ERR_Indefinite; |
| 158 return m_pIface->LockUpdate(); | 158 return m_pIface->LockUpdate(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 FWL_ERR CFWL_Widget::UnlockUpdate() { | 161 FWL_ERR CFWL_Widget::UnlockUpdate() { |
| 162 if (!m_pIface) | 162 if (!m_pIface) |
| 163 return FWL_ERR_Indefinite; | 163 return FWL_ERR_Indefinite; |
| 164 return m_pIface->UnlockUpdate(); | 164 return m_pIface->UnlockUpdate(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 uint32_t CFWL_Widget::HitTest(FX_FLOAT fx, FX_FLOAT fy) { | 167 FWL_WidgetHit CFWL_Widget::HitTest(FX_FLOAT fx, FX_FLOAT fy) { |
| 168 if (!m_pIface) | 168 if (!m_pIface) |
| 169 return 0; | 169 return FWL_WidgetHit::Unknown; |
| 170 return m_pIface->HitTest(fx, fy); | 170 return m_pIface->HitTest(fx, fy); |
| 171 } | 171 } |
| 172 | 172 |
| 173 FWL_ERR CFWL_Widget::TransformTo(CFWL_Widget* pWidget, | 173 FWL_ERR CFWL_Widget::TransformTo(CFWL_Widget* pWidget, |
| 174 FX_FLOAT& fx, | 174 FX_FLOAT& fx, |
| 175 FX_FLOAT& fy) { | 175 FX_FLOAT& fy) { |
| 176 if (!m_pIface) | 176 if (!m_pIface) |
| 177 return FWL_ERR_Indefinite; | 177 return FWL_ERR_Indefinite; |
| 178 return m_pIface->TransformTo(pWidget ? pWidget->GetWidget() : NULL, fx, fy); | 178 return m_pIface->TransformTo(pWidget ? pWidget->GetWidget() : NULL, fx, fy); |
| 179 } | 179 } |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; | 330 calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; |
| 331 CFX_RectF rect; | 331 CFX_RectF rect; |
| 332 FX_FLOAT fWidth = bMultiLine | 332 FX_FLOAT fWidth = bMultiLine |
| 333 ? (iLineWidth > 0 ? (FX_FLOAT)iLineWidth | 333 ? (iLineWidth > 0 ? (FX_FLOAT)iLineWidth |
| 334 : FWL_WGT_CalcMultiLineDefWidth) | 334 : FWL_WGT_CalcMultiLineDefWidth) |
| 335 : FWL_WGT_CalcWidth; | 335 : FWL_WGT_CalcWidth; |
| 336 rect.Set(0, 0, fWidth, FWL_WGT_CalcHeight); | 336 rect.Set(0, 0, fWidth, FWL_WGT_CalcHeight); |
| 337 pTheme->CalcTextRect(&calPart, rect); | 337 pTheme->CalcTextRect(&calPart, rect); |
| 338 return CFX_SizeF(rect.width, rect.height); | 338 return CFX_SizeF(rect.width, rect.height); |
| 339 } | 339 } |
| OLD | NEW |