| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "xfa/src/foxitlib.h" | 9 #include "xfa/src/foxitlib.h" |
| 10 #include "xfa/src/fwl/src/basewidget/include/fwl_checkboximp.h" |
| 11 #include "xfa/src/fwl/src/core/include/fwl_noteimp.h" |
| 10 #include "xfa/src/fwl/src/core/include/fwl_targetimp.h" | 12 #include "xfa/src/fwl/src/core/include/fwl_targetimp.h" |
| 11 #include "xfa/src/fwl/src/core/include/fwl_noteimp.h" | |
| 12 #include "xfa/src/fwl/src/core/include/fwl_widgetimp.h" | 13 #include "xfa/src/fwl/src/core/include/fwl_widgetimp.h" |
| 13 #include "xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h" | 14 #include "xfa/src/fwl/src/core/include/fwl_widgetmgrimp.h" |
| 14 #include "xfa/src/fwl/src/basewidget/include/fwl_checkboximp.h" | |
| 15 #define FWL_CKB_CaptionMargin 5 | 15 #define FWL_CKB_CaptionMargin 5 |
| 16 | 16 |
| 17 // static | 17 // static |
| 18 IFWL_CheckBox* IFWL_CheckBox::Create(const CFWL_WidgetImpProperties& properties, | 18 IFWL_CheckBox* IFWL_CheckBox::Create(const CFWL_WidgetImpProperties& properties, |
| 19 IFWL_Widget* pOuter) { | 19 IFWL_Widget* pOuter) { |
| 20 IFWL_CheckBox* pCheckBox = new IFWL_CheckBox; | 20 IFWL_CheckBox* pCheckBox = new IFWL_CheckBox; |
| 21 CFWL_CheckBoxImp* pCheckBoxImpl = new CFWL_CheckBoxImp(properties, pOuter); | 21 CFWL_CheckBoxImp* pCheckBoxImpl = new CFWL_CheckBoxImp(properties, pOuter); |
| 22 pCheckBox->SetImpl(pCheckBoxImpl); | 22 pCheckBox->SetImpl(pCheckBoxImpl); |
| 23 pCheckBoxImpl->SetInterface(pCheckBox); | 23 pCheckBoxImpl->SetInterface(pCheckBox); |
| 24 return pCheckBox; | 24 return pCheckBox; |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 void CFWL_CheckBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { | 542 void CFWL_CheckBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { |
| 543 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) { | 543 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) { |
| 544 m_pOwner->DispatchKeyEvent(pMsg); | 544 m_pOwner->DispatchKeyEvent(pMsg); |
| 545 return; | 545 return; |
| 546 } | 546 } |
| 547 if (pMsg->m_dwKeyCode == FWL_VKEY_Return || | 547 if (pMsg->m_dwKeyCode == FWL_VKEY_Return || |
| 548 pMsg->m_dwKeyCode == FWL_VKEY_Space) { | 548 pMsg->m_dwKeyCode == FWL_VKEY_Space) { |
| 549 m_pOwner->NextStates(); | 549 m_pOwner->NextStates(); |
| 550 } | 550 } |
| 551 } | 551 } |
| OLD | NEW |