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

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

Issue 2459423003: Rename IFWL_Widget::SetDelegate (Closed)
Patch Set: Review feedback 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/fwl/core/ifwl_widget.cpp ('k') | xfa/fxfa/app/xfa_ffcheckbutton.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_ffbarcode.h" 7 #include "xfa/fxfa/app/xfa_ffbarcode.h"
8 8
9 #include "core/fxcrt/fx_ext.h" 9 #include "core/fxcrt/fx_ext.h"
10 #include "xfa/fwl/core/cfwl_barcode.h" 10 #include "xfa/fwl/core/cfwl_barcode.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 FX_BOOL CXFA_FFBarcode::LoadWidget() { 125 FX_BOOL CXFA_FFBarcode::LoadWidget() {
126 CFWL_Barcode* pFWLBarcode = new CFWL_Barcode(GetFWLApp()); 126 CFWL_Barcode* pFWLBarcode = new CFWL_Barcode(GetFWLApp());
127 pFWLBarcode->Initialize(); 127 pFWLBarcode->Initialize();
128 128
129 m_pNormalWidget = pFWLBarcode; 129 m_pNormalWidget = pFWLBarcode;
130 m_pNormalWidget->SetLayoutItem(this); 130 m_pNormalWidget->SetLayoutItem(this);
131 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); 131 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget();
132 CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); 132 CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
133 pNoteDriver->RegisterEventTarget(pWidget, pWidget); 133 pNoteDriver->RegisterEventTarget(pWidget, pWidget);
134 m_pOldDelegate = m_pNormalWidget->SetDelegate(this); 134
135 m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate();
136 m_pNormalWidget->SetCurrentDelegate(this);
135 m_pNormalWidget->LockUpdate(); 137 m_pNormalWidget->LockUpdate();
138
136 CFX_WideString wsText; 139 CFX_WideString wsText;
137 m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display); 140 m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display);
138 pFWLBarcode->SetText(wsText); 141 pFWLBarcode->SetText(wsText);
139 UpdateWidgetProperty(); 142 UpdateWidgetProperty();
140 m_pNormalWidget->UnlockUpdate(); 143 m_pNormalWidget->UnlockUpdate();
141 return CXFA_FFField::LoadWidget(); 144 return CXFA_FFField::LoadWidget();
142 } 145 }
143 void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS, 146 void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS,
144 CFX_Matrix* pMatrix, 147 CFX_Matrix* pMatrix,
145 uint32_t dwStatus) { 148 uint32_t dwStatus) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 239 }
237 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, 240 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags,
238 FX_FLOAT fx, 241 FX_FLOAT fx,
239 FX_FLOAT fy) { 242 FX_FLOAT fy) {
240 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; 243 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget;
241 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { 244 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) {
242 return FALSE; 245 return FALSE;
243 } 246 }
244 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); 247 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy);
245 } 248 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_widget.cpp ('k') | xfa/fxfa/app/xfa_ffcheckbutton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698