/***************************************************************/ /* */ /* helpViewerS.pkg */ /* */ /* module HelpViewer */ /* serveur */ /* */ /* Loïc Berthelot juillet 2000 */ /* Chanduroi modification 03/2004 */ /***************************************************************/ /* démarre le client */ fun _actionStartCb (from,u,action,param,ulist,tag, params) = _DMScreateClientDMI this (UtoC u) params; 1;; var themeFln = "dms/tools/help/helpviewer/helpviewer.thm";; fun _checkGParams (l) = let getInfo l "widthParam_GHed" -> wp_g in let if (wp_g == nil) then "305" else wp_g -> wp_g in let getInfo l "iconeCheckParam_GHed" -> icp_g in let if (icp_g == nil) then "middle" else icp_g -> icp_g in let getInfo l "iconeFlnParam_GHed" -> ifp_g in let if (ifp_g == nil) then let strextr _getpack _checkpack themeFln -> themeContent in let hd (tl (tl (hd themeContent))) -> themePath in strcat themePath (getInfo themeContent "HELP_ICONE") else ifp_g -> ifp_g in let getInfo l "textParam_GHed" -> tp_g in let if (tp_g == nil) then "HELP" else tp_g -> tp_g in ( ("widthParam_GHed"::wp_g::nil):: ("iconeCheckParam_GHed"::icp_g::nil):: ("iconeFlnParam_GHed"::ifp_g::nil):: ("textParam_GHed"::tp_g::nil):: nil; );; fun _checkTParams (l) = let getInfo l "fontParam_THed" -> fp_t in let if (fp_t == nil) then "Arial" else fp_t -> fp_t in let getInfo l "sizeParam_THed" -> sp_t in let if (sp_t == nil) then "14" else sp_t -> sp_t in let getInfo l "colorParam_THed" -> cp_t in let if (cp_t == nil) then "0xffffff" else cp_t -> cp_t in let getInfo l "minHeightParam_THed" -> mh_t in let if (mh_t == nil) then "18" else mh_t -> mh_t in let getInfo l "bkgCheckParam_THed" -> bf_t in let if (bf_t == nil) then "color" else bf_t -> bf_t in let getInfo l "bkgColorParam_THed" -> bcp_t in let if (bcp_t == nil) then "0x0078ff" else bcp_t -> bcp_t in let getInfo l "bkgBitmapParam_THed" -> bbp_t in let if (bbp_t == nil) then "" else bbp_t -> bbp_t in ( ("fontParam_THed"::fp_t::nil):: ("sizeParam_THed"::sp_t::nil):: ("colorParam_THed"::cp_t::nil):: ("minHeightParam_THed"::mh_t::nil):: ("bkgCheckParam_THed"::bf_t::nil):: ("bkgColorParam_THed"::bcp_t::nil):: ("bkgBitmapParam_THed"::bbp_t::nil):: nil; );; fun _checkFParams (l) = let getInfo l "qfontParam_FHed" -> qfp_f in let if (qfp_f == nil) then "Arial" else qfp_f -> qfp_f in let getInfo l "qsizeParam_FHed" -> qsp_f in let if (qsp_f == nil) then "14" else qsp_f -> qsp_f in let getInfo l "qcolorParam_FHed" -> qcp_f in let if (qcp_f == nil) then "0xffffff" else qcp_f -> qcp_f in let getInfo l "qMinHeightParam_FHed" -> qmh_f in let if (qmh_f == nil) then "18" else qmh_f -> qmh_f in let getInfo l "afontParam_FHed" -> afp_f in let if (afp_f == nil) then "Arial" else afp_f -> afp_f in let getInfo l "asizeParam_FHed" -> asp_f in let if (asp_f == nil) then "14" else asp_f -> asp_f in let getInfo l "acolorParam_FHed" -> acp_f in let if (acp_f == nil) then "0xffffff" else acp_f -> acp_f in let getInfo l "aMinHeightParam_FHed" -> amh_f in let if (amh_f == nil) then "18" else amh_f -> amh_f in let getInfo l "bkgCheckParam_FHed" -> bch_f in let if (bch_f == nil) then "color" else bch_f -> bch_f in let getInfo l "bkgColorParam_FHed" -> bc_f in let if (bc_f == nil) then "0xa3a3a3" else bc_f -> bc_f in let getInfo l "bkgBitmapParam_FHed" -> bb_f in let if (bb_f == nil) then "" else bb_f -> bb_f in let getInfo l "questionBitmapParam_FHed" -> qbmp_f in let if (qbmp_f == nil) then "dms/tools/help/helpviewer/maps/questionbutton.png" else qbmp_f -> qbmp_f in let getInfo l "answerBitmapParam_FHed" -> abmp_f in let if (abmp_f == nil) then "dms/tools/help/helpviewer/maps/answerbutton.png" else abmp_f -> abmp_f in let getInfo l "backBitmapParam_FHed" -> bbmp_f in let if (bbmp_f == nil) then "dms/tools/help/helpviewer/maps/backbutton.png" else bbmp_f -> bbmp_f in ( ("qfontParam_FHed"::qfp_f::nil):: ("qsizeParam_FHed"::qsp_f::nil):: ("qcolorParam_FHed"::qcp_f::nil):: ("qMinHeightParam_FHed"::qmh_f::nil):: ("afontParam_FHed"::afp_f::nil):: ("asizeParam_FHed"::asp_f::nil):: ("acolorParam_FHed"::acp_f::nil):: ("aMinHeightParam_FHed"::amh_f::nil):: ("bkgCheckParam_FHed"::bch_f::nil):: ("bkgColorParam_FHed"::bc_f::nil):: ("bkgBitmapParam_FHed"::bb_f::nil):: ("questionBitmapParam_FHed"::qbmp_f::nil):: ("answerBitmapParam_FHed"::abmp_f::nil):: ("backBitmapParam_FHed"::bbmp_f::nil):: nil; );; fun _checkParams (l) = listcat listcat _checkGParams l _checkTParams l _checkFParams l;; fun _registerFiles (l) = /* help icone alphabitmap */ let getInfo l "iconeFlnParam_GHed" -> iconeFln in if (iconeFln == nil) then nil else _RSregister this iconeFln RSfile|RScontrol iconeFln; /* eventually help title's alphabitmap background */ let getInfo l "bkgCheckParam_THed" -> bkgType in if (strcmp bkgType "bitmap") then nil else let getInfo l "bkgBitmapParam_THed" -> bkgFln in _RSregister this bkgFln RSfile|RScontrol bkgFln; /* eventually help field's alphabitmap background */ let getInfo l "bkgCheckParam_FHed" -> bkgType in if (strcmp bkgType "bitmap") then nil else let getInfo l "bkgBitmapParam_FHed" -> bkgFln in _RSregister this bkgFln RSfile|RScontrol bkgFln; let getInfo l "questionBitmapParam_FHed" -> fln in _RSregister this fln RSfile|RScontrol fln; let getInfo l "answerBitmapParam_FHed" -> fln in _RSregister this fln RSfile|RScontrol fln; let getInfo l "backBitmapParam_FHed" -> fln in _RSregister this fln RSfile|RScontrol fln; 1;; /************************************/ /* */ /* IniDMI */ /* */ /* initialisation du module */ /* */ /************************************/ fun IniDMI(filename) = let strextr _getpack _checkpack filename -> params in ( let _checkParams params -> params in ( _registerFiles params; _DMSdefineActions this ["start" (mkfun7 @_actionStartCb (strbuild params))]:: nil; ); ); 1;;