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

Side by Side Diff: xfa/fwl/core/cfwl_checkbox.cpp

Issue 2533623002: Cleanup default FWL params part I (Closed)
Patch Set: Rebase to master Created 4 years 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
« no previous file with comments | « xfa/fwl/core/cfwl_checkbox.h ('k') | xfa/fwl/core/cfwl_combobox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/core/cfwl_checkbox.h" 7 #include "xfa/fwl/core/cfwl_checkbox.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 CFX_ArrayTemplate<CFWL_Widget*> radioarr; 302 CFX_ArrayTemplate<CFWL_Widget*> radioarr;
303 pWidgetMgr->GetSameGroupRadioButton(this, radioarr); 303 pWidgetMgr->GetSameGroupRadioButton(this, radioarr);
304 CFWL_CheckBox* pCheckBox = nullptr; 304 CFWL_CheckBox* pCheckBox = nullptr;
305 int32_t iCount = radioarr.GetSize(); 305 int32_t iCount = radioarr.GetSize();
306 for (int32_t i = 0; i < iCount; i++) { 306 for (int32_t i = 0; i < iCount; i++) {
307 pCheckBox = static_cast<CFWL_CheckBox*>(radioarr[i]); 307 pCheckBox = static_cast<CFWL_CheckBox*>(radioarr[i]);
308 if (pCheckBox != this && 308 if (pCheckBox != this &&
309 pCheckBox->GetStates() & FWL_STATE_CKB_Checked) { 309 pCheckBox->GetStates() & FWL_STATE_CKB_Checked) {
310 pCheckBox->SetCheckState(0); 310 pCheckBox->SetCheckState(0);
311 CFX_RectF rt; 311 CFX_RectF rt;
312 pCheckBox->GetWidgetRect(rt); 312 pCheckBox->GetWidgetRect(rt, false);
313 rt.left = rt.top = 0; 313 rt.left = rt.top = 0;
314 m_pWidgetMgr->RepaintWidget(pCheckBox, &rt); 314 m_pWidgetMgr->RepaintWidget(pCheckBox, &rt);
315 break; 315 break;
316 } 316 }
317 } 317 }
318 } 318 }
319 m_pProperties->m_dwStates |= FWL_STATE_CKB_Checked; 319 m_pProperties->m_dwStates |= FWL_STATE_CKB_Checked;
320 } 320 }
321 } else { 321 } else {
322 if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) == 322 if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) ==
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 473 }
474 474
475 void CFWL_CheckBox::OnKeyDown(CFWL_MsgKey* pMsg) { 475 void CFWL_CheckBox::OnKeyDown(CFWL_MsgKey* pMsg) {
476 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) 476 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab)
477 return; 477 return;
478 if (pMsg->m_dwKeyCode == FWL_VKEY_Return || 478 if (pMsg->m_dwKeyCode == FWL_VKEY_Return ||
479 pMsg->m_dwKeyCode == FWL_VKEY_Space) { 479 pMsg->m_dwKeyCode == FWL_VKEY_Space) {
480 NextStates(); 480 NextStates();
481 } 481 }
482 } 482 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_checkbox.h ('k') | xfa/fwl/core/cfwl_combobox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698