/* ----------------------------------------------------------------------------- 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 -> [ctrlname ctrlself] in let getEdCtrlTextLineValue ctrlname -> name in let itoa getEdCtrlCheckState ctrlself -> self in ["name" name]:: ["self" self]:: nil;; fun dynamicedit(winstr, inst, viewstr, applybtn)= let [400 65] -> [iw ih] in let 10 -> ypos in ( setEdWindowSize winstr iw ih; let (getPluginInstanceParam inst "name") -> name in let if name == nil then "Tunnel01" else name -> name in let atoi (getPluginInstanceParam inst "self") -> self in let if self == nil then 0 else self -> self in let crEdCtrlLabel winstr 10 ((set ypos = 10) + 2) 100 20 (loc "OS3DTUNNEL_0002") nil -> labelname in let crEdCtrlTextLine winstr 120 ypos 200 20 name nil EDWIN_RESIZE_MW -> ctrlname in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) (iw - 20) 20 (loc "OS3DTUNNEL_0001") EDWIN_RESIZE_MW -> ctrlself in ( setEdCtrlCheckState ctrlself self; [mkfun1 @cbCloseEdit [ctrlname ctrlself] nil]; ); );;