Home | History | Annotate | Download | only in xfa
      1 // Copyright 2017 PDFium Authors. All rights reserved.
      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 FXJS_XFA_CJX_NODE_H_
      8 #define FXJS_XFA_CJX_NODE_H_
      9 
     10 #include "fxjs/CJX_Define.h"
     11 #include "fxjs/xfa/cjx_object.h"
     12 #include "fxjs/xfa/cjx_tree.h"
     13 #include "xfa/fxfa/fxfa_basic.h"
     14 
     15 class CXFA_Node;
     16 
     17 class CJX_Node : public CJX_Tree {
     18  public:
     19   explicit CJX_Node(CXFA_Node* node);
     20   ~CJX_Node() override;
     21 
     22   JS_METHOD(applyXSL, CJX_Node);
     23   JS_METHOD(assignNode, CJX_Node);
     24   JS_METHOD(clone, CJX_Node);
     25   JS_METHOD(getAttribute, CJX_Node);
     26   JS_METHOD(getElement, CJX_Node);
     27   JS_METHOD(isPropertySpecified, CJX_Node);
     28   JS_METHOD(loadXML, CJX_Node);
     29   JS_METHOD(saveFilteredXML, CJX_Node);
     30   JS_METHOD(saveXML, CJX_Node);
     31   JS_METHOD(setAttribute, CJX_Node);
     32   JS_METHOD(setElement, CJX_Node);
     33 
     34   JS_PROP(id);
     35   JS_PROP(isContainer);
     36   JS_PROP(isNull);
     37   JS_PROP(model);
     38   JS_PROP(ns);
     39   JS_PROP(oneOfChild);
     40 
     41   CXFA_Node* GetXFANode();
     42   const CXFA_Node* GetXFANode() const;
     43 
     44  protected:
     45   int32_t execSingleEventByName(const WideStringView& wsEventName,
     46                                 XFA_Element eType);
     47 
     48  private:
     49   static const CJX_MethodSpec MethodSpecs[];
     50 };
     51 
     52 #endif  // FXJS_XFA_CJX_NODE_H_
     53