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 #include "fxjs/cjs_zoomtype.h"
8
9 const JSConstSpec CJS_Zoomtype::ConstSpecs[] = {
10 {"none", JSConstSpec::String, 0, "NoVary"},
11 {"fitP", JSConstSpec::String, 0, "FitPage"},
12 {"fitW", JSConstSpec::String, 0, "FitWidth"},
13 {"fitH", JSConstSpec::String, 0, "FitHeight"},
14 {"fitV", JSConstSpec::String, 0, "FitVisibleWidth"},
15 {"pref", JSConstSpec::String, 0, "Preferred"},
16 {"refW", JSConstSpec::String, 0, "ReflowWidth"}};
17
18 int CJS_Zoomtype::ObjDefnID = -1;
19
20 // static
DefineJSObjects(CFXJS_Engine * pEngine)21 void CJS_Zoomtype::DefineJSObjects(CFXJS_Engine* pEngine) {
22 ObjDefnID =
23 pEngine->DefineObj("zoomtype", FXJSOBJTYPE_STATIC, nullptr, nullptr);
24 DefineConsts(pEngine, ObjDefnID, ConstSpecs);
25 }
26