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

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

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/fwl/core/fwl_noteimp.cpp ('k') | xfa/fwl/core/ifwl_barcode.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 #ifndef XFA_FWL_CORE_IFWL_BARCODE_H_ 7 #ifndef XFA_FWL_CORE_IFWL_BARCODE_H_
8 #define XFA_FWL_CORE_IFWL_BARCODE_H_ 8 #define XFA_FWL_CORE_IFWL_BARCODE_H_
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "xfa/fwl/core/ifwl_edit.h" 12 #include "xfa/fwl/core/ifwl_edit.h"
13 #include "xfa/fwl/core/ifwl_scrollbar.h" 13 #include "xfa/fwl/core/ifwl_scrollbar.h"
14 #include "xfa/fxbarcode/BC_Library.h" 14 #include "xfa/fxbarcode/BC_Library.h"
15 15
16 class CFWL_BarcodeImpDelegate;
17 class CFWL_WidgetImpProperties; 16 class CFWL_WidgetImpProperties;
18 class CFX_Barcode; 17 class CFX_Barcode;
19 class IFWL_Widget; 18 class IFWL_Widget;
20 19
21 #define XFA_BCS_NeedUpdate 0x0001 20 #define XFA_BCS_NeedUpdate 0x0001
22 #define XFA_BCS_EncodeSuccess 0x0002 21 #define XFA_BCS_EncodeSuccess 0x0002
23 22
24 enum FWL_BCDAttribute { 23 enum FWL_BCDAttribute {
25 FWL_BCDATTRIBUTE_NONE = 0, 24 FWL_BCDATTRIBUTE_NONE = 0,
26 FWL_BCDATTRIBUTE_CHARENCODING = 1 << 0, 25 FWL_BCDATTRIBUTE_CHARENCODING = 1 << 0,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 explicit IFWL_Barcode(const IFWL_App* app, 60 explicit IFWL_Barcode(const IFWL_App* app,
62 const CFWL_WidgetImpProperties& properties); 61 const CFWL_WidgetImpProperties& properties);
63 ~IFWL_Barcode() override; 62 ~IFWL_Barcode() override;
64 63
65 // IFWL_Widget 64 // IFWL_Widget
66 FWL_Type GetClassID() const override; 65 FWL_Type GetClassID() const override;
67 FWL_Error Update() override; 66 FWL_Error Update() override;
68 FWL_Error DrawWidget(CFX_Graphics* pGraphics, 67 FWL_Error DrawWidget(CFX_Graphics* pGraphics,
69 const CFX_Matrix* pMatrix = nullptr) override; 68 const CFX_Matrix* pMatrix = nullptr) override;
70 FWL_Error SetText(const CFX_WideString& wsText) override; 69 FWL_Error SetText(const CFX_WideString& wsText) override;
70 void OnProcessEvent(CFWL_Event* pEvent) override;
71 71
72 void SetType(BC_TYPE type); 72 void SetType(BC_TYPE type);
73 FX_BOOL IsProtectedType(); 73 FX_BOOL IsProtectedType();
74 74
75 protected: 75 protected:
76 friend class CFWL_BarcodeImpDelegate;
77
78 void GenerateBarcodeImageCache(); 76 void GenerateBarcodeImageCache();
79 void CreateBarcodeEngine(); 77 void CreateBarcodeEngine();
80 78
81 std::unique_ptr<CFX_Barcode> m_pBarcodeEngine; 79 std::unique_ptr<CFX_Barcode> m_pBarcodeEngine;
82 uint32_t m_dwStatus; 80 uint32_t m_dwStatus;
83 BC_TYPE m_type; 81 BC_TYPE m_type;
84 }; 82 };
85 83
86 class CFWL_BarcodeImpDelegate : public CFWL_EditImpDelegate {
87 public:
88 explicit CFWL_BarcodeImpDelegate(IFWL_Barcode* pOwner);
89 void OnProcessEvent(CFWL_Event* pEvent) override;
90 };
91
92 #endif // XFA_FWL_CORE_IFWL_BARCODE_H_ 84 #endif // XFA_FWL_CORE_IFWL_BARCODE_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/fwl_noteimp.cpp ('k') | xfa/fwl/core/ifwl_barcode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698