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

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
« no previous file with comments | « xfa/fwl/theme/cfwl_formtp.h ('k') | xfa/fwl/theme/cfwl_listboxtp.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/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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 FWL_Error CFWL_FormTP::Finalize() { 54 FWL_Error CFWL_FormTP::Finalize() {
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 bool CFWL_FormTP::IsValidWidget(IFWL_Widget* pWidget) {
64 if (!pWidget) 64 return pWidget && pWidget->GetClassID() == FWL_Type::Form;
65 return FALSE;
66 uint32_t dwHash = pWidget->GetClassID();
67 return dwHash == FWL_CLASSHASH_Form;
68 } 65 }
66
69 uint32_t CFWL_FormTP::SetThemeID(IFWL_Widget* pWidget, 67 uint32_t CFWL_FormTP::SetThemeID(IFWL_Widget* pWidget,
70 uint32_t dwThemeID, 68 uint32_t dwThemeID,
71 FX_BOOL bChildren) { 69 FX_BOOL bChildren) {
72 if (m_pThemeData) { 70 if (m_pThemeData) {
73 SetThemeData(FWL_GetThemeColor(dwThemeID)); 71 SetThemeData(FWL_GetThemeColor(dwThemeID));
74 } 72 }
75 InitCaption(TRUE); 73 InitCaption(TRUE);
76 InitCaption(FALSE); 74 InitCaption(FALSE);
77 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); 75 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren);
78 } 76 }
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 path.Clear(); 873 path.Clear();
876 path.AddRectangle(0, 5, 1, 15); 874 path.AddRectangle(0, 5, 1, 15);
877 DrawAxialShading(&gs, 0, 5, 0, 20, m_pThemeData->clrHeadBK[1][1], 875 DrawAxialShading(&gs, 0, 5, 0, 20, m_pThemeData->clrHeadBK[1][1],
878 m_pThemeData->clrHeadBK[1][2], &path); 876 m_pThemeData->clrHeadBK[1][2], &path);
879 path.Clear(); 877 path.Clear();
880 path.AddRectangle(0, 20, 1, kCYCaption - 19); 878 path.AddRectangle(0, 20, 1, kCYCaption - 19);
881 DrawAxialShading(&gs, 0, 20, 0, kCYCaption, m_pThemeData->clrHeadBK[1][2], 879 DrawAxialShading(&gs, 0, 20, 0, kCYCaption, m_pThemeData->clrHeadBK[1][2],
882 m_pThemeData->clrHeadBK[1][3], &path); 880 m_pThemeData->clrHeadBK[1][3], &path);
883 } 881 }
884 } 882 }
OLDNEW
« no previous file with comments | « xfa/fwl/theme/cfwl_formtp.h ('k') | xfa/fwl/theme/cfwl_listboxtp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698