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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 FWL_EVENT_DEF(CFWL_EvtCkbCheckStateChanged, CFWL_EventType::CheckStateChanged) | 52 FWL_EVENT_DEF(CFWL_EvtCkbCheckStateChanged, CFWL_EventType::CheckStateChanged) |
53 | 53 |
54 class IFWL_CheckBoxDP : public IFWL_DataProvider { | 54 class IFWL_CheckBoxDP : public IFWL_DataProvider { |
55 public: | 55 public: |
56 virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0; | 56 virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0; |
57 }; | 57 }; |
58 | 58 |
59 class IFWL_CheckBox : public IFWL_Widget { | 59 class IFWL_CheckBox : public IFWL_Widget { |
60 public: | 60 public: |
61 static IFWL_CheckBox* Create(const CFWL_WidgetImpProperties& properties, | 61 explicit IFWL_CheckBox(const CFWL_WidgetImpProperties& properties); |
62 IFWL_Widget* pOuter); | |
63 | |
64 IFWL_CheckBox(const CFWL_WidgetImpProperties& properties, | |
65 IFWL_Widget* pOuter); | |
66 ~IFWL_CheckBox() override; | 62 ~IFWL_CheckBox() override; |
67 | 63 |
68 // IFWL_Widget | 64 // IFWL_Widget |
69 FWL_Error GetClassName(CFX_WideString& wsClass) const override; | 65 FWL_Error GetClassName(CFX_WideString& wsClass) const override; |
70 FWL_Type GetClassID() const override; | 66 FWL_Type GetClassID() const override; |
71 FWL_Error Initialize() override; | 67 FWL_Error Initialize() override; |
72 FWL_Error Finalize() override; | 68 FWL_Error Finalize() override; |
73 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; | 69 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; |
74 FWL_Error Update() override; | 70 FWL_Error Update() override; |
75 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 71 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 104 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
109 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 105 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
110 void OnMouseMove(CFWL_MsgMouse* pMsg); | 106 void OnMouseMove(CFWL_MsgMouse* pMsg); |
111 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 107 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
112 void OnKeyDown(CFWL_MsgKey* pMsg); | 108 void OnKeyDown(CFWL_MsgKey* pMsg); |
113 | 109 |
114 IFWL_CheckBox* m_pOwner; | 110 IFWL_CheckBox* m_pOwner; |
115 }; | 111 }; |
116 | 112 |
117 #endif // XFA_FWL_CORE_IFWL_CHECKBOX_H_ | 113 #endif // XFA_FWL_CORE_IFWL_CHECKBOX_H_ |
OLD | NEW |