1d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann// Copyright 2017 PDFium Authors. All rights reserved. 2d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann// Use of this source code is governed by a BSD-style license that can be 3d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann// found in the LICENSE file. 4d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann 5d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann 7d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann#include "xfa/fxfa/parser/cxfa_button.h" 8d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann 9d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann#include "fxjs/xfa/cjx_button.h" 10d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann#include "third_party/base/ptr_util.h" 11d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann 12d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmannnamespace { 13d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann 14d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmannconst CXFA_Node::PropertyData kPropertyData[] = {{XFA_Element::Extras, 1, 0}, 15d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann {XFA_Element::Unknown, 0, 0}}; 16d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmannconst CXFA_Node::AttributeData kAttributeData[] = { 17d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann {XFA_Attribute::Id, XFA_AttributeType::CData, nullptr}, 18d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann {XFA_Attribute::Use, XFA_AttributeType::CData, nullptr}, 19d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann {XFA_Attribute::Usehref, XFA_AttributeType::CData, nullptr}, 20d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann {XFA_Attribute::Highlight, XFA_AttributeType::Enum, 21d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann (void*)XFA_AttributeEnum::Inverted}, 22d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann {XFA_Attribute::Unknown, XFA_AttributeType::Integer, nullptr}}; 23d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann 24d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmannconstexpr wchar_t kName[] = L"button"; 25d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann 26d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann} // namespace 27d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann 28d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. MoltmannCXFA_Button::CXFA_Button(CXFA_Document* doc, XFA_PacketType packet) 29d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann : CXFA_Node(doc, 30d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann packet, 31d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann (XFA_XDPPACKET_Template | XFA_XDPPACKET_Form), 32d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann XFA_ObjectType::Node, 33d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann XFA_Element::Button, 34d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann kPropertyData, 35d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann kAttributeData, 36d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann kName, 37d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann pdfium::MakeUnique<CJX_Button>(this)) {} 38d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. Moltmann 39d904c1ec7e8d1d86ed56f0dd252435d12cd345aePhilip P. MoltmannCXFA_Button::~CXFA_Button() {} 40