/* * Scol Voyager * * Author : The Scol Team : http://www.scolring.org/ * * This file is a part of the Scol Voyager * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307, USA, or go to * http://www.gnu.org/copyleft/lesser.txt * * For others informations, please contact us from http://www.scolring.org/ * */ /* Info Client SCOL 1.0 */ defcom Cinfos=infos S;; // iri defcom Cgoto=goto S;; typeof win=ObjWin;; typeof text=ObjText;; typeof infos=ObjList;; typeof listinf=[S S r1];; fun adipbyname(l,n)= if l==nil then nil else let l->[name adr nxt] in if !strcmp name n then adr else adipbyname nxt n;; fun _contact(a,b,x,sel)= let adipbyname listinf sel -> s in if s!=nil then _on _masterchannel Cgoto [s] else nil;; fun __service(name,adr)= set listinf= [name adr listinf]; _ADDlist infos 0 name; _SELlist infos 0 ;; fun _refreshinfo(a,b)= /*_RSTcombo infos;*/ set listinf=nil; _on _channel Cinfos [_channelIP _channel] // iri old : _on _channel Cinfos [] ;; fun _destroyevent(x,y)=_closemachine;; fun main()= _SETdefaultFont _CRfont _channel 14 0 0 "arial"; set win=_CRwindow _channel nil 50 50 310 160 WN_MENU+WN_MINBOX "Informations"; _CBwinDestroy win @_destroyevent 0; set text=_CRtext _channel win 10 10 290 30 ET_BORDER strcat "Available Services on " _channelIP _channel; set infos=_CRlist _channel win 10 50 290 100 LB_DOWN+LB_VSCROLL; _CBlistDclick infos @_contact 0; _refreshinfo nil nil ;;