/* autogenerated from "macros/Misc/TEXT_f.sci" */ function TEXT_f() { TEXT_f.prototype.define = function TEXT_f() { this.font = 2; this.siz = 1; this.model = scicos_model(); this.model.sim = new ScilabString(["text"]); this.model.rpar = new ScilabString(["Text"]); this.model.ipar = [[this.font],[this.siz]]; exprs = [["Text"],[string(this.font)],[string(this.siz)]]; graphics = scicos_graphics(); graphics.orig = [0,0]; graphics.sz = [2,1]; graphics.exprs = exprs; this.x = mlist(["Text","graphics","model","void","gui"],graphics,this.model," ","TEXT_f"); return new TextBlock(this.x); } TEXT_f.prototype.details = function TEXT_f() { return this.x; } TEXT_f.prototype.get = function TEXT_f() { var options = { txt:["Text",this.txt], font:["Font number",this.font], siz:["Font size",this.siz], } return options; } TEXT_f.prototype.set = function TEXT_f() { this.txt = arguments[0]["txt"] this.font = parseFloat(arguments[0]["font"]) this.siz = parseFloat(arguments[0]["siz"]) this.x = arg1; graphics = arg1.graphics; orig = graphics.orig; exprs = graphics.exprs; this.model = arg1.model; if (size(exprs,"*")==1) { exprs = [[exprs],["3"],["1"]]; } while (true) { [ok,this.txt,this.font,this.siz,exprs] = scicos_getvalue("Set Text block parameters",["Text","Font number","Font size"],list("str",-1,"vec",1,"vec",1),exprs); if (!ok) { break; } if (this.font<=0||this.font>6) { message("Font number must be greater than 0 and less than 7"); ok = false; } if (this.siz<0) { message("Font size must be positive"); ok = false; } if (ok) { graphics.exprs = exprs; gh_winpal = gca(); default_font_style = gh_winpal.font_style; default_font_size = gh_winpal.font_size; default_font_color = gh_winpal.font_color; gh_winpal.font_style = this.font; gh_winpal.font_size = this.siz; r = xstringl(0,0,exprs[1-1],evstr(exprs[2-1]),evstr(exprs[3-1])); gh_winpal.font_style = default_font_style; gh_winpal.font_size = default_font_size; gh_winpal.font_color = default_font_color; sz = r.slice(3-1,4); graphics.sz = sz; this.x.graphics = graphics; ipar = [[this.font],[this.siz]]; this.model.rpar = new ScilabDouble([this.txt]); this.model.ipar = ipar; this.x.model = this.model; break; } } return new TextBlock(this.x); } }