| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 FWL_EVENT_DEF(CFWL_EvtCkbCheckStateChanged, CFWL_EventType::CheckStateChanged) | 51 FWL_EVENT_DEF(CFWL_EvtCkbCheckStateChanged, CFWL_EventType::CheckStateChanged) |
| 52 | 52 |
| 53 class IFWL_CheckBoxDP : public IFWL_DataProvider { | 53 class IFWL_CheckBoxDP : public IFWL_DataProvider { |
| 54 public: | 54 public: |
| 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 CFWL_WidgetImpProperties& properties); | 60 explicit IFWL_CheckBox(const IFWL_App* app, |
| 61 const CFWL_WidgetImpProperties& properties); |
| 61 ~IFWL_CheckBox() override; | 62 ~IFWL_CheckBox() override; |
| 62 | 63 |
| 63 // IFWL_Widget | 64 // IFWL_Widget |
| 65 void Initialize() override; |
| 66 void Finalize() override; |
| 64 FWL_Type GetClassID() const override; | 67 FWL_Type GetClassID() const override; |
| 65 FWL_Error Initialize() override; | |
| 66 void Finalize() override; | |
| 67 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; | 68 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; |
| 68 FWL_Error Update() override; | 69 FWL_Error Update() override; |
| 69 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 70 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
| 70 const CFX_Matrix* pMatrix = nullptr) override; | 71 const CFX_Matrix* pMatrix = nullptr) override; |
| 71 int32_t GetCheckState(); | 72 int32_t GetCheckState(); |
| 72 FWL_Error SetCheckState(int32_t iCheck); | 73 FWL_Error SetCheckState(int32_t iCheck); |
| 73 | 74 |
| 74 protected: | 75 protected: |
| 75 friend class CFWL_CheckBoxImpDelegate; | 76 friend class CFWL_CheckBoxImpDelegate; |
| 76 | 77 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 102 void OnLButtonDown(CFWL_MsgMouse* pMsg); | 103 void OnLButtonDown(CFWL_MsgMouse* pMsg); |
| 103 void OnLButtonUp(CFWL_MsgMouse* pMsg); | 104 void OnLButtonUp(CFWL_MsgMouse* pMsg); |
| 104 void OnMouseMove(CFWL_MsgMouse* pMsg); | 105 void OnMouseMove(CFWL_MsgMouse* pMsg); |
| 105 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 106 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
| 106 void OnKeyDown(CFWL_MsgKey* pMsg); | 107 void OnKeyDown(CFWL_MsgKey* pMsg); |
| 107 | 108 |
| 108 IFWL_CheckBox* m_pOwner; | 109 IFWL_CheckBox* m_pOwner; |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 #endif // XFA_FWL_CORE_IFWL_CHECKBOX_H_ | 112 #endif // XFA_FWL_CORE_IFWL_CHECKBOX_H_ |
| OLD | NEW |