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

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

Issue 1946213003: Remove CLASSHASH defines in favour of an 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/fwl/theme/cfwl_barcodetp.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 11 matching lines...) Expand all
22 IFWL_Widget* CFWL_Widget::GetWidget() { 22 IFWL_Widget* CFWL_Widget::GetWidget() {
23 return m_pIface; 23 return m_pIface;
24 } 24 }
25 25
26 FWL_Error CFWL_Widget::GetClassName(CFX_WideString& wsClass) const { 26 FWL_Error CFWL_Widget::GetClassName(CFX_WideString& wsClass) const {
27 if (!m_pIface) 27 if (!m_pIface)
28 return FWL_Error::Indefinite; 28 return FWL_Error::Indefinite;
29 return m_pIface->GetClassName(wsClass); 29 return m_pIface->GetClassName(wsClass);
30 } 30 }
31 31
32 uint32_t CFWL_Widget::GetClassID() const { 32 FWL_Type CFWL_Widget::GetClassID() const {
33 if (!m_pIface) 33 if (!m_pIface)
34 return 0; 34 return FWL_Type::Unknown;
35 return m_pIface->GetClassID(); 35 return m_pIface->GetClassID();
36 } 36 }
37 37
38 FX_BOOL CFWL_Widget::IsInstance(const CFX_WideStringC& wsClass) const { 38 FX_BOOL CFWL_Widget::IsInstance(const CFX_WideStringC& wsClass) const {
39 if (!m_pIface) 39 if (!m_pIface)
40 return FALSE; 40 return FALSE;
41 return m_pIface->IsInstance(wsClass); 41 return m_pIface->IsInstance(wsClass);
42 } 42 }
43 43
44 static void* gs_pFWLWidget = (void*)FXBSTR_ID('l', 'i', 'g', 't'); 44 static void* gs_pFWLWidget = (void*)FXBSTR_ID('l', 'i', 'g', 't');
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_widget.h ('k') | xfa/fwl/theme/cfwl_barcodetp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698