/* ----------------------------------------------------------------------------- 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 -> [ctrlx1 ctrly1 ctrlz1 ctrlx2 ctrly2 ctrlz2] in let getEdCtrlFloatValue ctrlx1 -> x1 in let getEdCtrlFloatValue ctrly1 -> y1 in let getEdCtrlFloatValue ctrlz1 -> z1 in let getEdCtrlFloatValue ctrlx2 -> x2 in let getEdCtrlFloatValue ctrly2 -> y2 in let getEdCtrlFloatValue ctrlz2 -> z2 in ["x1" ftoa x1]:: ["y1" ftoa y1]:: ["z1" ftoa z1]:: ["x2" ftoa x2]:: ["y2" ftoa y2]:: ["z2" ftoa z2]:: nil;; fun dynamicedit(winstr, inst, viewstr, applybtn)= let [320 170] -> [iw ih] in ( setEdWindowSize winstr iw ih; let atof (getPluginInstanceParam inst "x1") -> x1 in let atof (getPluginInstanceParam inst "y1") -> y1 in let atof (getPluginInstanceParam inst "z1") -> z1 in let atof (getPluginInstanceParam inst "x2") -> x2 in let atof (getPluginInstanceParam inst "y2") -> y2 in let atof (getPluginInstanceParam inst "z2") -> z2 in let if x1 == nil then 0.0 else x1 -> x1 in let if y1 == nil then 0.0 else y1 -> y1 in let if z1 == nil then 0.0 else z1 -> z1 in let if x2 == nil then 0.0 else x2 -> x2 in let if y2 == nil then 0.0 else y2 -> y2 in let if z2 == nil then 0.0 else z2 -> z2 in let crEdCtrlLabel winstr 10 12 160 20 (loc "OS3DRANDOMVEC_0004") nil -> labelax in let crEdCtrlFloat winstr 180 10 130 20 x1 (-.100000.0) 100000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrlx1 in let crEdCtrlLabel winstr 10 37 160 20 (loc "OS3DRANDOMVEC_0005") nil -> labelay in let crEdCtrlFloat winstr 180 35 130 20 y1 (-.100000.0) 100000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrly1 in let crEdCtrlLabel winstr 10 62 160 20 (loc "OS3DRANDOMVEC_0006") nil -> labelaz in let crEdCtrlFloat winstr 180 60 130 20 z1 (-.100000.0) 100000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrlz1 in let crEdCtrlLabel winstr 10 97 160 20 (loc "OS3DRANDOMVEC_0001") nil -> labelax in let crEdCtrlFloat winstr 180 95 130 20 x2 (-.100000.0) 100000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrlx2 in let crEdCtrlLabel winstr 10 122 160 20 (loc "OS3DRANDOMVEC_0002") nil -> labelay in let crEdCtrlFloat winstr 180 120 130 20 y2 (-.100000.0) 100000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrly2 in let crEdCtrlLabel winstr 10 147 160 20 (loc "OS3DRANDOMVEC_0003") nil -> labelaz in let crEdCtrlFloat winstr 180 145 130 20 z2 (-.100000.0) 100000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrlz2 in ( [mkfun1 @cbCloseEdit [ctrlx1 ctrly1 ctrlz1 ctrlx2 ctrly2 ctrlz2] nil]; ); );;