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

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 23 matching lines...) Expand all
34 34
35 CFWL_CheckBoxTP::~CFWL_CheckBoxTP() { 35 CFWL_CheckBoxTP::~CFWL_CheckBoxTP() {
36 delete m_pThemeData; 36 delete m_pThemeData;
37 if (m_pCheckPath) { 37 if (m_pCheckPath) {
38 m_pCheckPath->Clear(); 38 m_pCheckPath->Clear();
39 delete m_pCheckPath; 39 delete m_pCheckPath;
40 } 40 }
41 } 41 }
42 42
43 FX_BOOL CFWL_CheckBoxTP::IsValidWidget(IFWL_Widget* pWidget) { 43 FX_BOOL CFWL_CheckBoxTP::IsValidWidget(IFWL_Widget* pWidget) {
44 return pWidget && pWidget->GetClassID() == FWL_CLASSHASH_CheckBox; 44 return pWidget && pWidget->GetClassID() == FWL_Type::CheckBox;
45 } 45 }
46 uint32_t CFWL_CheckBoxTP::SetThemeID(IFWL_Widget* pWidget, 46 uint32_t CFWL_CheckBoxTP::SetThemeID(IFWL_Widget* pWidget,
47 uint32_t dwThemeID, 47 uint32_t dwThemeID,
48 FX_BOOL bChildren) { 48 FX_BOOL bChildren) {
49 if (m_pThemeData) { 49 if (m_pThemeData) {
50 SetThemeData(FWL_GetThemeColor(dwThemeID)); 50 SetThemeData(FWL_GetThemeColor(dwThemeID));
51 } 51 }
52 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); 52 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren);
53 } 53 }
54 FX_BOOL CFWL_CheckBoxTP::DrawText(CFWL_ThemeText* pParams) { 54 FX_BOOL CFWL_CheckBoxTP::DrawText(CFWL_ThemeText* pParams) {
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 pt1.x + px2 * FX_BEZIER, pt1.y + py2 * FX_BEZIER, 496 pt1.x + px2 * FX_BEZIER, pt1.y + py2 * FX_BEZIER,
497 pt1.x, pt1.y); 497 pt1.x, pt1.y);
498 FX_FLOAT fScale = fCheckLen / kSignPath; 498 FX_FLOAT fScale = fCheckLen / kSignPath;
499 CFX_Matrix mt; 499 CFX_Matrix mt;
500 mt.Set(1, 0, 0, 1, 0, 0); 500 mt.Set(1, 0, 0, 1, 0, 0);
501 mt.Scale(fScale, fScale); 501 mt.Scale(fScale, fScale);
502 CFX_PathData* pData = m_pCheckPath->GetPathData(); 502 CFX_PathData* pData = m_pCheckPath->GetPathData();
503 pData->Transform(&mt); 503 pData->Transform(&mt);
504 } 504 }
505 } 505 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698