// by iri - http://www.irizone.net // may 2005 /* PART EDITOR */ typeof editWin = ObjWin;; // fenêtre de configuration typeof colorR = ObjText;; // champ couleur rouge typeof colorG = ObjText;; // champ couleur verte typeof colorB = ObjText;; // champ couleur bleue /* fonction sauvant la configuration du module dans le dms */ fun save (filename, n)= let atoi _GETtext colorR -> r in let atoi _GETtext colorG -> g in let atoi _GETtext colorB -> b in let if r > 255 then 255 else r -> r in let if g > 255 then 255 else g -> g in let if b > 255 then 255 else b -> b in // actions ( "action" :: "start" :: nil ) :: ( "actionC" :: "show" :: nil ) :: ( "actionC" :: "hide" :: nil ) :: ( "actionC" :: "search" :: nil ) :: ( "actionC" :: "chgLang" :: nil ) :: // événements ( "eventC" :: "found" :: nil) :: ( "eventC" :: "shown" :: nil) :: ( "eventC" :: "hidden" :: nil) :: ( "eventC" :: "changed" :: nil) :: ( "eventC" :: "rightClicked" :: nil ) :: // paramètres ( "color" :: (itoa make_rgb r g b) :: nil ) :: // zones graphiques ( "zoneC" :: "scolpedia" :: nil ) :: nil ;; /* fonction chargeant les paramètres du module stockés dans le dms */ fun load (l) = // paramètres let atoi getInfo l "color" -> c in // affichage des paramètres ( _SETtext colorR itoa mod c 256; _SETtext colorG itoa mod (c / 256) 256; _SETtext colorB itoa mod (c / 65536) 256; ); 0;; /* initialisation de l'éditeur */ fun IniEditor(filename)= let startEditor _channel nil nil nil 315 30 WN_NORMAL-WN_SIZEBOX EDITOR_STATUSBAR filename "dms/tools/scolpedia/scolpedia.dmc" nil nil @load @save nil -> ed in ( set editWin = getEditWin ed; _CRtext _channel editWin 5 10 15 20 0 "R :"; set colorR = _CReditLine _channel editWin 30 5 50 20 ET_NUMBER|ET_DOWN "0"; _CRtext _channel editWin 90 10 15 20 0 "G :"; set colorG = _CReditLine _channel editWin 120 5 50 20 ET_NUMBER|ET_DOWN "0"; _CRtext _channel editWin 180 10 15 20 0 "B :"; set colorB = _CReditLine _channel editWin 210 5 50 20 ET_NUMBER|ET_DOWN "0"; status ed "par / by : iri - http://www.irizone.net"; _PAINTcontainer ed.EditorPanel; if filename==nil then nil else openDMI ed ); 0;;