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_INSTANCEMANAGER_H_ 8 #define FXJS_XFA_CJX_INSTANCEMANAGER_H_ 9 10 #include "fxjs/xfa/cjx_node.h" 11 #include "fxjs/xfa/jse_define.h" 12 13 class CXFA_InstanceManager; 14 15 class CJX_InstanceManager final : public CJX_Node { 16 public: 17 explicit CJX_InstanceManager(CXFA_InstanceManager* mgr); 18 ~CJX_InstanceManager() override; 19 20 // CJX_Object: 21 bool DynamicTypeIs(TypeTag eType) const override; 22 23 JSE_METHOD(addInstance); 24 JSE_METHOD(insertInstance); 25 JSE_METHOD(moveInstance); 26 JSE_METHOD(removeInstance); 27 JSE_METHOD(setInstances); 28 29 JSE_PROP(count); 30 JSE_PROP(max); 31 JSE_PROP(min); 32 33 int32_t MoveInstance(int32_t iTo, int32_t iFrom); 34 35 private: 36 using Type__ = CJX_InstanceManager; 37 using ParentType__ = CJX_Node; 38 39 static const TypeTag static_type__ = TypeTag::InstanceManager; 40 static const CJX_MethodSpec MethodSpecs[]; 41 42 int32_t SetInstances(int32_t iDesired); 43 }; 44 45 #endif // FXJS_XFA_CJX_INSTANCEMANAGER_H_ 46