1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150 |
- smalltalk.addClass('CanvasRenderingContext', smalltalk.Object, [], 'Canvas');
- smalltalk.addMethod(
- '_fillStyle_',
- smalltalk.method({
- selector: 'fillStyle:',
- fn: function (aString){
- var self=this;
- self.fillStyle = String(aString);
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_beginPath',
- smalltalk.method({
- selector: 'beginPath',
- fn: function (){
- var self=this;
- self.beginPath();
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_closePath',
- smalltalk.method({
- selector: 'closePath',
- fn: function (){
- var self=this;
- self.closePath();
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_fill',
- smalltalk.method({
- selector: 'fill',
- fn: function (){
- var self=this;
- self.fill();
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_stroke',
- smalltalk.method({
- selector: 'stroke',
- fn: function (){
- var self=this;
- self.stroke();
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_moveTo_',
- smalltalk.method({
- selector: 'moveTo:',
- fn: function (aPoint){
- var self=this;
- self.moveTo(aPoint._x(), aPoint._y());
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_lineTo_',
- smalltalk.method({
- selector: 'lineTo:',
- fn: function (aPoint){
- var self=this;
- self.lineTo(aPoint._x(), aPoint._y());
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_arcTo_radius_startAngle_endAngle_anticlockwise_',
- smalltalk.method({
- selector: 'arcTo:radius:startAngle:endAngle:anticlockwise:',
- fn: function (aPoint, aNumber, aNumber2, aNumber3, aBoolean){
- var self=this;
- self.arc(aPoint._x(), aPoint._y(), aNumber, aNumber2, aNumber3, aBoolean);
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_arcTo_radius_',
- smalltalk.method({
- selector: 'arcTo:radius:',
- fn: function (aPoint, aNumber){
- var self=this;
- smalltalk.send(self, "_arcTo_radius_startAngle_endAngle_anticlockwise_", [aPoint, aNumber, (0), smalltalk.send(smalltalk.send(smalltalk.Number, "_pi", []), "__star", [(2)]), false]);
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_fillRectFrom_to_',
- smalltalk.method({
- selector: 'fillRectFrom:to:',
- fn: function (aPoint, anotherPoint){
- var self=this;
- self.fillRect(aPoint._x(), aPoint._y(), anotherPoint._x(), anotherPoint._y());
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_strokeRectFrom_to_',
- smalltalk.method({
- selector: 'strokeRectFrom:to:',
- fn: function (aPoint, anotherPoint){
- var self=this;
- self.strokeRect(aPoint._x(), aPoint._y(), anotherPoint._x(), anotherPoint._y());
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_clearRectFrom_to_',
- smalltalk.method({
- selector: 'clearRectFrom:to:',
- fn: function (aPoint, anotherPoint){
- var self=this;
- self.fillRect(aPoint._x(), aPoint._y(), anotherPoint._x(), anotherPoint._y());
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_strokeStyle_',
- smalltalk.method({
- selector: 'strokeStyle:',
- fn: function (aString){
- var self=this;
- self.strokeStyle = String(aString);
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_lineWidth_',
- smalltalk.method({
- selector: 'lineWidth:',
- fn: function (aNumber){
- var self=this;
- self.lineWidth = aNumber;
- return self;}
- }),
- smalltalk.CanvasRenderingContext);
- smalltalk.addMethod(
- '_tagBrush_',
- smalltalk.method({
- selector: 'tagBrush:',
- fn: function (aTagBrush){
- var self=this;
- return aTagBrush._element().getContext('2d');
- return self;}
- }),
- smalltalk.CanvasRenderingContext.klass);
- smalltalk.addClass('HTMLCanvas', smalltalk.Object, ['root'], 'Canvas');
- smalltalk.addMethod(
- '_root_',
- smalltalk.method({
- selector: 'root:',
- fn: function (aTagBrush){
- var self=this;
- self['@root']=aTagBrush;
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_root',
- smalltalk.method({
- selector: 'root',
- fn: function (){
- var self=this;
- return self['@root'];
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_initialize',
- smalltalk.method({
- selector: 'initialize',
- fn: function (){
- var self=this;
- smalltalk.send(self, "_initialize", [], smalltalk.Object);
- smalltalk.send(self['@root'], "_ifNil_", [(function(){return self['@root']=smalltalk.send(smalltalk.TagBrush, "_fromString_canvas_", ["div", self]);})]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_with_',
- smalltalk.method({
- selector: 'with:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_root", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_newTag_',
- smalltalk.method({
- selector: 'newTag:',
- fn: function (aString){
- var self=this;
- return smalltalk.send(smalltalk.TagBrush, "_fromString_canvas_", [aString, self]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_tag_',
- smalltalk.method({
- selector: 'tag:',
- fn: function (aString){
- var self=this;
- return smalltalk.send(self['@root'], "_addBrush_", [smalltalk.send(self, "_newTag_", [aString])]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h1',
- smalltalk.method({
- selector: 'h1',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["h1"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h2',
- smalltalk.method({
- selector: 'h2',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["h2"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h3',
- smalltalk.method({
- selector: 'h3',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["h3"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h4',
- smalltalk.method({
- selector: 'h4',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["h4"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h5',
- smalltalk.method({
- selector: 'h5',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["h5"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h6',
- smalltalk.method({
- selector: 'h6',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["h6"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_p',
- smalltalk.method({
- selector: 'p',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["p"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_div',
- smalltalk.method({
- selector: 'div',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["div"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_span',
- smalltalk.method({
- selector: 'span',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["span"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_img',
- smalltalk.method({
- selector: 'img',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["img"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_ul',
- smalltalk.method({
- selector: 'ul',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["ul"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_ol',
- smalltalk.method({
- selector: 'ol',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["ol"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_li',
- smalltalk.method({
- selector: 'li',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["li"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_table',
- smalltalk.method({
- selector: 'table',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["table"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_tr',
- smalltalk.method({
- selector: 'tr',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["tr"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_td',
- smalltalk.method({
- selector: 'td',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["td"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_th',
- smalltalk.method({
- selector: 'th',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["th"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_form',
- smalltalk.method({
- selector: 'form',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["form"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_input',
- smalltalk.method({
- selector: 'input',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["input"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_button',
- smalltalk.method({
- selector: 'button',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["button"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_select',
- smalltalk.method({
- selector: 'select',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["select"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_option',
- smalltalk.method({
- selector: 'option',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["option"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_textarea',
- smalltalk.method({
- selector: 'textarea',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["textarea"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_a',
- smalltalk.method({
- selector: 'a',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["a"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_canvas',
- smalltalk.method({
- selector: 'canvas',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["canvas"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_initializeFromJQuery_',
- smalltalk.method({
- selector: 'initializeFromJQuery:',
- fn: function (aJQuery){
- var self=this;
- self['@root']=smalltalk.send(smalltalk.TagBrush, "_fromJQuery_canvas_", [aJQuery, self]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_pre',
- smalltalk.method({
- selector: 'pre',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["pre"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_code',
- smalltalk.method({
- selector: 'code',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["code"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_br',
- smalltalk.method({
- selector: 'br',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["br"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_script',
- smalltalk.method({
- selector: 'script',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["script"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_link',
- smalltalk.method({
- selector: 'link',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["link"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_style',
- smalltalk.method({
- selector: 'style',
- category: 'tags',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["style"]);
- return self;},
- source: unescape('style%0A%09%5Eself%20tag%3A%20%27style%27'),
- messageSends: ["tag:"],
- referencedClasses: []
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_onJQuery_',
- smalltalk.method({
- selector: 'onJQuery:',
- fn: function (aJQuery){
- var self=this;
- return (function($rec){smalltalk.send($rec, "_initializeFromJQuery_", [aJQuery]);smalltalk.send($rec, "_initialize", []);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_basicNew", []));
- return self;}
- }),
- smalltalk.HTMLCanvas.klass);
- smalltalk.addClass('TagBrush', smalltalk.Object, ['canvas', 'element'], 'Canvas');
- smalltalk.addMethod(
- '_contents_',
- smalltalk.method({
- selector: 'contents:',
- fn: function (anObject){
- var self=this;
- smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_empty", []);
- smalltalk.send(self, "_append_", [anObject]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_addBrush_',
- smalltalk.method({
- selector: 'addBrush:',
- fn: function (aTagBrush){
- var self=this;
- smalltalk.send(self, "_appendChild_", [smalltalk.send(aTagBrush, "_element", [])]);
- return aTagBrush;
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_with_',
- smalltalk.method({
- selector: 'with:',
- fn: function (anObject){
- var self=this;
- smalltalk.send(self, "_append_", [anObject]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_append_',
- smalltalk.method({
- selector: 'append:',
- fn: function (anObject){
- var self=this;
- smalltalk.send(anObject, "_appendToBrush_", [self]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_appendToBrush_',
- smalltalk.method({
- selector: 'appendToBrush:',
- fn: function (aTagBrush){
- var self=this;
- smalltalk.send(aTagBrush, "_addBrush_", [self]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_appendBlock_',
- smalltalk.method({
- selector: 'appendBlock:',
- fn: function (aBlock){
- var self=this;
- var root=nil;
- root=smalltalk.send(self['@canvas'], "_root", []);
- smalltalk.send(self['@canvas'], "_root_", [self]);
- smalltalk.send(aBlock, "_value_", [self['@canvas']]);
- smalltalk.send(self['@canvas'], "_root_", [root]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_appendChild_',
- smalltalk.method({
- selector: 'appendChild:',
- fn: function (anElement){
- var self=this;
- self['@element'].appendChild(anElement);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_appendString_',
- smalltalk.method({
- selector: 'appendString:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_appendChild_", [smalltalk.send(self, "_createTextNodeFor_", [aString])]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_at_put_',
- smalltalk.method({
- selector: 'at:put:',
- fn: function (aString, aValue){
- var self=this;
- self['@element'].setAttribute(aString, aValue);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_removeAt_',
- smalltalk.method({
- selector: 'removeAt:',
- fn: function (aString){
- var self=this;
- self['@element'].removeAttribute(aString);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_class_',
- smalltalk.method({
- selector: 'class:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["class", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_id_',
- smalltalk.method({
- selector: 'id:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["id", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_src_',
- smalltalk.method({
- selector: 'src:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["src", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_href_',
- smalltalk.method({
- selector: 'href:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["href", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_title_',
- smalltalk.method({
- selector: 'title:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["title", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_style_',
- smalltalk.method({
- selector: 'style:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["style", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_initializeFromString_canvas_',
- smalltalk.method({
- selector: 'initializeFromString:canvas:',
- fn: function (aString, aCanvas){
- var self=this;
- self['@element']=smalltalk.send(self, "_createElementFor_", [aString]);
- self['@canvas']=aCanvas;
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_element',
- smalltalk.method({
- selector: 'element',
- fn: function (){
- var self=this;
- return self['@element'];
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_asJQuery',
- smalltalk.method({
- selector: 'asJQuery',
- fn: function (){
- var self=this;
- return smalltalk.JQuery._from_(jQuery(self['@element']));
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_asJQueryDo_',
- smalltalk.method({
- selector: 'asJQueryDo:',
- fn: function (aBlock){
- var self=this;
- smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_asJQuery", [])]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_onKeyDown_',
- smalltalk.method({
- selector: 'onKeyDown:',
- fn: function (aBlock){
- var self=this;
- smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keydown", aBlock]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_onKeyPress_',
- smalltalk.method({
- selector: 'onKeyPress:',
- fn: function (aBlock){
- var self=this;
- smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keypress", aBlock]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_onKeyUp_',
- smalltalk.method({
- selector: 'onKeyUp:',
- fn: function (aBlock){
- var self=this;
- smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keyup", aBlock]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_onFocus_',
- smalltalk.method({
- selector: 'onFocus:',
- fn: function (aBlock){
- var self=this;
- smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["focus", aBlock]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_onBlur_',
- smalltalk.method({
- selector: 'onBlur:',
- fn: function (aBlock){
- var self=this;
- smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["blur", aBlock]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_onChange_',
- smalltalk.method({
- selector: 'onChange:',
- fn: function (aBlock){
- var self=this;
- smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["change", aBlock]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_onClick_',
- smalltalk.method({
- selector: 'onClick:',
- fn: function (aBlock){
- var self=this;
- smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["click", aBlock]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_createElementFor_',
- smalltalk.method({
- selector: 'createElementFor:',
- fn: function (aString){
- var self=this;
- return document.createElement(String(aString));
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_createTextNodeFor_',
- smalltalk.method({
- selector: 'createTextNodeFor:',
- fn: function (aString){
- var self=this;
- return document.createTextNode(String(aString));
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_initializeFromJQuery_canvas_',
- smalltalk.method({
- selector: 'initializeFromJQuery:canvas:',
- fn: function (aJQuery, aCanvas){
- var self=this;
- self['@element']=smalltalk.send(smalltalk.send(aJQuery, "_jquery", []), "_get_", [(0)]);
- self['@canvas']=aCanvas;
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_type_',
- smalltalk.method({
- selector: 'type:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["type", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_media_',
- smalltalk.method({
- selector: 'media:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["media", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_rel_',
- smalltalk.method({
- selector: 'rel:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["rel", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_fromString_canvas_',
- smalltalk.method({
- selector: 'fromString:canvas:',
- fn: function (aString, aCanvas){
- var self=this;
- return (function($rec){smalltalk.send($rec, "_initializeFromString_canvas_", [aString, aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
- return self;}
- }),
- smalltalk.TagBrush.klass);
- smalltalk.addMethod(
- '_fromJQuery_canvas_',
- smalltalk.method({
- selector: 'fromJQuery:canvas:',
- fn: function (aJQuery, aCanvas){
- var self=this;
- return (function($rec){smalltalk.send($rec, "_initializeFromJQuery_canvas_", [aJQuery, aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
- return self;}
- }),
- smalltalk.TagBrush.klass);
- smalltalk.addClass('Widget', smalltalk.Object, [], 'Canvas');
- smalltalk.addMethod(
- '_appendToBrush_',
- smalltalk.method({
- selector: 'appendToBrush:',
- fn: function (aTagBrush){
- var self=this;
- smalltalk.send(self, "_appendToJQuery_", [smalltalk.send(aTagBrush, "_asJQuery", [])]);
- return self;}
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- '_appendToJQuery_',
- smalltalk.method({
- selector: 'appendToJQuery:',
- fn: function (aJQuery){
- var self=this;
- smalltalk.send(self, "_renderOn_", [smalltalk.send(smalltalk.HTMLCanvas, "_onJQuery_", [aJQuery])]);
- return self;}
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- '_alert_',
- smalltalk.method({
- selector: 'alert:',
- fn: function (aString){
- var self=this;
- alert(aString);
- return self;}
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- '_confirm_',
- smalltalk.method({
- selector: 'confirm:',
- fn: function (aString){
- var self=this;
- return window.confirm(aString);
- return self;}
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- '_prompt_',
- smalltalk.method({
- selector: 'prompt:',
- fn: function (aString){
- var self=this;
- return smalltalk.send(self, "_prompt_default_", [aString, ""]);
- return self;}
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- '_prompt_default_',
- smalltalk.method({
- selector: 'prompt:default:',
- fn: function (aString, anotherString){
- var self=this;
- return window.prompt(aString, anotherString);
- return self;}
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- '_renderOn_',
- smalltalk.method({
- selector: 'renderOn:',
- fn: function (html){
- var self=this;
- self;
- return self;}
- }),
- smalltalk.Widget);
- smalltalk.addClass('CanvasBrush', smalltalk.TagBrush, [], 'Canvas');
- smalltalk.addMethod(
- '_createElement',
- smalltalk.method({
- selector: 'createElement',
- fn: function (){
- var self=this;
- return document.createElement('canvas');
- return self;}
- }),
- smalltalk.CanvasBrush);
- smalltalk.addMethod(
- '_initializeWithCanvas_',
- smalltalk.method({
- selector: 'initializeWithCanvas:',
- fn: function (aCanvas){
- var self=this;
- canvas=aCanvas;
- return self;}
- }),
- smalltalk.CanvasBrush);
- smalltalk.addMethod(
- '_canvas_',
- smalltalk.method({
- selector: 'canvas:',
- fn: function (aCanvas){
- var self=this;
- return (function($rec){smalltalk.send($rec, "_initializeWithCanvas_", [aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
- return self;}
- }),
- smalltalk.CanvasBrush.klass);
- smalltalk.addMethod(
- '_appendToBrush_',
- smalltalk.method({
- selector: 'appendToBrush:',
- fn: function (aTagBrush){
- var self=this;
- smalltalk.send(aTagBrush, "_append_", [smalltalk.send(self, "_asString", [])]);
- return self;}
- }),
- smalltalk.Object);
- smalltalk.addMethod(
- '_appendToBrush_',
- smalltalk.method({
- selector: 'appendToBrush:',
- fn: function (aTagBrush){
- var self=this;
- smalltalk.send(aTagBrush, "_appendBlock_", [self]);
- return self;}
- }),
- smalltalk.BlockClosure);
- smalltalk.addMethod(
- '_appendToBrush_',
- smalltalk.method({
- selector: 'appendToBrush:',
- fn: function (aTagBrush){
- var self=this;
- smalltalk.send(aTagBrush, "_appendString_", [self]);
- return self;}
- }),
- smalltalk.String);
|