/* HTTP server for M3d and Texture Ressources , DMI editor - April 2000 - by Jocelyn DUMAY modified - April 2001 - by Macfly modified - October 2001 - by Macfly : adding box management */ typeof ed_port =ObjText;; typeof ed_root =ObjText;; typeof ed_tmp =ObjText;; typeof Bt_GenConcat =ObjButton;; typeof ed_sizebmp =ObjText;; fun load (l) = if (l==nil) then 0 else let l -> [[param [value _]] nxt] in { if (!strcmpi param "HTTPport") then (_SETtext ed_port value; 0) else if (!strcmpi param "HTTProot") then (_SETtext ed_root value; 0) else 0; if (!strcmpi param "HTTPtmp") then (_SETtext ed_tmp value; 0) else 0; if (!strcmpi param "HTTPsizebmp") then (_SETtext ed_sizebmp value; 0) else 0; load nxt; };; fun getParam()= ("HTTPport" ::(_GETtext ed_port) ::nil):: ("HTTProot" ::(_GETtext ed_root) ::nil):: ("HTTPtmp" ::(_GETtext ed_tmp) ::nil):: ("HTTPsizebmp" ::(_GETtext ed_sizebmp) ::nil):: nil;; fun save (filename, n)= ("action" ::"register" ::nil):: ("action" ::"unregister"::nil):: ("event" ::"registered" ::nil):: getParam;; var GenConcatScript = "_load \"dms/lib/stdlib.pkg\"\n_load \"dms/lib/quicksort.pkg\"\n_load \"Dms/Tools/HTTPsrvRess/gen_concat/kitlocalisation.pkg\"\n_load \"Dms/Tools/HTTPsrvRess/gen_concat/gen_concat.pkg\"\nCrDirAndFiles ";; fun GenConcatMakeScript () = strcatn GenConcatScript::"\""::(_GETtext ed_root)::"\" \""::(_GETtext ed_tmp)::"\" \""::(_GETtext ed_sizebmp)::"\""::nil ;; fun rflBrowseButton(bt,ed)= _newmachine "GenerateConcat" GenConcatMakeScript nil nil; 0;; fun IniEditor(s)= let startEditor _channel nil 0 0 300 260 nil EDITOR_NORMAL s "Dms/Tools/HTTPsrvRess/HTTPsrvRess.dmc" "Dms/Tools/HTTPsrvRess/help.txt" "Dms/Tools/HTTPsrvRess/HTTPsrvRess.bmp" @load @save nil ->ed in { /* le port */ _CRtext _channel ed.EditorEditWin 16 10 50 20 ET_ALIGN_RIGHT (_locEditor "HTTP_PORT" nil); set ed_port=_CReditLine _channel ed.EditorEditWin 69 10 50 20 ET_AHSCROLL+ET_DOWN "1400"; /* le root */ _CRtext _channel ed.EditorEditWin 16 35 50 20 ET_ALIGN_RIGHT (_locEditor "HTTP_ROOT" nil); set ed_root=_CReditLine _channel ed.EditorEditWin 69 35 ed.EditorWEditWin-105 20 ET_AHSCROLL+ET_DOWN "lib"; /* fichiers des m3d */ _CRtext _channel ed.EditorEditWin 16 60 50 20 ET_ALIGN_RIGHT (_locEditor "HTTP_TMP" nil); set ed_tmp=_CReditLine _channel ed.EditorEditWin 69 60 ed.EditorWEditWin-105 20 ET_AHSCROLL+ET_DOWN "tmp/expl"; _CRtext _channel ed.EditorEditWin 6 85 60 20 ET_ALIGN_RIGHT (_locEditor "HTTP_BMPSIZE" nil); set ed_sizebmp=_CReditLine _channel ed.EditorEditWin 69 85 30 20 ET_AHSCROLL+ET_DOWN "16"; _CRtext _channel ed.EditorEditWin 10 130 220 60 ET_ALIGN_CENTER (_locEditor "HTTP_EXPLICATION" nil); set Bt_GenConcat=_CBbutton _CRbutton _channel ed.EditorEditWin 30 210 150 20 nil (_locEditor "HTTP_GEN" nil) @rflBrowseButton ed; if s==nil then nil else openDMI ed; }; 0;;