| 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 #ifndef XFA_FWL_CORE_FWL_FORMIMP_H_ | 7 #ifndef XFA_FWL_CORE_FWL_FORMIMP_H_ |
| 8 #define XFA_FWL_CORE_FWL_FORMIMP_H_ | 8 #define XFA_FWL_CORE_FWL_FORMIMP_H_ |
| 9 | 9 |
| 10 #include "xfa/fwl/core/fwl_widgetimp.h" | 10 #include "xfa/fwl/core/fwl_widgetimp.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 m_dwState |= FWL_SYSBUTTONSTATE_Pressed; | 40 m_dwState |= FWL_SYSBUTTONSTATE_Pressed; |
| 41 } | 41 } |
| 42 void SetHover() { | 42 void SetHover() { |
| 43 SetNormal(); | 43 SetNormal(); |
| 44 m_dwState |= FWL_SYSBUTTONSTATE_Hover; | 44 m_dwState |= FWL_SYSBUTTONSTATE_Hover; |
| 45 } | 45 } |
| 46 void SetDisabled(FX_BOOL bDisabled) { | 46 void SetDisabled(FX_BOOL bDisabled) { |
| 47 bDisabled ? m_dwState |= FWL_SYSBUTTONSTATE_Disabled | 47 bDisabled ? m_dwState |= FWL_SYSBUTTONSTATE_Disabled |
| 48 : m_dwState &= ~FWL_SYSBUTTONSTATE_Disabled; | 48 : m_dwState &= ~FWL_SYSBUTTONSTATE_Disabled; |
| 49 } | 49 } |
| 50 int32_t GetPartState() { | 50 uint32_t GetPartState() { |
| 51 return (IsDisabled() ? CFWL_PartState_Disabled : (m_dwState + 1)); | 51 if (IsDisabled()) |
| 52 return CFWL_PartState_Disabled; |
| 53 if (m_dwState & FWL_SYSBUTTONSTATE_Pressed) |
| 54 return CFWL_PartState_Pressed; |
| 55 if (m_dwState & FWL_SYSBUTTONSTATE_Hover) |
| 56 return CFWL_PartState_Hovered; |
| 57 return CFWL_PartState_Normal; |
| 52 } | 58 } |
| 53 | 59 |
| 54 CFX_RectF m_rtBtn; | 60 CFX_RectF m_rtBtn; |
| 55 uint32_t m_dwState; | 61 uint32_t m_dwState; |
| 56 }; | 62 }; |
| 57 | 63 |
| 58 enum FORM_RESIZETYPE { | 64 enum FORM_RESIZETYPE { |
| 59 FORM_RESIZETYPE_None = 0, | 65 FORM_RESIZETYPE_None = 0, |
| 60 FORM_RESIZETYPE_Cap, | 66 FORM_RESIZETYPE_Cap, |
| 61 }; | 67 }; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 void OnMouseMove(CFWL_MsgMouse* pMsg); | 187 void OnMouseMove(CFWL_MsgMouse* pMsg); |
| 182 void OnMouseHover(CFWL_MsgMouse* pMsg); | 188 void OnMouseHover(CFWL_MsgMouse* pMsg); |
| 183 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 189 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
| 184 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); | 190 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); |
| 185 void OnWindowMove(CFWL_MsgWindowMove* pMsg); | 191 void OnWindowMove(CFWL_MsgWindowMove* pMsg); |
| 186 void OnClose(CFWL_MsgClose* pMsg); | 192 void OnClose(CFWL_MsgClose* pMsg); |
| 187 CFWL_FormImp* m_pOwner; | 193 CFWL_FormImp* m_pOwner; |
| 188 }; | 194 }; |
| 189 | 195 |
| 190 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ | 196 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ |
| OLD | NEW |