Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: xfa/fwl/basewidget/fwl_checkboximp.cpp

Issue 1937453002: Replace CFX_PtryArray with typesafe CFX_ArrayTemplate, Part 7 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 354 }
355 } 355 }
356 void CFWL_CheckBoxImp::NextStates() { 356 void CFWL_CheckBoxImp::NextStates() {
357 uint32_t dwFirststate = m_pProperties->m_dwStates; 357 uint32_t dwFirststate = m_pProperties->m_dwStates;
358 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_RadioButton) { 358 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_RadioButton) {
359 if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) == 359 if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) ==
360 FWL_STATE_CKB_Unchecked) { 360 FWL_STATE_CKB_Unchecked) {
361 CFWL_WidgetMgr* pWidgetMgr = 361 CFWL_WidgetMgr* pWidgetMgr =
362 static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()); 362 static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr());
363 if (!pWidgetMgr->IsFormDisabled()) { 363 if (!pWidgetMgr->IsFormDisabled()) {
364 CFX_PtrArray radioarr; 364 CFX_ArrayTemplate<IFWL_Widget*> radioarr;
365 pWidgetMgr->GetSameGroupRadioButton(m_pInterface, radioarr); 365 pWidgetMgr->GetSameGroupRadioButton(m_pInterface, radioarr);
366 IFWL_CheckBox* pCheckBox = NULL; 366 IFWL_CheckBox* pCheckBox = NULL;
367 int32_t iCount = radioarr.GetSize(); 367 int32_t iCount = radioarr.GetSize();
368 for (int32_t i = 0; i < iCount; i++) { 368 for (int32_t i = 0; i < iCount; i++) {
369 pCheckBox = static_cast<IFWL_CheckBox*>(radioarr[i]); 369 pCheckBox = static_cast<IFWL_CheckBox*>(radioarr[i]);
370 if (pCheckBox != m_pInterface && 370 if (pCheckBox != m_pInterface &&
371 pCheckBox->GetStates() & FWL_STATE_CKB_Checked) { 371 pCheckBox->GetStates() & FWL_STATE_CKB_Checked) {
372 pCheckBox->SetCheckState(0); 372 pCheckBox->SetCheckState(0);
373 CFX_RectF rt; 373 CFX_RectF rt;
374 pCheckBox->GetWidgetRect(rt); 374 pCheckBox->GetWidgetRect(rt);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 void CFWL_CheckBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) { 556 void CFWL_CheckBoxImpDelegate::OnKeyDown(CFWL_MsgKey* pMsg) {
557 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) { 557 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) {
558 m_pOwner->DispatchKeyEvent(pMsg); 558 m_pOwner->DispatchKeyEvent(pMsg);
559 return; 559 return;
560 } 560 }
561 if (pMsg->m_dwKeyCode == FWL_VKEY_Return || 561 if (pMsg->m_dwKeyCode == FWL_VKEY_Return ||
562 pMsg->m_dwKeyCode == FWL_VKEY_Space) { 562 pMsg->m_dwKeyCode == FWL_VKEY_Space) {
563 m_pOwner->NextStates(); 563 m_pOwner->NextStates();
564 } 564 }
565 } 565 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698