/***************************************************************/ /* */ /* helpViewerC.pkg */ /* */ /* module HelpViewer */ /* serveur */ /* */ /* Loïc Berthelot juillet 2000 */ /* Chanduroi modification 03/2004 */ /***************************************************************/ typeof hlpvCIcon = HIcon;; /* HelpServer a envoyé une série des champs d'aide à afficher */ fun _actionAnswerCb (from, action, param, ulist, tag) = _processFields (strextr param); 1;; /* évenement reçu qui déclenche un appel de la fenetre d'aide */ fun _actionMakeItAskCb (from, action, param, ulist, tag) = _DMSeventTag this "ask" param nil nil; 1;; fun _hlpvCdestroy (s) = _hlpvWIconDestroy nil nil; 1;; /*******************************************/ /* */ /* _hlpvCstartInterface [[S r1] r1] I */ /* */ /* démarre l'icone d'aide */ /* */ /*******************************************/ fun _hlpvCstartInterface(params) = let _DMSgetZone this "HelpViewerIcon" nil nil @_hlpvCdestroy ->[win x y w h] in let if (win == nil) then let _GETscreenSize -> [screenW screenH] in [nil (screenW - 100) (screenH - 100) 55 55] else [win x y w h] -> [iconWin x y w h] in set hlpvCIcon = HW_startIcon params _channel iconWin x y w h; 1;; var rescToDownload = 0;; var rescDownloaded = 0;; fun _endDownload (fln, params) = set rescDownloaded = rescDownloaded + 1; if (rescDownloaded == rescToDownload) then _hlpvCstartInterface params else nil;; /********************************************/ /* */ /* IniDMI */ /* */ /* initialisation de l'instance du module */ /* */ /********************************************/ fun IniDMI(paramsStr)= GRAPHICDRESSING_InitDressing; GRAPHICDRESSING_SetTheme nil; let strextr paramsStr -> l in let getInfo l "iconeFlnParam_GHed" -> iconeFln in let getInfo l "bkgCheckParam_THed" -> bkgTypeT in let getInfo l "bkgCheckParam_FHed" -> bkgTypeF in ( set rescToDownload = 3; if (iconeFln == nil) then nil else set rescToDownload = rescToDownload + 1; if (strcmp bkgTypeT "bitmap") then nil else set rescToDownload = rescToDownload + 1; if (strcmp bkgTypeF "bitmap") then nil else set rescToDownload = rescToDownload + 1; /* help icone alphabitmap */ if (iconeFln == nil) then nil else _RSCdownloadP this iconeFln iconeFln (mknode @_endDownload l) nil 0; /* eventually help title's alphabitmap background */ if (strcmp bkgTypeT "bitmap") then nil else let getInfo l "bkgBitmapParam_THed" -> bkgFln in _RSCdownloadP this bkgFln bkgFln (mknode @_endDownload l) nil 1; /* eventually help field's alphabitmap background */ if (strcmp bkgTypeF "bitmap") then nil else let getInfo l "bkgBitmapParam_FHed" -> bkgFln in _RSCdownloadP this bkgFln bkgFln (mknode @_endDownload l) nil 2; let getInfo l "questionBitmapParam_FHed" -> fln in _RSCdownloadP this fln fln (mknode @_endDownload l) nil 3; let getInfo l "answerBitmapParam_FHed" -> fln in _RSCdownloadP this fln fln (mknode @_endDownload l) nil 4; let getInfo l "backBitmapParam_FHed" -> fln in _RSCdownloadP this fln fln (mknode @_endDownload l) nil 5; ); _DMSdefineActions this ["answer" @_actionAnswerCb]:: ["make it ask" @_actionMakeItAskCb]:: nil; 1;;