123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102(*********************************************************************************)(* Ojs-base *)(* *)(* Copyright (C) 2014-2021 INRIA. All rights reserved. *)(* *)(* This program is free software; you can redistribute it and/or modify *)(* it under the terms of the GNU General Public License as *)(* published by the Free Software Foundation, version 3 of the License. *)(* *)(* This program is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU Library General Public License for more details. *)(* *)(* You should have received a copy of the GNU General Public *)(* License along with this program; if not, write to the Free Software *)(* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *)(* 02111-1307 USA *)(* *)(* As a special exception, you have permission to link this program *)(* with the OCaml compiler and distribute executables, as long as you *)(* follow the requirements of the GNU GPL in regard to all of the *)(* software in the executable aside from the OCaml compiler. *)(* *)(* Contact: Maxence.Guesdon@inria.fr *)(* *)(*********************************************************************************)openJs_of_ocamlopenJsclasstypeundoManager=objectendletnewUndoManager()=Unsafe.new_obj(Unsafe.variable"ace.UndoManager")[||]classtypedocument=objectmethodon:js_stringt->(unit->unit)->unitmethendclasstypeeditSession=objectmethodgetValue:js_stringtmethmethodsetValue:js_stringt->unitmethmethodgetDocument:documenttmethmethodsetMode:js_stringt->unitmethmethodsetReadOnly:boolt->unitmethmethodsetUndoManager:undoManagert->unitmethmethodsetUseWrapMode:boolt->unitmethmethodsetUseWorker:boolt->unitmethendletnewEditSessionsmode=(Unsafe.new_obj(Unsafe.variable"ace.EditSession")[|Unsafe.inject(Js.strings);Unsafe.inject(Js.stringmode)|]:editSessionJs.t)letcreateEditSessionsmode=(Unsafe.new_obj(Unsafe.variable"ace.EditSession")[|Unsafe.inject(Js.strings);Unsafe.inject(Js.stringmode)|]:editSessionJs.t)classtyperenderer=objectmethodsetShowGutter:boolt->unitmethmethodhScrollBarAlwaysVisible:booltpropmethodvScrollBarAlwaysVisible:booltpropendclasstypeeditor=objectmethodsetSession:editSessiont->unitmethmethodgetSession:editSessiontpropmethodgetValue:js_stringtmethmethodsetFontSize:js_stringt->unitmethmethodsetKeyboardHandler:js_stringt->unitmethmethodsetShowFoldWidgets:boolt->unitmethmethodrenderer:renderertpropendclasstypemode=objectmethodmode:js_stringtpropendclasstypemodeList=objectmethodgetModeForPath:js_stringt->modetmethendclasstypeace=objectmethodedit:js_stringt->editorJs.tmethmethodcreateEditSession:js_stringt->js_stringt->documentmethendletace=((Unsafe.variable"ace"):aceJs.t)letmodeList:modeListJs.t=Js.Unsafe.meth_callace"require"[|Unsafe.inject(Js.string"ace/ext/modelist")|]