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