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

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

Issue 2520063002: Split fwl/core class pt II. (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/ifwl_barcode.h ('k') | xfa/fwl/core/ifwl_caret.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/fwl/core/ifwl_barcode.h" 7 #include "xfa/fwl/core/ifwl_barcode.h"
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "third_party/base/ptr_util.h" 11 #include "third_party/base/ptr_util.h"
12 #include "xfa/fgas/font/cfgas_gefont.h" 12 #include "xfa/fgas/font/cfgas_gefont.h"
13 #include "xfa/fwl/core/cfwl_notedriver.h"
13 #include "xfa/fwl/core/cfwl_themepart.h" 14 #include "xfa/fwl/core/cfwl_themepart.h"
14 #include "xfa/fwl/core/cfx_barcode.h" 15 #include "xfa/fwl/core/cfx_barcode.h"
15 #include "xfa/fwl/core/fwl_noteimp.h"
16 #include "xfa/fwl/core/ifwl_themeprovider.h" 16 #include "xfa/fwl/core/ifwl_themeprovider.h"
17 17
18 IFWL_Barcode::IFWL_Barcode(const IFWL_App* app, 18 IFWL_Barcode::IFWL_Barcode(const IFWL_App* app,
19 std::unique_ptr<CFWL_WidgetProperties> properties) 19 std::unique_ptr<CFWL_WidgetProperties> properties)
20 : IFWL_Edit(app, std::move(properties), nullptr), 20 : IFWL_Edit(app, std::move(properties), nullptr),
21 m_dwStatus(0), 21 m_dwStatus(0),
22 m_type(BC_UNKNOWN) {} 22 m_type(BC_UNKNOWN) {}
23 23
24 IFWL_Barcode::~IFWL_Barcode() {} 24 IFWL_Barcode::~IFWL_Barcode() {}
25 25
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 IFWL_Edit::DrawWidget(pGraphics, pMatrix); 60 IFWL_Edit::DrawWidget(pGraphics, pMatrix);
61 } 61 }
62 62
63 void IFWL_Barcode::GenerateBarcodeImageCache() { 63 void IFWL_Barcode::GenerateBarcodeImageCache() {
64 if ((m_dwStatus & XFA_BCS_NeedUpdate) == 0) 64 if ((m_dwStatus & XFA_BCS_NeedUpdate) == 0)
65 return; 65 return;
66 66
67 m_dwStatus = 0; 67 m_dwStatus = 0;
68 CreateBarcodeEngine(); 68 CreateBarcodeEngine();
69 IFWL_BarcodeDP* pData = 69 IFWL_Barcode::DataProvider* pData =
70 static_cast<IFWL_BarcodeDP*>(m_pProperties->m_pDataProvider); 70 static_cast<IFWL_Barcode::DataProvider*>(m_pProperties->m_pDataProvider);
71 if (!pData) 71 if (!pData)
72 return; 72 return;
73 if (!m_pBarcodeEngine) 73 if (!m_pBarcodeEngine)
74 return; 74 return;
75 75
76 CFX_WideString wsText; 76 CFX_WideString wsText;
77 GetText(wsText); 77 GetText(wsText);
78 78
79 CFWL_ThemePart part; 79 CFWL_ThemePart part;
80 part.m_pWidget = this; 80 part.m_pWidget = this;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 return false; 168 return false;
169 } 169 }
170 170
171 void IFWL_Barcode::OnProcessEvent(CFWL_Event* pEvent) { 171 void IFWL_Barcode::OnProcessEvent(CFWL_Event* pEvent) {
172 if (pEvent->GetClassID() == CFWL_EventType::TextChanged) { 172 if (pEvent->GetClassID() == CFWL_EventType::TextChanged) {
173 m_pBarcodeEngine.reset(); 173 m_pBarcodeEngine.reset();
174 m_dwStatus = XFA_BCS_NeedUpdate; 174 m_dwStatus = XFA_BCS_NeedUpdate;
175 } 175 }
176 IFWL_Edit::OnProcessEvent(pEvent); 176 IFWL_Edit::OnProcessEvent(pEvent);
177 } 177 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_barcode.h ('k') | xfa/fwl/core/ifwl_caret.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698