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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } else { | 362 } else { |
363 m_dwTTOStyles |= FDE_TTOSTYLE_SingleLine; | 363 m_dwTTOStyles |= FDE_TTOSTYLE_SingleLine; |
364 } | 364 } |
365 } | 365 } |
366 void CFWL_CheckBoxImp::NextStates() { | 366 void CFWL_CheckBoxImp::NextStates() { |
367 uint32_t dwFirststate = m_pProperties->m_dwStates; | 367 uint32_t dwFirststate = m_pProperties->m_dwStates; |
368 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_RadioButton) { | 368 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_RadioButton) { |
369 if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) == | 369 if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) == |
370 FWL_STATE_CKB_Unchecked) { | 370 FWL_STATE_CKB_Unchecked) { |
371 CFWL_WidgetMgr* pWidgetMgr = | 371 CFWL_WidgetMgr* pWidgetMgr = |
372 static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); | 372 static_cast<CFWL_WidgetMgr*>(IFWL_WidgetMgr::GetInstance()); |
373 if (!pWidgetMgr->IsFormDisabled()) { | 373 if (!pWidgetMgr->IsFormDisabled()) { |
374 CFX_ArrayTemplate<IFWL_Widget*> radioarr; | 374 CFX_ArrayTemplate<IFWL_Widget*> radioarr; |
375 pWidgetMgr->GetSameGroupRadioButton(m_pInterface, radioarr); | 375 pWidgetMgr->GetSameGroupRadioButton(m_pInterface, radioarr); |
376 IFWL_CheckBox* pCheckBox = NULL; | 376 IFWL_CheckBox* pCheckBox = NULL; |
377 int32_t iCount = radioarr.GetSize(); | 377 int32_t iCount = radioarr.GetSize(); |
378 for (int32_t i = 0; i < iCount; i++) { | 378 for (int32_t i = 0; i < iCount; i++) { |
379 pCheckBox = static_cast<IFWL_CheckBox*>(radioarr[i]); | 379 pCheckBox = static_cast<IFWL_CheckBox*>(radioarr[i]); |
380 if (pCheckBox != m_pInterface && | 380 if (pCheckBox != m_pInterface && |
381 pCheckBox->GetStates() & FWL_STATE_CKB_Checked) { | 381 pCheckBox->GetStates() & FWL_STATE_CKB_Checked) { |
382 pCheckBox->SetCheckState(0); | 382 pCheckBox->SetCheckState(0); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 void CFWL_CheckBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { | 564 void CFWL_CheckBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { |
565 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) { | 565 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) { |
566 m_pOwner->DispatchKeyEvent(pMsg); | 566 m_pOwner->DispatchKeyEvent(pMsg); |
567 return; | 567 return; |
568 } | 568 } |
569 if (pMsg->m_dwKeyCode == FWL_VKEY_Return || | 569 if (pMsg->m_dwKeyCode == FWL_VKEY_Return || |
570 pMsg->m_dwKeyCode == FWL_VKEY_Space) { | 570 pMsg->m_dwKeyCode == FWL_VKEY_Space) { |
571 m_pOwner->NextStates(); | 571 m_pOwner->NextStates(); |
572 } | 572 } |
573 } | 573 } |
OLD | NEW |