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

Side by Side Diff: xfa/fwl/theme/cfwl_checkboxtp.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
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/theme/cfwl_checkboxtp.h" 7 #include "xfa/fwl/theme/cfwl_checkboxtp.h"
8 8
9 #include "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fwl/basewidget/ifwl_checkbox.h" 10 #include "xfa/fwl/basewidget/ifwl_checkbox.h"
(...skipping 18 matching lines...) Expand all
29 29
30 CFWL_CheckBoxTP::~CFWL_CheckBoxTP() { 30 CFWL_CheckBoxTP::~CFWL_CheckBoxTP() {
31 delete m_pThemeData; 31 delete m_pThemeData;
32 if (m_pCheckPath) { 32 if (m_pCheckPath) {
33 m_pCheckPath->Clear(); 33 m_pCheckPath->Clear();
34 delete m_pCheckPath; 34 delete m_pCheckPath;
35 } 35 }
36 } 36 }
37 37
38 FX_BOOL CFWL_CheckBoxTP::IsValidWidget(IFWL_Widget* pWidget) { 38 FX_BOOL CFWL_CheckBoxTP::IsValidWidget(IFWL_Widget* pWidget) {
39 return pWidget && pWidget->GetClassID() == FWL_CLASSHASH_CheckBox; 39 return pWidget && pWidget->GetClassID() == FWL_Type::CheckBox;
40 } 40 }
41 uint32_t CFWL_CheckBoxTP::SetThemeID(IFWL_Widget* pWidget, 41 uint32_t CFWL_CheckBoxTP::SetThemeID(IFWL_Widget* pWidget,
42 uint32_t dwThemeID, 42 uint32_t dwThemeID,
43 FX_BOOL bChildren) { 43 FX_BOOL bChildren) {
44 if (m_pThemeData) { 44 if (m_pThemeData) {
45 SetThemeData(FWL_GetThemeColor(dwThemeID)); 45 SetThemeData(FWL_GetThemeColor(dwThemeID));
46 } 46 }
47 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); 47 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren);
48 } 48 }
49 FX_BOOL CFWL_CheckBoxTP::DrawText(CFWL_ThemeText* pParams) { 49 FX_BOOL CFWL_CheckBoxTP::DrawText(CFWL_ThemeText* pParams) {
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 pt1.x + px2 * FWLTHEME_BEZIER, 498 pt1.x + px2 * FWLTHEME_BEZIER,
499 pt1.y + py2 * FWLTHEME_BEZIER, pt1.x, pt1.y); 499 pt1.y + py2 * FWLTHEME_BEZIER, pt1.x, pt1.y);
500 FX_FLOAT fScale = fCheckLen / CHECKBOX_SIZE_SIGNPATH; 500 FX_FLOAT fScale = fCheckLen / CHECKBOX_SIZE_SIGNPATH;
501 CFX_Matrix mt; 501 CFX_Matrix mt;
502 mt.Set(1, 0, 0, 1, 0, 0); 502 mt.Set(1, 0, 0, 1, 0, 0);
503 mt.Scale(fScale, fScale); 503 mt.Scale(fScale, fScale);
504 CFX_PathData* pData = m_pCheckPath->GetPathData(); 504 CFX_PathData* pData = m_pCheckPath->GetPathData();
505 pData->Transform(&mt); 505 pData->Transform(&mt);
506 } 506 }
507 } 507 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698