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

Side by Side Diff: xfa/fxfa/app/xfa_ffbarcode.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_ffapp.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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 134
135 m_pOldDelegate = m_pNormalWidget->GetCurrentDelegate(); 135 m_pOldDelegate = m_pNormalWidget->GetDelegate();
136 m_pNormalWidget->SetCurrentDelegate(this); 136 m_pNormalWidget->SetDelegate(this);
137 m_pNormalWidget->LockUpdate(); 137 m_pNormalWidget->LockUpdate();
138 138
139 CFX_WideString wsText; 139 CFX_WideString wsText;
140 m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display); 140 m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display);
141 pFWLBarcode->SetText(wsText); 141 pFWLBarcode->SetText(wsText);
142 UpdateWidgetProperty(); 142 UpdateWidgetProperty();
143 m_pNormalWidget->UnlockUpdate(); 143 m_pNormalWidget->UnlockUpdate();
144 return CXFA_FFField::LoadWidget(); 144 return CXFA_FFField::LoadWidget();
145 } 145 }
146 void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS, 146 void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, 240 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags,
241 FX_FLOAT fx, 241 FX_FLOAT fx,
242 FX_FLOAT fy) { 242 FX_FLOAT fy) {
243 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; 243 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget;
244 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { 244 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) {
245 return FALSE; 245 return FALSE;
246 } 246 }
247 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); 247 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy);
248 } 248 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffapp.cpp ('k') | xfa/fxfa/app/xfa_ffcheckbutton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698