| 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_checkbox.h" | 7 #include "xfa/fwl/cfwl_checkbox.h" | 
| 8 | 8 | 
| 9 #include <algorithm> | 9 #include <algorithm> | 
| 10 #include <memory> | 10 #include <memory> | 
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 65   if (!pGraphics) | 65   if (!pGraphics) | 
| 66     return; | 66     return; | 
| 67   if (!m_pProperties->m_pThemeProvider) | 67   if (!m_pProperties->m_pThemeProvider) | 
| 68     return; | 68     return; | 
| 69 | 69 | 
| 70   IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; | 70   IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; | 
| 71   if (HasBorder()) { | 71   if (HasBorder()) { | 
| 72     DrawBorder(pGraphics, CFWL_Part::Border, m_pProperties->m_pThemeProvider, | 72     DrawBorder(pGraphics, CFWL_Part::Border, m_pProperties->m_pThemeProvider, | 
| 73                pMatrix); | 73                pMatrix); | 
| 74   } | 74   } | 
| 75   if (HasEdge()) |  | 
| 76     DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix); |  | 
| 77 | 75 | 
| 78   int32_t dwStates = GetPartStates(); | 76   int32_t dwStates = GetPartStates(); | 
| 79 | 77 | 
| 80   CFWL_ThemeBackground param; | 78   CFWL_ThemeBackground param; | 
| 81   param.m_pWidget = this; | 79   param.m_pWidget = this; | 
| 82   param.m_iPart = CFWL_Part::Background; | 80   param.m_iPart = CFWL_Part::Background; | 
| 83   param.m_dwStates = dwStates; | 81   param.m_dwStates = dwStates; | 
| 84   param.m_pGraphics = pGraphics; | 82   param.m_pGraphics = pGraphics; | 
| 85   if (pMatrix) | 83   if (pMatrix) | 
| 86     param.m_matrix.Concat(*pMatrix); | 84     param.m_matrix.Concat(*pMatrix); | 
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 362 } | 360 } | 
| 363 | 361 | 
| 364 void CFWL_CheckBox::OnKeyDown(CFWL_MessageKey* pMsg) { | 362 void CFWL_CheckBox::OnKeyDown(CFWL_MessageKey* pMsg) { | 
| 365   if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) | 363   if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) | 
| 366     return; | 364     return; | 
| 367   if (pMsg->m_dwKeyCode == FWL_VKEY_Return || | 365   if (pMsg->m_dwKeyCode == FWL_VKEY_Return || | 
| 368       pMsg->m_dwKeyCode == FWL_VKEY_Space) { | 366       pMsg->m_dwKeyCode == FWL_VKEY_Space) { | 
| 369     NextStates(); | 367     NextStates(); | 
| 370   } | 368   } | 
| 371 } | 369 } | 
| OLD | NEW | 
|---|