| 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 #include "xfa/fwl/basewidget/fwl_checkboximp.h" | 7 #include "xfa/fwl/basewidget/fwl_checkboximp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 m_rtClient.Reset(); | 46 m_rtClient.Reset(); |
| 47 m_rtBox.Reset(); | 47 m_rtBox.Reset(); |
| 48 m_rtCaption.Reset(); | 48 m_rtCaption.Reset(); |
| 49 m_rtFocus.Reset(); | 49 m_rtFocus.Reset(); |
| 50 } | 50 } |
| 51 CFWL_CheckBoxImp::~CFWL_CheckBoxImp() {} | 51 CFWL_CheckBoxImp::~CFWL_CheckBoxImp() {} |
| 52 FWL_ERR CFWL_CheckBoxImp::GetClassName(CFX_WideString& wsClass) const { | 52 FWL_ERR CFWL_CheckBoxImp::GetClassName(CFX_WideString& wsClass) const { |
| 53 wsClass = FWL_CLASS_CheckBox; | 53 wsClass = FWL_CLASS_CheckBox; |
| 54 return FWL_ERR_Succeeded; | 54 return FWL_ERR_Succeeded; |
| 55 } | 55 } |
| 56 uint32_t CFWL_CheckBoxImp::GetClassID() const { | 56 |
| 57 return FWL_CLASSHASH_CheckBox; | |
| 58 } | |
| 59 FWL_ERR CFWL_CheckBoxImp::Initialize() { | 57 FWL_ERR CFWL_CheckBoxImp::Initialize() { |
| 60 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) | 58 if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) |
| 61 return FWL_ERR_Indefinite; | 59 return FWL_ERR_Indefinite; |
| 62 m_pDelegate = new CFWL_CheckBoxImpDelegate(this); | 60 m_pDelegate = new CFWL_CheckBoxImpDelegate(this); |
| 63 return FWL_ERR_Succeeded; | 61 return FWL_ERR_Succeeded; |
| 64 } | 62 } |
| 65 FWL_ERR CFWL_CheckBoxImp::Finalize() { | 63 FWL_ERR CFWL_CheckBoxImp::Finalize() { |
| 66 delete m_pDelegate; | 64 delete m_pDelegate; |
| 67 m_pDelegate = nullptr; | 65 m_pDelegate = nullptr; |
| 68 return CFWL_WidgetImp::Finalize(); | 66 return CFWL_WidgetImp::Finalize(); |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 void CFWL_CheckBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { | 554 void CFWL_CheckBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { |
| 557 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) { | 555 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) { |
| 558 m_pOwner->DispatchKeyEvent(pMsg); | 556 m_pOwner->DispatchKeyEvent(pMsg); |
| 559 return; | 557 return; |
| 560 } | 558 } |
| 561 if (pMsg->m_dwKeyCode == FWL_VKEY_Return || | 559 if (pMsg->m_dwKeyCode == FWL_VKEY_Return || |
| 562 pMsg->m_dwKeyCode == FWL_VKEY_Space) { | 560 pMsg->m_dwKeyCode == FWL_VKEY_Space) { |
| 563 m_pOwner->NextStates(); | 561 m_pOwner->NextStates(); |
| 564 } | 562 } |
| 565 } | 563 } |
| OLD | NEW |