/* ----------------------------------------------------------------------------- This source file is part of OpenSpace3D For the latest info, see http://www.openspace3d.com Copyright (c) 2012 I-maginer 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 ----------------------------------------------------------------------------- */ fun cbCloseEdit(p)= let p -> [ctrlhours ctrlminutes ctrlseconds ctrlautostart] in let ftoi getEdCtrlFloatValue ctrlhours -> hours in let ftoi getEdCtrlFloatValue ctrlminutes -> minutes in let ftoi getEdCtrlFloatValue ctrlseconds -> seconds in let getEdCtrlCheckState ctrlautostart -> autostart in ["hours" itoa hours]:: ["minutes" itoa minutes]:: ["seconds" itoa seconds]:: ["autostart" itoa autostart]:: nil;; fun dynamicedit(winstr, inst, viewstr, applybtn)= let [400 90] -> [iw ih] in ( setEdWindowSize winstr iw ih; let atof (getPluginInstanceParam inst "hours") -> hours in let if (hours == nil) then 0.0 else hours -> hours in let atof (getPluginInstanceParam inst "minutes") -> minutes in let if (minutes == nil) then 1.0 else minutes -> minutes in let atof (getPluginInstanceParam inst "seconds") -> seconds in let if (seconds == nil) then 0.0 else seconds -> seconds in let atoi (getPluginInstanceParam inst "autostart") -> autostart in let crEdCtrlLabel winstr 10 12 80 20 (loc "OS3DCOUNTDOWN_0001") nil -> labelhours in let crEdCtrlFloat winstr 95 10 40 20 hours 0.0 23.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlhours in let crEdCtrlLabel winstr 140 12 20 20 ":" nil -> labelhours in let crEdCtrlFloat winstr 155 10 40 20 minutes 0.0 59.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlminutes in let crEdCtrlLabel winstr 200 12 20 20 ":" nil -> labelhours in let crEdCtrlFloat winstr 215 10 40 20 seconds 0.0 59.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlseconds in let crEdCtrlCheck winstr 10 35 280 20 (loc "OS3DCOUNTDOWN_0002") EDWIN_RESIZE_MW -> ctrlautostart in ( setEdCtrlCheckState ctrlautostart autostart; [mkfun1 @cbCloseEdit [ctrlhours ctrlminutes ctrlseconds ctrlautostart] nil]; ); );;