/************************************************** Module GraphicCheckBox Server part Version: 1.0 Author: Julien Zorko Last update: 01/06/2001 Checkbox button with customisable bitmap **************************************************/ /******************************************************************************* the client part of the module has been deleted cli -> CLIENT : the client <- I : nothing special (always 0) *******************************************************************************/ fun cbDeleteClient (cli) = _DMSeventTag this CtoU cli "out" nil nil nil; 0 ;; /******************************************************************************* destroy a client from -> DMI : not used user -> User : the user that run the action action -> S : not used param -> S : not used others -> [User r1] : not used tag -> Tag : not used <- I : nothing special *******************************************************************************/ fun cbDestroy (from, user, action, param, others, tag) = let UtoC user -> cli in ( _DMSdelClientDMI this cli; cbDeleteClient cli ); 0 ;; /******************************************************************************* create a client from -> DMI : not used user -> User : the user that run the action action -> S : not used param -> S : parameters of the action others -> [User r1] : not used tag -> Tag : not used <- I : nothing special *******************************************************************************/ fun cbStart (from, user, action, param, others, tag, params) = if _DMScreateClientDMI this UtoC user params then _DMSeventTag this user "entering" nil nil nil else nil ;; /******************************************************************************* Module instanciation *******************************************************************************/ fun IniDMI(s)= let _DMSgetDef this "params" -> params in let getInfo params "picture" -> sBitmap in ( _DMSregister this nil @cbDeleteClient nil; _DMSdefineActions this (["start" (mkfun7 @cbStart strbuild params)])::(["destroy" @cbDestroy])::nil; /* register button bitmap for client loading */ _RSregister this sBitmap RSfile+RScontrol sBitmap ); 0 ;;