OLD | NEW |
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_datetimepickertp.h" | 7 #include "xfa/fwl/theme/cfwl_datetimepickertp.h" |
8 | 8 |
9 #include "xfa/fwl/basewidget/ifwl_datetimepicker.h" | 9 #include "xfa/fwl/basewidget/ifwl_datetimepicker.h" |
10 #include "xfa/fwl/core/cfwl_themebackground.h" | 10 #include "xfa/fwl/core/cfwl_themebackground.h" |
11 | 11 |
12 CFWL_DateTimePickerTP::CFWL_DateTimePickerTP() { | 12 CFWL_DateTimePickerTP::CFWL_DateTimePickerTP() { |
13 m_pThemeData = new DTPThemeData; | 13 m_pThemeData = new DTPThemeData; |
14 initThemeData(); | 14 initThemeData(); |
15 } | 15 } |
| 16 |
16 CFWL_DateTimePickerTP::~CFWL_DateTimePickerTP() { | 17 CFWL_DateTimePickerTP::~CFWL_DateTimePickerTP() { |
17 delete m_pThemeData; | 18 delete m_pThemeData; |
18 } | 19 } |
19 FX_BOOL CFWL_DateTimePickerTP::IsValidWidget(IFWL_Widget* pWidget) { | 20 |
20 if (!pWidget) | 21 bool CFWL_DateTimePickerTP::IsValidWidget(IFWL_Widget* pWidget) { |
21 return FALSE; | 22 return pWidget && pWidget->GetClassID() == FWL_Type::DateTimePicker; |
22 return pWidget->GetClassID() == FWL_CLASSHASH_DateTimePicker; | |
23 } | 23 } |
| 24 |
24 FX_BOOL CFWL_DateTimePickerTP::DrawBackground(CFWL_ThemeBackground* pParams) { | 25 FX_BOOL CFWL_DateTimePickerTP::DrawBackground(CFWL_ThemeBackground* pParams) { |
25 if (!pParams) | 26 if (!pParams) |
26 return FALSE; | 27 return FALSE; |
27 switch (pParams->m_iPart) { | 28 switch (pParams->m_iPart) { |
28 case CFWL_Part::Border: { | 29 case CFWL_Part::Border: { |
29 DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); | 30 DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); |
30 break; | 31 break; |
31 } | 32 } |
32 case CFWL_Part::Edge: { | 33 case CFWL_Part::Edge: { |
33 DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(), | 34 DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(), |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 *pData++ = ArgbEncode(255, 255, 255, 255), | 94 *pData++ = ArgbEncode(255, 255, 255, 255), |
94 *pData++ = ArgbEncode(255, 220, 220, 215), | 95 *pData++ = ArgbEncode(255, 220, 220, 215), |
95 *pData++ = ArgbEncode(255, 255, 255, 255), | 96 *pData++ = ArgbEncode(255, 255, 255, 255), |
96 *pData++ = ArgbEncode(255, 255, 240, 207), | 97 *pData++ = ArgbEncode(255, 255, 240, 207), |
97 *pData++ = ArgbEncode(255, 248, 179, 48), | 98 *pData++ = ArgbEncode(255, 248, 179, 48), |
98 *pData++ = ArgbEncode(255, 176, 176, 167), | 99 *pData++ = ArgbEncode(255, 176, 176, 167), |
99 *pData++ = ArgbEncode(255, 241, 239, 239), | 100 *pData++ = ArgbEncode(255, 241, 239, 239), |
100 *pData++ = ArgbEncode(255, 255, 255, 255), | 101 *pData++ = ArgbEncode(255, 255, 255, 255), |
101 *pData++ = ArgbEncode(255, 255, 255, 255); | 102 *pData++ = ArgbEncode(255, 255, 255, 255); |
102 } | 103 } |
OLD | NEW |