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

Side by Side Diff: xfa/fxfa/app/xfa_ffcheckbutton.cpp

Issue 2467993003: Merge delegates into IFWL_* classes. (Closed)
Patch Set: Add const version Created 4 years, 1 month 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/fxfa/app/xfa_ffbarcode.cpp ('k') | xfa/fxfa/app/xfa_ffchoicelist.cpp » ('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/fxfa/app/xfa_ffcheckbutton.h" 7 #include "xfa/fxfa/app/xfa_ffcheckbutton.h"
8 8
9 #include "xfa/fwl/core/cfwl_checkbox.h" 9 #include "xfa/fwl/core/cfwl_checkbox.h"
10 #include "xfa/fwl/core/cfwl_message.h" 10 #include "xfa/fwl/core/cfwl_message.h"
(...skipping 18 matching lines...) Expand all
29 FX_BOOL CXFA_FFCheckButton::LoadWidget() { 29 FX_BOOL CXFA_FFCheckButton::LoadWidget() {
30 CFWL_CheckBox* pCheckBox = new CFWL_CheckBox(GetFWLApp()); 30 CFWL_CheckBox* pCheckBox = new CFWL_CheckBox(GetFWLApp());
31 pCheckBox->Initialize(); 31 pCheckBox->Initialize();
32 m_pNormalWidget = pCheckBox; 32 m_pNormalWidget = pCheckBox;
33 m_pNormalWidget->SetLayoutItem(this); 33 m_pNormalWidget->SetLayoutItem(this);
34 34
35 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); 35 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget();
36 CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); 36 CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
37 pNoteDriver->RegisterEventTarget(pWidget, pWidget); 37 pNoteDriver->RegisterEventTarget(pWidget, pWidget);
38 38
39 m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate(); 39 m_pOldDelegate = m_pNormalWidget->GetDelegate();
40 m_pNormalWidget->SetCurrentDelegate(this); 40 m_pNormalWidget->SetDelegate(this);
41 41
42 if (m_pDataAcc->IsRadioButton()) 42 if (m_pDataAcc->IsRadioButton())
43 pCheckBox->ModifyStylesEx(FWL_STYLEEXT_CKB_RadioButton, 0xFFFFFFFF); 43 pCheckBox->ModifyStylesEx(FWL_STYLEEXT_CKB_RadioButton, 0xFFFFFFFF);
44 44
45 m_pNormalWidget->LockUpdate(); 45 m_pNormalWidget->LockUpdate();
46 UpdateWidgetProperty(); 46 UpdateWidgetProperty();
47 SetFWLCheckState(m_pDataAcc->GetCheckState()); 47 SetFWLCheckState(m_pDataAcc->GetCheckState());
48 m_pNormalWidget->UnlockUpdate(); 48 m_pNormalWidget->UnlockUpdate();
49 return CXFA_FFField::LoadWidget(); 49 return CXFA_FFField::LoadWidget();
50 } 50 }
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 default: 331 default:
332 break; 332 break;
333 } 333 }
334 m_pOldDelegate->OnProcessEvent(pEvent); 334 m_pOldDelegate->OnProcessEvent(pEvent);
335 } 335 }
336 336
337 void CXFA_FFCheckButton::OnDrawWidget(CFX_Graphics* pGraphics, 337 void CXFA_FFCheckButton::OnDrawWidget(CFX_Graphics* pGraphics,
338 const CFX_Matrix* pMatrix) { 338 const CFX_Matrix* pMatrix) {
339 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); 339 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
340 } 340 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffbarcode.cpp ('k') | xfa/fxfa/app/xfa_ffchoicelist.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698