Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1116)

Side by Side Diff: xfa/fwl/lightwidget/cfwl_widget.cpp

Issue 1948583002: Remove FWL_WGTHITTEST_* defines in favour of enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_widget.h ('k') | xfa/fxfa/app/xfa_fffield.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_widget.h ('k') | xfa/fxfa/app/xfa_fffield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698