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; | 42 CFX_RectF GetWidgetRect(bool bAutoSize) override; |
43 void SetStates(uint32_t dwStates) override; | 43 void SetStates(uint32_t dwStates) override; |
44 void Update() override; | 44 void Update() override; |
45 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override; | 45 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override; |
46 void OnProcessMessage(CFWL_Message* pMessage) override; | 46 void OnProcessMessage(CFWL_Message* pMessage) override; |
47 void OnDrawWidget(CFX_Graphics* pGraphics, | 47 void OnDrawWidget(CFX_Graphics* pGraphics, |
48 const CFX_Matrix* pMatrix) override; | 48 const CFX_Matrix* pMatrix) override; |
49 | 49 |
50 private: | 50 private: |
51 void DrawBkground(CFX_Graphics* pGraphics, | 51 void DrawBkground(CFX_Graphics* pGraphics, |
52 IFWL_ThemeProvider* pTheme, | 52 IFWL_ThemeProvider* pTheme, |
53 const CFX_Matrix* pMatrix); | 53 const CFX_Matrix* pMatrix); |
54 uint32_t GetPartStates(); | 54 uint32_t GetPartStates(); |
55 void UpdateTextOutStyles(); | 55 void UpdateTextOutStyles(); |
56 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); | 56 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
57 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 57 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
58 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 58 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
59 void OnMouseMove(CFWL_MsgMouse* pMsg); | 59 void OnMouseMove(CFWL_MsgMouse* pMsg); |
60 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 60 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
61 void OnKeyDown(CFWL_MsgKey* pMsg); | 61 void OnKeyDown(CFWL_MsgKey* pMsg); |
62 | 62 |
63 CFX_RectF m_rtClient; | 63 CFX_RectF m_rtClient; |
64 CFX_RectF m_rtCaption; | 64 CFX_RectF m_rtCaption; |
65 bool m_bBtnDown; | 65 bool m_bBtnDown; |
66 uint32_t m_dwTTOStyles; | 66 uint32_t m_dwTTOStyles; |
67 int32_t m_iTTOAlign; | 67 int32_t m_iTTOAlign; |
68 }; | 68 }; |
69 | 69 |
70 #endif // XFA_FWL_CORE_CFWL_PUSHBUTTON_H_ | 70 #endif // XFA_FWL_CORE_CFWL_PUSHBUTTON_H_ |
OLD | NEW |