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

Side by Side Diff: xfa/fwl/theme/cfwl_formtp.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_formtp.h" 7 #include "xfa/fwl/theme/cfwl_formtp.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_themebackground.h" 10 #include "xfa/fwl/core/cfwl_themebackground.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 FinalizeTTO(); 55 FinalizeTTO();
56 delete m_pActiveBitmap; 56 delete m_pActiveBitmap;
57 m_pActiveBitmap = nullptr; 57 m_pActiveBitmap = nullptr;
58 delete m_pDeactivebitmap; 58 delete m_pDeactivebitmap;
59 m_pDeactivebitmap = nullptr; 59 m_pDeactivebitmap = nullptr;
60 return CFWL_WidgetTP::Finalize(); 60 return CFWL_WidgetTP::Finalize();
61 } 61 }
62 62
63 FX_BOOL CFWL_FormTP::IsValidWidget(IFWL_Widget* pWidget) { 63 FX_BOOL CFWL_FormTP::IsValidWidget(IFWL_Widget* pWidget) {
64 if (!pWidget) 64 if (!pWidget)
65 return FALSE; 65 return FALSE;
Tom Sepez 2016/05/05 16:56:48 "
dsinclair 2016/05/05 17:13:35 Done.
66 uint32_t dwHash = pWidget->GetClassID(); 66 return pWidget->GetClassID() == FWL_Type::Form;
67 return dwHash == FWL_CLASSHASH_Form;
68 } 67 }
69 uint32_t CFWL_FormTP::SetThemeID(IFWL_Widget* pWidget, 68 uint32_t CFWL_FormTP::SetThemeID(IFWL_Widget* pWidget,
70 uint32_t dwThemeID, 69 uint32_t dwThemeID,
71 FX_BOOL bChildren) { 70 FX_BOOL bChildren) {
72 if (m_pThemeData) { 71 if (m_pThemeData) {
73 SetThemeData(FWL_GetThemeColor(dwThemeID)); 72 SetThemeData(FWL_GetThemeColor(dwThemeID));
74 } 73 }
75 InitCaption(TRUE); 74 InitCaption(TRUE);
76 InitCaption(FALSE); 75 InitCaption(FALSE);
77 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); 76 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren);
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 path.Clear(); 874 path.Clear();
876 path.AddRectangle(0, 5, 1, 15); 875 path.AddRectangle(0, 5, 1, 15);
877 DrawAxialShading(&gs, 0, 5, 0, 20, m_pThemeData->clrHeadBK[1][1], 876 DrawAxialShading(&gs, 0, 5, 0, 20, m_pThemeData->clrHeadBK[1][1],
878 m_pThemeData->clrHeadBK[1][2], &path); 877 m_pThemeData->clrHeadBK[1][2], &path);
879 path.Clear(); 878 path.Clear();
880 path.AddRectangle(0, 20, 1, kCYCaption - 19); 879 path.AddRectangle(0, 20, 1, kCYCaption - 19);
881 DrawAxialShading(&gs, 0, 20, 0, kCYCaption, m_pThemeData->clrHeadBK[1][2], 880 DrawAxialShading(&gs, 0, 20, 0, kCYCaption, m_pThemeData->clrHeadBK[1][2],
882 m_pThemeData->clrHeadBK[1][3], &path); 881 m_pThemeData->clrHeadBK[1][3], &path);
883 } 882 }
884 } 883 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698