| 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/basewidget/fwl_monthcalendarimp.h" | 7 #include "xfa/fwl/basewidget/fwl_monthcalendarimp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 } | 228 } |
| 229 ClearDateItem(); | 229 ClearDateItem(); |
| 230 ReSetDateItem(); | 230 ReSetDateItem(); |
| 231 LayOut(); | 231 LayOut(); |
| 232 return FWL_Error::Succeeded; | 232 return FWL_Error::Succeeded; |
| 233 } | 233 } |
| 234 FWL_Error CFWL_MonthCalendarImp::DrawWidget(CFX_Graphics* pGraphics, | 234 FWL_Error CFWL_MonthCalendarImp::DrawWidget(CFX_Graphics* pGraphics, |
| 235 const CFX_Matrix* pMatrix) { | 235 const CFX_Matrix* pMatrix) { |
| 236 if (!pGraphics) | 236 if (!pGraphics) |
| 237 return FWL_Error::Indefinite; | 237 return FWL_Error::Indefinite; |
| 238 if (m_pProperties->m_pThemeProvider == NULL) { | 238 if (!m_pProperties->m_pThemeProvider) |
| 239 m_pProperties->m_pThemeProvider = GetAvailableTheme(); | 239 m_pProperties->m_pThemeProvider = GetAvailableTheme(); |
| 240 } | 240 |
| 241 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; | 241 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; |
| 242 if (HasBorder()) { | 242 if (HasBorder()) { |
| 243 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); | 243 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); |
| 244 } | 244 } |
| 245 if (HasEdge()) { | 245 if (HasEdge()) { |
| 246 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix); | 246 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix); |
| 247 } | 247 } |
| 248 DrawBkground(pGraphics, pTheme, pMatrix); | 248 DrawBkground(pGraphics, pTheme, pMatrix); |
| 249 DrawHeadBK(pGraphics, pTheme, pMatrix); | 249 DrawHeadBK(pGraphics, pTheme, pMatrix); |
| 250 DrawLButton(pGraphics, pTheme, pMatrix); | 250 DrawLButton(pGraphics, pTheme, pMatrix); |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 if (m_pOwner->m_iHovered > 0) { | 1191 if (m_pOwner->m_iHovered > 0) { |
| 1192 CFX_RectF rtInvalidate; | 1192 CFX_RectF rtInvalidate; |
| 1193 rtInvalidate.Set(0, 0, 0, 0); | 1193 rtInvalidate.Set(0, 0, 0, 0); |
| 1194 m_pOwner->GetDayRect(m_pOwner->m_iHovered, rtInvalidate); | 1194 m_pOwner->GetDayRect(m_pOwner->m_iHovered, rtInvalidate); |
| 1195 m_pOwner->m_iHovered = -1; | 1195 m_pOwner->m_iHovered = -1; |
| 1196 if (!rtInvalidate.IsEmpty()) { | 1196 if (!rtInvalidate.IsEmpty()) { |
| 1197 m_pOwner->Repaint(&rtInvalidate); | 1197 m_pOwner->Repaint(&rtInvalidate); |
| 1198 } | 1198 } |
| 1199 } | 1199 } |
| 1200 } | 1200 } |
| OLD | NEW |