xref: /aosp_15_r20/external/pdfium/xfa/fxfa/cxfa_ffbarcode.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2014 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef XFA_FXFA_CXFA_FFBARCODE_H_
8 #define XFA_FXFA_CXFA_FFBARCODE_H_
9 
10 #include "fxbarcode/BC_Library.h"
11 #include "v8/include/cppgc/member.h"
12 #include "v8/include/cppgc/visitor.h"
13 #include "xfa/fxfa/cxfa_ffpageview.h"
14 #include "xfa/fxfa/cxfa_fftextedit.h"
15 
16 class CXFA_Barcode;
17 
18 class CXFA_FFBarcode final : public CXFA_FFTextEdit {
19  public:
20   static BC_TYPE GetBarcodeTypeByName(const WideString& wsName);
21 
22   CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED;
23   ~CXFA_FFBarcode() override;
24 
25   void Trace(cppgc::Visitor* visitor) const override;
26 
27   // CXFA_FFTextEdit
28   bool LoadWidget() override;
29   void RenderWidget(CFGAS_GEGraphics* pGS,
30                     const CFX_Matrix& matrix,
31                     HighlightOption highlight) override;
32   void UpdateWidgetProperty() override;
33   bool AcceptsFocusOnButtonDown(
34       Mask<XFA_FWL_KeyFlag> dwFlags,
35       const CFX_PointF& point,
36       CFWL_MessageMouse::MouseCommand command) override;
37 
38  private:
39   CXFA_FFBarcode(CXFA_Node* pNode, CXFA_Barcode* barcode);
40 
41   cppgc::Member<CXFA_Barcode> const barcode_;
42 };
43 
44 #endif  // XFA_FXFA_CXFA_FFBARCODE_H_
45