// prototype of the cbCloseEdit function in case you don't use params //proto cbCloseEdit = fun [] [[S S] r1];; // Close callback called on apply / Ok button, this callback return the parameters to save in the XOS project fun cbCloseEdit(ctrlinit)= // get the check state and add it to the param list let itoa getEdCtrlCheckState ctrlinit -> state in ["oninit" state]:: nil;; // Destroy callback called when the editor window is destroyed, this is useful to destroy added objects or resources fun cbDestroyEdit()= 0;; // Init function called when a user the plugIT Editor fun dynamicedit(winstr, inst, viewstr, applybtn)= // size of the window let [400 90] -> [iw ih] in ( // resize the editor window setEdWindowSize winstr iw ih; // retrieve the current param value let atoi (getPluginInstanceParam inst "oninit") -> state in // create the check box control on the editor window let crEdCtrlCheck winstr 10 10 280 20 (loc "OS3DEXECUTE_SCRIPT_0002") EDWIN_RESIZE_MW -> ctrlinit in ( // set the current check state setEdCtrlCheckState ctrlinit state; [(mkfun1 @cbCloseEdit ctrlinit) @cbDestroyEdit]; ); );;