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

Unified Diff: xfa/fwl/core/ifwl_barcode.h

Issue 2432423002: Merge the CFWL_*Imp classes into the IFWL_* classes. (Closed)
Patch Set: Review feedback Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/fwl_widgetimp.cpp ('k') | xfa/fwl/core/ifwl_barcode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_barcode.h
diff --git a/xfa/fwl/basewidget/ifwl_barcode.h b/xfa/fwl/core/ifwl_barcode.h
similarity index 58%
rename from xfa/fwl/basewidget/ifwl_barcode.h
rename to xfa/fwl/core/ifwl_barcode.h
index aaee09b9fff6222034b20f0ae661aa83663f9d52..6f58ad10126b48a3a34e87ab3bdf631ed4d82360 100644
--- a/xfa/fwl/basewidget/ifwl_barcode.h
+++ b/xfa/fwl/core/ifwl_barcode.h
@@ -4,14 +4,22 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef XFA_FWL_BASEWIDGET_IFWL_BARCODE_H_
-#define XFA_FWL_BASEWIDGET_IFWL_BARCODE_H_
+#ifndef XFA_FWL_CORE_IFWL_BARCODE_H_
+#define XFA_FWL_CORE_IFWL_BARCODE_H_
-#include "xfa/fwl/basewidget/ifwl_edit.h"
+#include <memory>
+
+#include "xfa/fwl/core/ifwl_edit.h"
+#include "xfa/fwl/core/ifwl_scrollbar.h"
#include "xfa/fxbarcode/BC_Library.h"
+class CFWL_BarcodeImpDelegate;
class CFWL_WidgetImpProperties;
+class CFX_Barcode;
+class IFWL_Widget;
+#define XFA_BCS_NeedUpdate 0x0001
+#define XFA_BCS_EncodeSuccess 0x0002
#define FWL_CLASS_Barcode L"FWL_BARCODE"
enum FWL_BCDAttribute {
@@ -52,11 +60,38 @@ class IFWL_BarcodeDP : public IFWL_EditDP {
class IFWL_Barcode : public IFWL_Edit {
public:
static IFWL_Barcode* Create(const CFWL_WidgetImpProperties& properties);
+
+ IFWL_Barcode(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter);
+ ~IFWL_Barcode() override;
+
+ // IFWL_Widget
+ FWL_Error GetClassName(CFX_WideString& wsClass) const override;
+ FWL_Type GetClassID() const override;
+ FWL_Error Initialize() override;
+ FWL_Error Finalize() override;
+ FWL_Error Update() override;
+ FWL_Error DrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix = nullptr) override;
+ FWL_Error SetText(const CFX_WideString& wsText) override;
+
void SetType(BC_TYPE type);
FX_BOOL IsProtectedType();
protected:
- IFWL_Barcode();
+ friend class CFWL_BarcodeImpDelegate;
+
+ void GenerateBarcodeImageCache();
+ void CreateBarcodeEngine();
+
+ std::unique_ptr<CFX_Barcode> m_pBarcodeEngine;
+ uint32_t m_dwStatus;
+ BC_TYPE m_type;
+};
+
+class CFWL_BarcodeImpDelegate : public CFWL_EditImpDelegate {
+ public:
+ explicit CFWL_BarcodeImpDelegate(IFWL_Barcode* pOwner);
+ void OnProcessEvent(CFWL_Event* pEvent) override;
};
-#endif // XFA_FWL_BASEWIDGET_IFWL_BARCODE_H_
+#endif // XFA_FWL_CORE_IFWL_BARCODE_H_
« no previous file with comments | « xfa/fwl/core/fwl_widgetimp.cpp ('k') | xfa/fwl/core/ifwl_barcode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698