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_monthcalendartp.h" | 7 #include "xfa/fwl/theme/cfwl_monthcalendartp.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_monthcalendar.h" | 10 #include "xfa/fwl/basewidget/ifwl_monthcalendar.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 CFWL_MonthCalendarTP::CFWL_MonthCalendarTP() { | 62 CFWL_MonthCalendarTP::CFWL_MonthCalendarTP() { |
63 m_pThemeData = new MCThemeData; | 63 m_pThemeData = new MCThemeData; |
64 SetThemeData(0); | 64 SetThemeData(0); |
65 } | 65 } |
66 CFWL_MonthCalendarTP::~CFWL_MonthCalendarTP() { | 66 CFWL_MonthCalendarTP::~CFWL_MonthCalendarTP() { |
67 delete m_pThemeData; | 67 delete m_pThemeData; |
68 } | 68 } |
69 FX_BOOL CFWL_MonthCalendarTP::IsValidWidget(IFWL_Widget* pWidget) { | 69 FX_BOOL CFWL_MonthCalendarTP::IsValidWidget(IFWL_Widget* pWidget) { |
70 if (!pWidget) | 70 if (!pWidget) |
71 return FALSE; | 71 return FALSE; |
72 return pWidget->GetClassID() == FWL_CLASSHASH_MonthCalendar; | 72 return pWidget->GetClassID() == FWL_Type::MonthCalendar; |
73 } | 73 } |
74 uint32_t CFWL_MonthCalendarTP::SetThemeID(IFWL_Widget* pWidget, | 74 uint32_t CFWL_MonthCalendarTP::SetThemeID(IFWL_Widget* pWidget, |
75 uint32_t dwThemeID, | 75 uint32_t dwThemeID, |
76 FX_BOOL bChildren) { | 76 FX_BOOL bChildren) { |
77 if (m_pThemeData) { | 77 if (m_pThemeData) { |
78 SetThemeData(FWL_GetThemeColor(dwThemeID)); | 78 SetThemeData(FWL_GetThemeColor(dwThemeID)); |
79 } | 79 } |
80 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); | 80 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); |
81 } | 81 } |
82 FX_BOOL CFWL_MonthCalendarTP::DrawBackground(CFWL_ThemeBackground* pParams) { | 82 FX_BOOL CFWL_MonthCalendarTP::DrawBackground(CFWL_ThemeBackground* pParams) { |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 } else { | 569 } else { |
570 m_pThemeData->clrCaption = ArgbEncode(0xff, 128, 128, 0); | 570 m_pThemeData->clrCaption = ArgbEncode(0xff, 128, 128, 0); |
571 m_pThemeData->clrSeperator = ArgbEncode(0xff, 128, 128, 64); | 571 m_pThemeData->clrSeperator = ArgbEncode(0xff, 128, 128, 64); |
572 m_pThemeData->clrDatesHoverBK = ArgbEncode(0xff, 217, 220, 191); | 572 m_pThemeData->clrDatesHoverBK = ArgbEncode(0xff, 217, 220, 191); |
573 m_pThemeData->clrDatesSelectedBK = ArgbEncode(0xff, 204, 208, 183); | 573 m_pThemeData->clrDatesSelectedBK = ArgbEncode(0xff, 204, 208, 183); |
574 m_pThemeData->clrDatesCircle = ArgbEncode(0xff, 128, 128, 0); | 574 m_pThemeData->clrDatesCircle = ArgbEncode(0xff, 128, 128, 0); |
575 m_pThemeData->clrToday = ArgbEncode(0xff, 0, 0, 0); | 575 m_pThemeData->clrToday = ArgbEncode(0xff, 0, 0, 0); |
576 m_pThemeData->clrBK = ArgbEncode(0xff, 255, 255, 255); | 576 m_pThemeData->clrBK = ArgbEncode(0xff, 255, 255, 255); |
577 } | 577 } |
578 } | 578 } |
OLD | NEW |