/***************************************************************/ /* */ /* helpServerEdit.PKG */ /* */ /* module HelpServer */ /* éditeur */ /* */ /* Loïc Berthelot juillet 2000 */ /* Chanduroi Modification 03/2004 */ /***************************************************************/ typeof ed = Editor;; /* racine de l'arbre d'aide */ typeof hlpsERoot = [HlpsEl r1 r1 r1 r1];; /* interface graphique de l'éditeur */ struct HlpsEWin = [ cont_HlpsE : GLIB2D_Cont, tree_HlpsE : GLIB2D_Tree ] mkHlpsEWin;; /* interface graphique */ typeof hlpsEWin = HlpsEWin;; var hlpsECloseBttBmpFln = "dms/Tools/Help/HelpServer/maps/hlpsEBtt.png";; var hlpsETreeBkgBmpFln = "dms/Tools/Help/HelpServer/maps/hlpsEtreeBkg.png";; var hlpsEContBkgBmpFln = "dms/Tools/Help/HelpServer/maps/hlpsEcontBkg.png";; var hlpsETreeBmpFln = "dms/Tools/Help/HelpServer/maps/hlpsETree.png";; var hlpsESlideBmpFln = "dms/Tools/Help/HelpServer/maps/hlpsESlide.png";; /**********************************************************************************/ /** **/ /** BODY **/ /** **/ /**********************************************************************************/ fun _hlpsELoadGlib2dTree (node, posList, pos) = if (node == nil) then 1 else ( let if (pos == nil) then nil else listcat posList (pos::nil) -> position in ( let TREE_Val node -> val in let _locEditor (val.ref_HlpsEl) nil -> hlpel in ( _ADDcompTree hlpsEWin.tree_HlpsE.tree_treeGLIB2D position [hlpel nil]; ); _hlpsELoadGlib2dTree (TREE_FirstChild node) position 0; ); if (pos != nil) then _hlpsELoadGlib2dTree (TREE_NextBrother node) posList (pos+1) else nil; 1; );; /*********************************/ /* */ /* hlpsEStart */ /* */ /* lance l'interface graphique */ /* de l'éditeur. */ /* */ /*********************************/ fun hlpsEStart() = /* on charge l'arbre des références de l'aide */ set hlpsERoot = hlpsLoadTree; /* initialisation de la lib générique 2D */ gLib2d_defaultIni _channel; gLib2d_setTextColor colors.white_GLIB2D; /* container */ let getEditCont ed -> contTmp in let mkGLIB2D_Cont [contTmp] -> contTmp in let gLib2d_setCont contTmp -> tmp in let gCR_Tree 20 20 650 400 nil/*TRE_HIDDEN_ROOT*/ -> treeTmp in ( set hlpsEWin = mkHlpsEWin [contTmp treeTmp]; _hlpsELoadGlib2dTree hlpsERoot nil nil; gLib2d_Paint; );; fun save (filename, n)= ("action"::"ask"::nil):: ("event"::"answer"::nil):: ("zone"::"helpServer"::nil):: nil;; fun IniEditor(filename)= set ed = startEditor _channel nil 0 0 690 470 WN_NORMAL-WN_SIZEBOX EDITOR_NORMAL filename "dms/Tools/Help/HelpServer/HelpServer.dmc" "dms/Tools/Help/HelpServer/Help/Help.htm" "dms/Tools/Help/HelpServer/HelpServer.bmp" nil @save nil; hlpsEStart; if filename==nil then nil else openDMI ed; 0;;