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_IFWL_PUSHBUTTON_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_PUSHBUTTON_H_ |
8 #define XFA_FWL_CORE_IFWL_PUSHBUTTON_H_ | 8 #define XFA_FWL_CORE_IFWL_PUSHBUTTON_H_ |
9 | 9 |
10 #include "xfa/fwl/core/cfwl_widgetproperties.h" | 10 #include "xfa/fwl/core/cfwl_widgetproperties.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 FWL_Type GetClassID() const override; | 46 FWL_Type GetClassID() const override; |
47 void GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false) override; | 47 void GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false) override; |
48 void SetStates(uint32_t dwStates, bool bSet = true) override; | 48 void SetStates(uint32_t dwStates, bool bSet = true) override; |
49 void Update() override; | 49 void Update() override; |
50 void DrawWidget(CFX_Graphics* pGraphics, | 50 void DrawWidget(CFX_Graphics* pGraphics, |
51 const CFX_Matrix* pMatrix = nullptr) override; | 51 const CFX_Matrix* pMatrix = nullptr) override; |
52 void OnProcessMessage(CFWL_Message* pMessage) override; | 52 void OnProcessMessage(CFWL_Message* pMessage) override; |
53 void OnDrawWidget(CFX_Graphics* pGraphics, | 53 void OnDrawWidget(CFX_Graphics* pGraphics, |
54 const CFX_Matrix* pMatrix) override; | 54 const CFX_Matrix* pMatrix) override; |
55 | 55 |
56 protected: | 56 private: |
57 void DrawBkground(CFX_Graphics* pGraphics, | 57 void DrawBkground(CFX_Graphics* pGraphics, |
58 IFWL_ThemeProvider* pTheme, | 58 IFWL_ThemeProvider* pTheme, |
59 const CFX_Matrix* pMatrix); | 59 const CFX_Matrix* pMatrix); |
60 void DrawText(CFX_Graphics* pGraphics, | 60 void DrawText(CFX_Graphics* pGraphics, |
61 IFWL_ThemeProvider* pTheme, | 61 IFWL_ThemeProvider* pTheme, |
62 const CFX_Matrix* pMatrix); | 62 const CFX_Matrix* pMatrix); |
63 uint32_t GetPartStates(); | 63 uint32_t GetPartStates(); |
64 void UpdateTextOutStyles(); | 64 void UpdateTextOutStyles(); |
| 65 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
| 66 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
| 67 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
| 68 void OnMouseMove(CFWL_MsgMouse* pMsg); |
| 69 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
| 70 void OnKeyDown(CFWL_MsgKey* pMsg); |
65 | 71 |
66 CFX_RectF m_rtClient; | 72 CFX_RectF m_rtClient; |
67 CFX_RectF m_rtCaption; | 73 CFX_RectF m_rtCaption; |
68 bool m_bBtnDown; | 74 bool m_bBtnDown; |
69 uint32_t m_dwTTOStyles; | 75 uint32_t m_dwTTOStyles; |
70 int32_t m_iTTOAlign; | 76 int32_t m_iTTOAlign; |
71 | |
72 private: | |
73 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); | |
74 void OnLButtonDown(CFWL_MsgMouse* pMsg); | |
75 void OnLButtonUp(CFWL_MsgMouse* pMsg); | |
76 void OnMouseMove(CFWL_MsgMouse* pMsg); | |
77 void OnMouseLeave(CFWL_MsgMouse* pMsg); | |
78 void OnKeyDown(CFWL_MsgKey* pMsg); | |
79 }; | 77 }; |
80 | 78 |
81 #endif // XFA_FWL_CORE_IFWL_PUSHBUTTON_H_ | 79 #endif // XFA_FWL_CORE_IFWL_PUSHBUTTON_H_ |
OLD | NEW |