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 26 matching lines...) Expand all Loading... |
37 }; | 37 }; |
38 | 38 |
39 class IFWL_PushButton : public IFWL_Widget { | 39 class IFWL_PushButton : public IFWL_Widget { |
40 public: | 40 public: |
41 IFWL_PushButton(const IFWL_App* app, | 41 IFWL_PushButton(const IFWL_App* app, |
42 std::unique_ptr<CFWL_WidgetProperties> properties); | 42 std::unique_ptr<CFWL_WidgetProperties> properties); |
43 ~IFWL_PushButton() override; | 43 ~IFWL_PushButton() override; |
44 | 44 |
45 // IFWL_Widget | 45 // IFWL_Widget |
46 FWL_Type GetClassID() const override; | 46 FWL_Type GetClassID() const override; |
47 FWL_Error 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 FWL_Error Update() override; | 49 void Update() override; |
50 FWL_Error 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 protected: |
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, |
(...skipping 10 matching lines...) Expand all Loading... |
72 private: | 72 private: |
73 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); | 73 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); |
74 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 74 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
75 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 75 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
76 void OnMouseMove(CFWL_MsgMouse* pMsg); | 76 void OnMouseMove(CFWL_MsgMouse* pMsg); |
77 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 77 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
78 void OnKeyDown(CFWL_MsgKey* pMsg); | 78 void OnKeyDown(CFWL_MsgKey* pMsg); |
79 }; | 79 }; |
80 | 80 |
81 #endif // XFA_FWL_CORE_IFWL_PUSHBUTTON_H_ | 81 #endif // XFA_FWL_CORE_IFWL_PUSHBUTTON_H_ |
OLD | NEW |