/* ----------------------------------------------------------------------------- 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 -> [ctrlimin ctrlimax ctrlomin ctrlomax] in let getEdCtrlFloatValue ctrlimin -> inmin in let getEdCtrlFloatValue ctrlimax -> inmax in let getEdCtrlFloatValue ctrlomin -> outmin in let getEdCtrlFloatValue ctrlomax -> outmax in ["inmin" ftoa inmin]:: ["inmax" ftoa inmax]:: ["outmin" ftoa outmin]:: ["outmax" ftoa outmax]:: nil;; fun dynamicedit(winstr, inst, viewstr, applybtn)= let [320 110] -> [iw ih] in ( setEdWindowSize winstr iw ih; let atof (getPluginInstanceParam inst "inmin") -> inmin in let atof (getPluginInstanceParam inst "inmax") -> inmax in let atof (getPluginInstanceParam inst "outmin") -> outmin in let atof (getPluginInstanceParam inst "outmax") -> outmax in let if inmin == nil then 0.0 else inmin -> inmin in let if inmax == nil then 1.0 else inmax -> inmax in let if outmin == nil then 1.0 else outmin -> outmin in let if outmax == nil then 10.0 else outmax -> outmax in let 10 -> ypos in let crEdCtrlLabel winstr 10 ypos + 2 160 20 (loc "OS3DSCALEVAL_0001") nil -> labelimin in let crEdCtrlFloat winstr 180 ypos 130 20 inmin (-.100000.0) 100000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrlimin in let crEdCtrlLabel winstr 10 (set ypos = ypos + 25) + 2 160 20 (loc "OS3DSCALEVAL_0002") nil -> labelimax in let crEdCtrlFloat winstr 180 ypos 130 20 inmax (-.100000.0) 100000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrlimax in let crEdCtrlLabel winstr 10 (set ypos = ypos + 25) + 2 160 20 (loc "OS3DSCALEVAL_0003") nil -> labelomin in let crEdCtrlFloat winstr 180 ypos 130 20 outmin (-.100000.0) 100000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrlomin in let crEdCtrlLabel winstr 10 (set ypos = ypos + 25) + 2 160 20 (loc "OS3DSCALEVAL_0004") nil -> labelomax in let crEdCtrlFloat winstr 180 ypos 130 20 outmax (-.100000.0) 100000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrlomax in ( [mkfun1 @cbCloseEdit [ctrlimin ctrlimax ctrlomin ctrlomax] nil]; ); );;