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_pushbutton.h" | 7 #include "xfa/fwl/cfwl_pushbutton.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const CFX_Matrix* pMatrix) { | 61 const CFX_Matrix* pMatrix) { |
62 if (!pGraphics) | 62 if (!pGraphics) |
63 return; | 63 return; |
64 if (!m_pProperties->m_pThemeProvider) | 64 if (!m_pProperties->m_pThemeProvider) |
65 return; | 65 return; |
66 | 66 |
67 if (HasBorder()) { | 67 if (HasBorder()) { |
68 DrawBorder(pGraphics, CFWL_Part::Border, m_pProperties->m_pThemeProvider, | 68 DrawBorder(pGraphics, CFWL_Part::Border, m_pProperties->m_pThemeProvider, |
69 pMatrix); | 69 pMatrix); |
70 } | 70 } |
71 if (HasEdge()) { | |
72 DrawEdge(pGraphics, CFWL_Part::Edge, m_pProperties->m_pThemeProvider, | |
73 pMatrix); | |
74 } | |
75 DrawBkground(pGraphics, m_pProperties->m_pThemeProvider, pMatrix); | 71 DrawBkground(pGraphics, m_pProperties->m_pThemeProvider, pMatrix); |
76 } | 72 } |
77 | 73 |
78 void CFWL_PushButton::DrawBkground(CFX_Graphics* pGraphics, | 74 void CFWL_PushButton::DrawBkground(CFX_Graphics* pGraphics, |
79 IFWL_ThemeProvider* pTheme, | 75 IFWL_ThemeProvider* pTheme, |
80 const CFX_Matrix* pMatrix) { | 76 const CFX_Matrix* pMatrix) { |
81 CFWL_ThemeBackground param; | 77 CFWL_ThemeBackground param; |
82 param.m_pWidget = this; | 78 param.m_pWidget = this; |
83 param.m_iPart = CFWL_Part::Background; | 79 param.m_iPart = CFWL_Part::Background; |
84 param.m_dwStates = GetPartStates(); | 80 param.m_dwStates = GetPartStates(); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 if (pMsg->m_dwKeyCode != FWL_VKEY_Return) | 235 if (pMsg->m_dwKeyCode != FWL_VKEY_Return) |
240 return; | 236 return; |
241 | 237 |
242 CFWL_EventMouse wmMouse(this); | 238 CFWL_EventMouse wmMouse(this); |
243 wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp; | 239 wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp; |
244 DispatchEvent(&wmMouse); | 240 DispatchEvent(&wmMouse); |
245 | 241 |
246 CFWL_Event wmClick(CFWL_Event::Type::Click, this); | 242 CFWL_Event wmClick(CFWL_Event::Type::Click, this); |
247 DispatchEvent(&wmClick); | 243 DispatchEvent(&wmClick); |
248 } | 244 } |
OLD | NEW |