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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 SetThemeData(0); | 53 SetThemeData(0); |
54 } | 54 } |
55 | 55 |
56 CFWL_MonthCalendarTP::~CFWL_MonthCalendarTP() {} | 56 CFWL_MonthCalendarTP::~CFWL_MonthCalendarTP() {} |
57 | 57 |
58 bool CFWL_MonthCalendarTP::IsValidWidget(IFWL_Widget* pWidget) { | 58 bool CFWL_MonthCalendarTP::IsValidWidget(IFWL_Widget* pWidget) { |
59 return pWidget && pWidget->GetClassID() == FWL_Type::MonthCalendar; | 59 return pWidget && pWidget->GetClassID() == FWL_Type::MonthCalendar; |
60 } | 60 } |
61 | 61 |
62 uint32_t CFWL_MonthCalendarTP::SetThemeID(IFWL_Widget* pWidget, | 62 uint32_t CFWL_MonthCalendarTP::SetThemeID(IFWL_Widget* pWidget, |
63 uint32_t dwThemeID, | 63 uint32_t dwThemeID) { |
64 FX_BOOL bChildren) { | |
65 if (m_pThemeData) | 64 if (m_pThemeData) |
66 SetThemeData(FWL_GetThemeColor(dwThemeID)); | 65 SetThemeData(FWL_GetThemeColor(dwThemeID)); |
67 | 66 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID); |
68 return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID, bChildren); | |
69 } | 67 } |
70 | 68 |
71 FX_BOOL CFWL_MonthCalendarTP::DrawBackground(CFWL_ThemeBackground* pParams) { | 69 FX_BOOL CFWL_MonthCalendarTP::DrawBackground(CFWL_ThemeBackground* pParams) { |
72 if (!pParams) | 70 if (!pParams) |
73 return FALSE; | 71 return FALSE; |
74 switch (pParams->m_iPart) { | 72 switch (pParams->m_iPart) { |
75 case CFWL_Part::Border: { | 73 case CFWL_Part::Border: { |
76 DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); | 74 DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); |
77 break; | 75 break; |
78 } | 76 } |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 } else { | 556 } else { |
559 m_pThemeData->clrCaption = ArgbEncode(0xff, 128, 128, 0); | 557 m_pThemeData->clrCaption = ArgbEncode(0xff, 128, 128, 0); |
560 m_pThemeData->clrSeperator = ArgbEncode(0xff, 128, 128, 64); | 558 m_pThemeData->clrSeperator = ArgbEncode(0xff, 128, 128, 64); |
561 m_pThemeData->clrDatesHoverBK = ArgbEncode(0xff, 217, 220, 191); | 559 m_pThemeData->clrDatesHoverBK = ArgbEncode(0xff, 217, 220, 191); |
562 m_pThemeData->clrDatesSelectedBK = ArgbEncode(0xff, 204, 208, 183); | 560 m_pThemeData->clrDatesSelectedBK = ArgbEncode(0xff, 204, 208, 183); |
563 m_pThemeData->clrDatesCircle = ArgbEncode(0xff, 128, 128, 0); | 561 m_pThemeData->clrDatesCircle = ArgbEncode(0xff, 128, 128, 0); |
564 m_pThemeData->clrToday = ArgbEncode(0xff, 0, 0, 0); | 562 m_pThemeData->clrToday = ArgbEncode(0xff, 0, 0, 0); |
565 m_pThemeData->clrBK = ArgbEncode(0xff, 255, 255, 255); | 563 m_pThemeData->clrBK = ArgbEncode(0xff, 255, 255, 255); |
566 } | 564 } |
567 } | 565 } |
OLD | NEW |