| 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" |
| 11 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
| 11 #include "xfa/fwl/core/fwl_noteimp.h" | 12 #include "xfa/fwl/core/fwl_noteimp.h" |
| 12 #include "xfa/fwl/core/fwl_noteimp.h" | 13 #include "xfa/fwl/core/fwl_noteimp.h" |
| 13 #include "xfa/fwl/core/fwl_widgetimp.h" | 14 #include "xfa/fwl/core/fwl_widgetimp.h" |
| 14 #include "xfa/fwl/core/fwl_widgetmgrimp.h" | |
| 15 #include "xfa/fwl/core/ifwl_app.h" | 15 #include "xfa/fwl/core/ifwl_app.h" |
| 16 #include "xfa/fwl/core/ifwl_themeprovider.h" | 16 #include "xfa/fwl/core/ifwl_themeprovider.h" |
| 17 | 17 |
| 18 #define FWL_WGT_CalcHeight 2048 | 18 #define FWL_WGT_CalcHeight 2048 |
| 19 #define FWL_WGT_CalcWidth 2048 | 19 #define FWL_WGT_CalcWidth 2048 |
| 20 #define FWL_WGT_CalcMultiLineDefWidth 120.0f | 20 #define FWL_WGT_CalcMultiLineDefWidth 120.0f |
| 21 | 21 |
| 22 IFWL_Widget* CFWL_Widget::GetWidget() { | 22 IFWL_Widget* CFWL_Widget::GetWidget() { |
| 23 return m_pIface; | 23 return m_pIface; |
| 24 } | 24 } |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; | 334 calPart.m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; |
| 335 CFX_RectF rect; | 335 CFX_RectF rect; |
| 336 FX_FLOAT fWidth = bMultiLine | 336 FX_FLOAT fWidth = bMultiLine |
| 337 ? (iLineWidth > 0 ? (FX_FLOAT)iLineWidth | 337 ? (iLineWidth > 0 ? (FX_FLOAT)iLineWidth |
| 338 : FWL_WGT_CalcMultiLineDefWidth) | 338 : FWL_WGT_CalcMultiLineDefWidth) |
| 339 : FWL_WGT_CalcWidth; | 339 : FWL_WGT_CalcWidth; |
| 340 rect.Set(0, 0, fWidth, FWL_WGT_CalcHeight); | 340 rect.Set(0, 0, fWidth, FWL_WGT_CalcHeight); |
| 341 pTheme->CalcTextRect(&calPart, rect); | 341 pTheme->CalcTextRect(&calPart, rect); |
| 342 return CFX_SizeF(rect.width, rect.height); | 342 return CFX_SizeF(rect.width, rect.height); |
| 343 } | 343 } |
| OLD | NEW |