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_CHECKBOX_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_CHECKBOX_H_ |
8 #define XFA_FWL_CORE_IFWL_CHECKBOX_H_ | 8 #define XFA_FWL_CORE_IFWL_CHECKBOX_H_ |
9 | 9 |
10 #include "xfa/fwl/core/cfwl_event.h" | 10 #include "xfa/fwl/core/cfwl_event.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0; | 55 virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0; |
56 }; | 56 }; |
57 | 57 |
58 class IFWL_CheckBox : public IFWL_Widget { | 58 class IFWL_CheckBox : public IFWL_Widget { |
59 public: | 59 public: |
60 explicit IFWL_CheckBox(const IFWL_App* app, | 60 explicit IFWL_CheckBox(const IFWL_App* app, |
61 const CFWL_WidgetImpProperties& properties); | 61 const CFWL_WidgetImpProperties& properties); |
62 ~IFWL_CheckBox() override; | 62 ~IFWL_CheckBox() override; |
63 | 63 |
64 // IFWL_Widget | 64 // IFWL_Widget |
65 void Initialize() override; | |
66 void Finalize() override; | |
67 FWL_Type GetClassID() const override; | 65 FWL_Type GetClassID() const override; |
68 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; | 66 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; |
69 FWL_Error Update() override; | 67 FWL_Error Update() override; |
70 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 68 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
71 const CFX_Matrix* pMatrix = nullptr) override; | 69 const CFX_Matrix* pMatrix = nullptr) override; |
72 int32_t GetCheckState(); | 70 int32_t GetCheckState(); |
73 FWL_Error SetCheckState(int32_t iCheck); | 71 FWL_Error SetCheckState(int32_t iCheck); |
74 | 72 |
75 protected: | 73 protected: |
76 friend class CFWL_CheckBoxImpDelegate; | 74 friend class CFWL_CheckBoxImpDelegate; |
(...skipping 26 matching lines...) Expand all Loading... |
103 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 101 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
104 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 102 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
105 void OnMouseMove(CFWL_MsgMouse* pMsg); | 103 void OnMouseMove(CFWL_MsgMouse* pMsg); |
106 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 104 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
107 void OnKeyDown(CFWL_MsgKey* pMsg); | 105 void OnKeyDown(CFWL_MsgKey* pMsg); |
108 | 106 |
109 IFWL_CheckBox* m_pOwner; | 107 IFWL_CheckBox* m_pOwner; |
110 }; | 108 }; |
111 | 109 |
112 #endif // XFA_FWL_CORE_IFWL_CHECKBOX_H_ | 110 #endif // XFA_FWL_CORE_IFWL_CHECKBOX_H_ |
OLD | NEW |