| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_sysbtn.h" | 7 #include "xfa/fwl/cfwl_sysbtn.h" |
| 8 | 8 |
| 9 #include "xfa/fwl/core/cfwl_themepart.h" | 9 #include "xfa/fwl/cfwl_themepart.h" |
| 10 | 10 |
| 11 CFWL_SysBtn::CFWL_SysBtn() { | 11 CFWL_SysBtn::CFWL_SysBtn() { |
| 12 m_rtBtn.Set(0, 0, 0, 0); | 12 m_rtBtn.Set(0, 0, 0, 0); |
| 13 m_dwState = 0; | 13 m_dwState = 0; |
| 14 } | 14 } |
| 15 | 15 |
| 16 CFWL_SysBtn::~CFWL_SysBtn() {} | 16 CFWL_SysBtn::~CFWL_SysBtn() {} |
| 17 | 17 |
| 18 bool CFWL_SysBtn::IsDisabled() const { | 18 bool CFWL_SysBtn::IsDisabled() const { |
| 19 return !!(m_dwState & FWL_SYSBUTTONSTATE_Disabled); | 19 return !!(m_dwState & FWL_SYSBUTTONSTATE_Disabled); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 uint32_t CFWL_SysBtn::GetPartState() const { | 41 uint32_t CFWL_SysBtn::GetPartState() const { |
| 42 if (IsDisabled()) | 42 if (IsDisabled()) |
| 43 return CFWL_PartState_Disabled; | 43 return CFWL_PartState_Disabled; |
| 44 if (m_dwState & FWL_SYSBUTTONSTATE_Pressed) | 44 if (m_dwState & FWL_SYSBUTTONSTATE_Pressed) |
| 45 return CFWL_PartState_Pressed; | 45 return CFWL_PartState_Pressed; |
| 46 if (m_dwState & FWL_SYSBUTTONSTATE_Hover) | 46 if (m_dwState & FWL_SYSBUTTONSTATE_Hover) |
| 47 return CFWL_PartState_Hovered; | 47 return CFWL_PartState_Hovered; |
| 48 return CFWL_PartState_Normal; | 48 return CFWL_PartState_Normal; |
| 49 } | 49 } |
| OLD | NEW |