| OLD | NEW |
| 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> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 virtual FX_CHAR GetStartChar() const = 0; | 51 virtual FX_CHAR GetStartChar() const = 0; |
| 52 virtual FX_CHAR GetEndChar() const = 0; | 52 virtual FX_CHAR GetEndChar() const = 0; |
| 53 virtual int32_t GetVersion() const = 0; | 53 virtual int32_t GetVersion() const = 0; |
| 54 virtual int32_t GetErrorCorrectionLevel() const = 0; | 54 virtual int32_t GetErrorCorrectionLevel() const = 0; |
| 55 virtual FX_BOOL GetTruncated() const = 0; | 55 virtual FX_BOOL GetTruncated() const = 0; |
| 56 virtual uint32_t GetBarcodeAttributeMask() const = 0; | 56 virtual uint32_t GetBarcodeAttributeMask() const = 0; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 class IFWL_Barcode : public IFWL_Edit { | 59 class IFWL_Barcode : public IFWL_Edit { |
| 60 public: | 60 public: |
| 61 explicit IFWL_Barcode(const CFWL_WidgetImpProperties& properties); | 61 explicit IFWL_Barcode(const IFWL_App* app, |
| 62 const CFWL_WidgetImpProperties& properties); |
| 62 ~IFWL_Barcode() override; | 63 ~IFWL_Barcode() override; |
| 63 | 64 |
| 64 // IFWL_Widget | 65 // IFWL_Widget |
| 66 void Initialize() override; |
| 67 void Finalize() override; |
| 65 FWL_Type GetClassID() const override; | 68 FWL_Type GetClassID() const override; |
| 66 FWL_Error Initialize() override; | |
| 67 void Finalize() override; | |
| 68 FWL_Error Update() override; | 69 FWL_Error Update() override; |
| 69 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 70 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
| 70 const CFX_Matrix* pMatrix = nullptr) override; | 71 const CFX_Matrix* pMatrix = nullptr) override; |
| 71 FWL_Error SetText(const CFX_WideString& wsText) override; | 72 FWL_Error SetText(const CFX_WideString& wsText) override; |
| 72 | 73 |
| 73 void SetType(BC_TYPE type); | 74 void SetType(BC_TYPE type); |
| 74 FX_BOOL IsProtectedType(); | 75 FX_BOOL IsProtectedType(); |
| 75 | 76 |
| 76 protected: | 77 protected: |
| 77 friend class CFWL_BarcodeImpDelegate; | 78 friend class CFWL_BarcodeImpDelegate; |
| 78 | 79 |
| 79 void GenerateBarcodeImageCache(); | 80 void GenerateBarcodeImageCache(); |
| 80 void CreateBarcodeEngine(); | 81 void CreateBarcodeEngine(); |
| 81 | 82 |
| 82 std::unique_ptr<CFX_Barcode> m_pBarcodeEngine; | 83 std::unique_ptr<CFX_Barcode> m_pBarcodeEngine; |
| 83 uint32_t m_dwStatus; | 84 uint32_t m_dwStatus; |
| 84 BC_TYPE m_type; | 85 BC_TYPE m_type; |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 class CFWL_BarcodeImpDelegate : public CFWL_EditImpDelegate { | 88 class CFWL_BarcodeImpDelegate : public CFWL_EditImpDelegate { |
| 88 public: | 89 public: |
| 89 explicit CFWL_BarcodeImpDelegate(IFWL_Barcode* pOwner); | 90 explicit CFWL_BarcodeImpDelegate(IFWL_Barcode* pOwner); |
| 90 void OnProcessEvent(CFWL_Event* pEvent) override; | 91 void OnProcessEvent(CFWL_Event* pEvent) override; |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 #endif // XFA_FWL_CORE_IFWL_BARCODE_H_ | 94 #endif // XFA_FWL_CORE_IFWL_BARCODE_H_ |
| OLD | NEW |