/* Button Server - DMS - march 98 - by Sylvain HUET */ /* Rev. 0101 - Aug. '98 - by Marc BARILLEY */ typeof button=ObjButton;; fun pressbut(a,b)= _DMSevent this nil "clickS" nil nil;; fun _end(s)= _DMSdelete this;; fun _resizeI(x,s)= let x->[win x y w h] in _SIZEbutton button w h x y; 0;; fun del(cli)= _DMSevent this cli "ended" nil nil;; fun activate(from,cli,action,param,rep)= if !strcmp action "start" then if _DMScreateClientDMI this cli nil then _DMSevent this cli "entering" nil nil else nil else if !strcmp action "destroy" then if _DMSdelClientDMI this cli then _DMSevent this cli "destroyed" nil nil else nil else nil;; fun IniDMI(file)= _DMSregisterDMI this @activate nil @del nil; let _DMSgetZone this "ButtonS" @_end @_resizeI @_end ->[win x y w h] in if win==nil then nil else set button=_CBbutton _CRbutton _channel win x y w h 0 _DMSgetName this @pressbut 0;;