/* autogenerated from "macros/Sinks/BARXY.sci" */ function BARXY() { BARXY.prototype.define = function BARXY() { this.model = scicos_model(); this.xmin = -15; this.xmax = 15; this.ymin = -15; this.ymax = 15; this.model.sim = list(new ScilabString(["BARXY_sim"]), new ScilabDouble([5])); this.model.blocktype = new ScilabString(["d"]); this.model.dep_ut = [true,false]; this.model.in1 = [[-1],[-1]]; this.model.intyp = [1]; this.model.out = []; this.model.evtin = [1]; this.model.rpar = new ScilabDouble([this.xmin],[this.xmax],[this.ymin],[this.ymax]); this.model.ipar = new ScilabDouble([1]); this.x = standard_define([2,2],this.model,[],[]); this.x.graphics.in_implicit = ["E","E"]; this.x.graphics.out_implicit = []; this.x.graphics.exprs = [["-15"],["15"],["-15"],["15"],["1"]]; return new BasicBlock(this.x); } BARXY.prototype.details = function BARXY() { return this.x; } BARXY.prototype.get = function BARXY() { var options = { xmin:["Xmin",this.xmin], xmax:["Xmax",this.xmax], ymin:["Ymin",this.ymin], ymax:["Ymax",this.ymax], thickness:["Segs Thickness",this.thickness], } return options; } BARXY.prototype.set = function BARXY() { this.xmin = parseFloat(arguments[0]["xmin"]) this.xmax = parseFloat(arguments[0]["xmax"]) this.ymin = parseFloat(arguments[0]["ymin"]) this.ymax = parseFloat(arguments[0]["ymax"]) this.thickness = arguments[0]["thickness"] this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; this.model = arg1.model; while (true) { [ok,this.xmin,this.xmax,this.ymin,this.ymax,this.thickness,exprs] = scicos_getvalue("Set Scope parameters",["Xmin","Xmax","Ymin","Ymax","Segs Thickness"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); if (!ok) { break; } mess = []; if (this.ymin>=this.ymax) { mess = [[mess],["Ymax must be greater than Ymin"],[" "]]; ok = false; } if (this.xmin>=this.xmax) { mess = [[mess],["Xmax must be greater than Xmin"],[" "]]; ok = false; } if (this.thickness<=0) { mess = [[mess],["Thickness must be strictly positive."]]; ok = false; } if (!ok) { message(mess); } else { this.model.rpar = new ScilabDouble([this.xmin],[this.xmax],[this.ymin],[this.ymax]); this.model.ipar = new ScilabDouble([this.thickness]); graphics.exprs = exprs; this.x.graphics = graphics; this.x.model = this.model; break; } } return new BasicBlock(this.x); } }