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/cfwl_datetimepicker.h" | 7 #include "xfa/fwl/cfwl_datetimepicker.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 void CFWL_DateTimePicker::DrawWidget(CFX_Graphics* pGraphics, | 122 void CFWL_DateTimePicker::DrawWidget(CFX_Graphics* pGraphics, |
123 const CFX_Matrix* pMatrix) { | 123 const CFX_Matrix* pMatrix) { |
124 if (!pGraphics) | 124 if (!pGraphics) |
125 return; | 125 return; |
126 if (!m_pProperties->m_pThemeProvider) | 126 if (!m_pProperties->m_pThemeProvider) |
127 return; | 127 return; |
128 | 128 |
129 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; | 129 IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; |
130 if (HasBorder()) | 130 if (HasBorder()) |
131 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); | 131 DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); |
132 if (HasEdge()) | |
133 DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix); | |
134 if (!m_rtBtn.IsEmpty()) | 132 if (!m_rtBtn.IsEmpty()) |
135 DrawDropDownButton(pGraphics, pTheme, pMatrix); | 133 DrawDropDownButton(pGraphics, pTheme, pMatrix); |
136 if (m_pWidgetMgr->IsFormDisabled()) { | 134 if (m_pWidgetMgr->IsFormDisabled()) { |
137 DisForm_DrawWidget(pGraphics, pMatrix); | 135 DisForm_DrawWidget(pGraphics, pMatrix); |
138 return; | 136 return; |
139 } | 137 } |
140 } | 138 } |
141 | 139 |
142 void CFWL_DateTimePicker::SetThemeProvider(IFWL_ThemeProvider* pTP) { | 140 void CFWL_DateTimePicker::SetThemeProvider(IFWL_ThemeProvider* pTP) { |
143 m_pProperties->m_pThemeProvider = pTP; | 141 m_pProperties->m_pThemeProvider = pTP; |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 if (DisForm_IsMonthCalendarVisible()) | 607 if (DisForm_IsMonthCalendarVisible()) |
610 ShowMonthCalendar(false); | 608 ShowMonthCalendar(false); |
611 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { | 609 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { |
612 pMsg->m_pSrcTarget = m_pEdit.get(); | 610 pMsg->m_pSrcTarget = m_pEdit.get(); |
613 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); | 611 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); |
614 } | 612 } |
615 } | 613 } |
616 rtInvalidate.Inflate(2, 2); | 614 rtInvalidate.Inflate(2, 2); |
617 RepaintRect(rtInvalidate); | 615 RepaintRect(rtInvalidate); |
618 } | 616 } |
OLD | NEW |