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_BASEWIDGET_FWL_PUSHBUTTONIMP_H_ | 7 #ifndef XFA_FWL_BASEWIDGET_FWL_PUSHBUTTONIMP_H_ |
8 #define XFA_FWL_BASEWIDGET_FWL_PUSHBUTTONIMP_H_ | 8 #define XFA_FWL_BASEWIDGET_FWL_PUSHBUTTONIMP_H_ |
9 | 9 |
10 #include "xfa/fwl/core/fwl_widgetimp.h" | 10 #include "xfa/fwl/core/fwl_widgetimp.h" |
11 | 11 |
12 class CFWL_MsgMouse; | 12 class CFWL_MsgMouse; |
13 class CFWL_WidgetImpProperties; | 13 class CFWL_WidgetImpProperties; |
14 class CFWL_PushButtonImpDelegate; | 14 class CFWL_PushButtonImpDelegate; |
15 class IFWL_Widget; | 15 class IFWL_Widget; |
16 | 16 |
17 class CFWL_PushButtonImp : public CFWL_WidgetImp { | 17 class CFWL_PushButtonImp : public CFWL_WidgetImp { |
18 public: | 18 public: |
19 CFWL_PushButtonImp(const CFWL_WidgetImpProperties& properties, | 19 CFWL_PushButtonImp(const CFWL_WidgetImpProperties& properties, |
20 IFWL_Widget* pOuter); | 20 IFWL_Widget* pOuter); |
21 virtual ~CFWL_PushButtonImp(); | 21 virtual ~CFWL_PushButtonImp(); |
22 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; | 22 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; |
23 virtual uint32_t GetClassID() const; | 23 virtual uint32_t GetClassID() const; |
24 virtual FWL_ERR Initialize(); | 24 virtual FWL_ERR Initialize(); |
25 virtual FWL_ERR Finalize(); | 25 virtual FWL_ERR Finalize(); |
26 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); | 26 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); |
27 virtual FWL_ERR SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE); | 27 virtual void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE); |
28 virtual FWL_ERR Update(); | 28 virtual FWL_ERR Update(); |
29 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, | 29 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, |
30 const CFX_Matrix* pMatrix = NULL); | 30 const CFX_Matrix* pMatrix = NULL); |
31 | 31 |
32 protected: | 32 protected: |
33 void DrawBkground(CFX_Graphics* pGraphics, | 33 void DrawBkground(CFX_Graphics* pGraphics, |
34 IFWL_ThemeProvider* pTheme, | 34 IFWL_ThemeProvider* pTheme, |
35 const CFX_Matrix* pMatrix); | 35 const CFX_Matrix* pMatrix); |
36 void DrawText(CFX_Graphics* pGraphics, | 36 void DrawText(CFX_Graphics* pGraphics, |
37 IFWL_ThemeProvider* pTheme, | 37 IFWL_ThemeProvider* pTheme, |
(...skipping 20 matching lines...) Expand all Loading... |
58 void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); | 58 void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); |
59 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 59 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
60 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 60 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
61 void OnMouseMove(CFWL_MsgMouse* pMsg); | 61 void OnMouseMove(CFWL_MsgMouse* pMsg); |
62 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 62 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
63 void OnKeyDown(CFWL_MsgKey* pMsg); | 63 void OnKeyDown(CFWL_MsgKey* pMsg); |
64 CFWL_PushButtonImp* m_pOwner; | 64 CFWL_PushButtonImp* m_pOwner; |
65 }; | 65 }; |
66 | 66 |
67 #endif // XFA_FWL_BASEWIDGET_FWL_PUSHBUTTONIMP_H_ | 67 #endif // XFA_FWL_BASEWIDGET_FWL_PUSHBUTTONIMP_H_ |
OLD | NEW |