/* ----------------------------------------------------------------------------- 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 cbDestroyEdit()= 0;; fun cbCloseEdit(p)= let p -> [ctrlmodeName ctrlspace ctrlinit] in let getSelectedEdCtrlSelect ctrlmodeName -> mode in let ftoa getEdCtrlFloatValue ctrlspace -> space in let itoa getEdCtrlCheckState ctrlinit -> init in ["mode" mode]:: ["eyespacing" space]:: ["init" init]:: nil;; fun dynamicedit(winstr, inst, viewstr, applybtn)= let [400 90] -> [iw ih] in ( setEdWindowSize winstr iw ih; let (getPluginInstanceParam inst "mode") -> mode in let if mode == nil then "Anaglyph red/cyan" else mode -> mode in let atof (getPluginInstanceParam inst "eyespacing") -> space in let if space == nil then 0.065 else space -> space in let atoi (getPluginInstanceParam inst "init") -> init in let if init == nil then 0 else init -> init in let crEdCtrlLabel winstr 10 12 160 20 (strcat (loc "OS3DSTEREO_0007") " ") nil -> labelMode in let crEdCtrlSelect winstr 180 10 (iw - 190) 120 CB_AHSCROLL -> ctrlmodeName in let crEdCtrlLabel winstr 10 37 160 20 (loc "OS3DSTEREO_0004") nil -> labeleyes in let crEdCtrlFloat winstr 180 35 100 20 space 0.0 1000.0 0.0001 4 nil EDWIN_RESIZE_MW -> ctrlspace in let crEdCtrlCheck winstr 10 60 (iw - 20) 20 (loc "OS3DSTEREO_0003") EDWIN_RESIZE_MW -> ctrlinit in ( fillEdCtrlSelect ctrlmodeName "Anaglyph red/cyan"::"Anaglyph yellow/blue"::"Horizontaly interlaced"::"Verticaly interlaced"::"Interlaced with checkerboard"::"Side by side"::"Up/down"::"Quad Buffer"::/*"Oculus"::*/"Cardboard"::"Mono"::nil; selectEdCtrlSelect ctrlmodeName mode; setEdCtrlCheckState ctrlinit init; [mkfun1 @cbCloseEdit [ctrlmodeName ctrlspace ctrlinit] @cbDestroyEdit]; ); );;