| 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/core/cfwl_pushbutton.h" | 7 #include "xfa/fwl/core/cfwl_pushbutton.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 return; | 41 return; |
| 42 } | 42 } |
| 43 | 43 |
| 44 rect.Set(0, 0, 0, 0); | 44 rect.Set(0, 0, 0, 0); |
| 45 if (!m_pProperties->m_pThemeProvider) | 45 if (!m_pProperties->m_pThemeProvider) |
| 46 m_pProperties->m_pThemeProvider = GetAvailableTheme(); | 46 m_pProperties->m_pThemeProvider = GetAvailableTheme(); |
| 47 | 47 |
| 48 FX_FLOAT* fcaption = | 48 FX_FLOAT* fcaption = |
| 49 static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::Margin)); | 49 static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::Margin)); |
| 50 rect.Inflate(*fcaption, *fcaption); | 50 rect.Inflate(*fcaption, *fcaption); |
| 51 CFWL_Widget::GetWidgetRect(rect, true); | 51 InflateWidgetRect(rect); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void CFWL_PushButton::SetStates(uint32_t dwStates) { | 54 void CFWL_PushButton::SetStates(uint32_t dwStates) { |
| 55 if (dwStates & FWL_WGTSTATE_Disabled) { | 55 if (dwStates & FWL_WGTSTATE_Disabled) { |
| 56 m_pProperties->m_dwStates = FWL_WGTSTATE_Disabled; | 56 m_pProperties->m_dwStates = FWL_WGTSTATE_Disabled; |
| 57 return; | 57 return; |
| 58 } | 58 } |
| 59 CFWL_Widget::SetStates(dwStates); | 59 CFWL_Widget::SetStates(dwStates); |
| 60 } | 60 } |
| 61 | 61 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 if (pMsg->m_dwKeyCode != FWL_VKEY_Return) | 298 if (pMsg->m_dwKeyCode != FWL_VKEY_Return) |
| 299 return; | 299 return; |
| 300 | 300 |
| 301 CFWL_EvtMouse wmMouse(this); | 301 CFWL_EvtMouse wmMouse(this); |
| 302 wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp; | 302 wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp; |
| 303 DispatchEvent(&wmMouse); | 303 DispatchEvent(&wmMouse); |
| 304 | 304 |
| 305 CFWL_Event wmClick(CFWL_Event::Type::Click, this); | 305 CFWL_Event wmClick(CFWL_Event::Type::Click, this); |
| 306 DispatchEvent(&wmClick); | 306 DispatchEvent(&wmClick); |
| 307 } | 307 } |
| OLD | NEW |