| 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 14 matching lines...) Expand all Loading... |
| 25 #define FWL_SYSBUTTONSTATE_Pressed 0x0002 | 25 #define FWL_SYSBUTTONSTATE_Pressed 0x0002 |
| 26 #define FWL_SYSBUTTONSTATE_Disabled 0x0010 | 26 #define FWL_SYSBUTTONSTATE_Disabled 0x0010 |
| 27 | 27 |
| 28 class CFWL_SysBtn { | 28 class CFWL_SysBtn { |
| 29 public: | 29 public: |
| 30 CFWL_SysBtn() { | 30 CFWL_SysBtn() { |
| 31 m_rtBtn.Set(0, 0, 0, 0); | 31 m_rtBtn.Set(0, 0, 0, 0); |
| 32 m_dwState = 0; | 32 m_dwState = 0; |
| 33 } | 33 } |
| 34 | 34 |
| 35 FX_BOOL IsDisabled() { return m_dwState & FWL_SYSBUTTONSTATE_Disabled; } | 35 bool IsDisabled() { return !!(m_dwState & FWL_SYSBUTTONSTATE_Disabled); } |
| 36 | 36 |
| 37 void SetNormal() { m_dwState &= 0xFFF0; } | 37 void SetNormal() { m_dwState &= 0xFFF0; } |
| 38 void SetPressed() { | 38 void SetPressed() { |
| 39 SetNormal(); | 39 SetNormal(); |
| 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 } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 void OnMouseMove(CFWL_MsgMouse* pMsg); | 179 void OnMouseMove(CFWL_MsgMouse* pMsg); |
| 180 void OnMouseHover(CFWL_MsgMouse* pMsg); | 180 void OnMouseHover(CFWL_MsgMouse* pMsg); |
| 181 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 181 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
| 182 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); | 182 void OnLButtonDblClk(CFWL_MsgMouse* pMsg); |
| 183 void OnWindowMove(CFWL_MsgWindowMove* pMsg); | 183 void OnWindowMove(CFWL_MsgWindowMove* pMsg); |
| 184 void OnClose(CFWL_MsgClose* pMsg); | 184 void OnClose(CFWL_MsgClose* pMsg); |
| 185 CFWL_FormImp* m_pOwner; | 185 CFWL_FormImp* m_pOwner; |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ | 188 #endif // XFA_FWL_CORE_FWL_FORMIMP_H_ |
| OLD | NEW |