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

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

Issue 1921853006: More FWL interface cleanup. (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
« 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/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fwl/core/fwl_noteimp.h"
10 #include "xfa/fwl/core/ifwl_app.h" 11 #include "xfa/fwl/core/ifwl_app.h"
11 #include "xfa/fwl/core/ifwl_notedriver.h"
12 #include "xfa/fwl/lightwidget/cfwl_barcode.h" 12 #include "xfa/fwl/lightwidget/cfwl_barcode.h"
13 #include "xfa/fxfa/app/xfa_fffield.h" 13 #include "xfa/fxfa/app/xfa_fffield.h"
14 #include "xfa/fxfa/app/xfa_fftextedit.h" 14 #include "xfa/fxfa/app/xfa_fftextedit.h"
15 #include "xfa/fxfa/app/xfa_fwladapter.h" 15 #include "xfa/fxfa/app/xfa_fwladapter.h"
16 #include "xfa/fxfa/include/xfa_ffpageview.h" 16 #include "xfa/fxfa/include/xfa_ffpageview.h"
17 #include "xfa/fxfa/include/xfa_ffwidget.h" 17 #include "xfa/fxfa/include/xfa_ffwidget.h"
18 18
19 namespace { 19 namespace {
20 20
21 const XFA_BARCODETYPEENUMINFO g_XFABarCodeTypeEnumData[] = { 21 const XFA_BARCODETYPEENUMINFO g_XFABarCodeTypeEnumData[] = {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 : CXFA_FFTextEdit(pPageView, pDataAcc) {} 121 : CXFA_FFTextEdit(pPageView, pDataAcc) {}
122 CXFA_FFBarcode::~CXFA_FFBarcode() {} 122 CXFA_FFBarcode::~CXFA_FFBarcode() {}
123 FX_BOOL CXFA_FFBarcode::LoadWidget() { 123 FX_BOOL CXFA_FFBarcode::LoadWidget() {
124 CFWL_Barcode* pFWLBarcode = CFWL_Barcode::Create(); 124 CFWL_Barcode* pFWLBarcode = CFWL_Barcode::Create();
125 if (pFWLBarcode) { 125 if (pFWLBarcode) {
126 pFWLBarcode->Initialize(); 126 pFWLBarcode->Initialize();
127 } 127 }
128 m_pNormalWidget = pFWLBarcode; 128 m_pNormalWidget = pFWLBarcode;
129 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); 129 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget();
130 m_pNormalWidget->SetPrivateData(pWidget, this, NULL); 130 m_pNormalWidget->SetPrivateData(pWidget, this, NULL);
131 IFWL_NoteDriver* pNoteDriver = FWL_GetApp()->GetNoteDriver(); 131 CFWL_NoteDriver* pNoteDriver = FWL_GetApp()->GetNoteDriver();
132 pNoteDriver->RegisterEventTarget(pWidget, pWidget); 132 pNoteDriver->RegisterEventTarget(pWidget, pWidget);
133 m_pOldDelegate = m_pNormalWidget->SetDelegate(this); 133 m_pOldDelegate = m_pNormalWidget->SetDelegate(this);
134 m_pNormalWidget->LockUpdate(); 134 m_pNormalWidget->LockUpdate();
135 CFX_WideString wsText; 135 CFX_WideString wsText;
136 m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display); 136 m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display);
137 pFWLBarcode->SetText(wsText); 137 pFWLBarcode->SetText(wsText);
138 UpdateWidgetProperty(); 138 UpdateWidgetProperty();
139 m_pNormalWidget->UnlockUpdate(); 139 m_pNormalWidget->UnlockUpdate();
140 return CXFA_FFField::LoadWidget(); 140 return CXFA_FFField::LoadWidget();
141 } 141 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, 232 FX_BOOL CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags,
233 FX_FLOAT fx, 233 FX_FLOAT fx,
234 FX_FLOAT fy) { 234 FX_FLOAT fy) {
235 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; 235 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget;
236 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { 236 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) {
237 return FALSE; 237 return FALSE;
238 } 238 }
239 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); 239 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy);
240 } 240 }
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