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_CFWL_PUSHBUTTON_H_ | 7 #ifndef XFA_FWL_CORE_CFWL_PUSHBUTTON_H_ |
8 #define XFA_FWL_CORE_CFWL_PUSHBUTTON_H_ | 8 #define XFA_FWL_CORE_CFWL_PUSHBUTTON_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 21 matching lines...) Expand all Loading... |
32 class CFX_DIBitmap; | 32 class CFX_DIBitmap; |
33 class CFWL_Widget; | 33 class CFWL_Widget; |
34 | 34 |
35 class CFWL_PushButton : public CFWL_Widget { | 35 class CFWL_PushButton : public CFWL_Widget { |
36 public: | 36 public: |
37 explicit CFWL_PushButton(const CFWL_App*); | 37 explicit CFWL_PushButton(const CFWL_App*); |
38 ~CFWL_PushButton() override; | 38 ~CFWL_PushButton() override; |
39 | 39 |
40 // CFWL_Widget | 40 // CFWL_Widget |
41 FWL_Type GetClassID() const override; | 41 FWL_Type GetClassID() const override; |
42 void GetWidgetRect(CFX_RectF& rect, bool bAutoSize) override; | |
43 void SetStates(uint32_t dwStates) override; | 42 void SetStates(uint32_t dwStates) override; |
44 void Update() override; | 43 void Update() override; |
45 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override; | 44 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override; |
46 void OnProcessMessage(CFWL_Message* pMessage) override; | 45 void OnProcessMessage(CFWL_Message* pMessage) override; |
47 void OnDrawWidget(CFX_Graphics* pGraphics, | 46 void OnDrawWidget(CFX_Graphics* pGraphics, |
48 const CFX_Matrix* pMatrix) override; | 47 const CFX_Matrix* pMatrix) override; |
49 | 48 |
50 private: | 49 private: |
51 void DrawBkground(CFX_Graphics* pGraphics, | 50 void DrawBkground(CFX_Graphics* pGraphics, |
52 IFWL_ThemeProvider* pTheme, | 51 IFWL_ThemeProvider* pTheme, |
53 const CFX_Matrix* pMatrix); | 52 const CFX_Matrix* pMatrix); |
54 uint32_t GetPartStates(); | 53 uint32_t GetPartStates(); |
55 void UpdateTextOutStyles(); | 54 void UpdateTextOutStyles(); |
56 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); | 55 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
57 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 56 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
58 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 57 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
59 void OnMouseMove(CFWL_MsgMouse* pMsg); | 58 void OnMouseMove(CFWL_MsgMouse* pMsg); |
60 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 59 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
61 void OnKeyDown(CFWL_MsgKey* pMsg); | 60 void OnKeyDown(CFWL_MsgKey* pMsg); |
62 | 61 |
63 CFX_RectF m_rtClient; | 62 CFX_RectF m_rtClient; |
64 CFX_RectF m_rtCaption; | 63 CFX_RectF m_rtCaption; |
65 bool m_bBtnDown; | 64 bool m_bBtnDown; |
66 uint32_t m_dwTTOStyles; | 65 uint32_t m_dwTTOStyles; |
67 int32_t m_iTTOAlign; | 66 int32_t m_iTTOAlign; |
68 }; | 67 }; |
69 | 68 |
70 #endif // XFA_FWL_CORE_CFWL_PUSHBUTTON_H_ | 69 #endif // XFA_FWL_CORE_CFWL_PUSHBUTTON_H_ |
OLD | NEW |