123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266 |
- smalltalk.addPackage('Canvas', {});
- 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(
- '_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(
- '_initialize',
- smalltalk.method({
- selector: 'initialize',
- fn: function (){
- var self=this;
- smalltalk.send(self, "_initialize", [], smalltalk.Object);
- (($receiver = self['@root']) == nil || $receiver == undefined) ? (function(){return self['@root']=smalltalk.send((smalltalk.TagBrush || TagBrush), "_fromString_canvas_", ["div", self]);})() : $receiver;
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_initializeFromJQuery_',
- smalltalk.method({
- selector: 'initializeFromJQuery:',
- fn: function (aJQuery){
- var self=this;
- self['@root']=smalltalk.send((smalltalk.TagBrush || TagBrush), "_fromJQuery_canvas_", [aJQuery, self]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_newTag_',
- smalltalk.method({
- selector: 'newTag:',
- fn: function (aString){
- var self=this;
- return smalltalk.send((smalltalk.TagBrush || 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(
- '_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',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["style"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_p_',
- smalltalk.method({
- selector: 'p:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_p", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h1_',
- smalltalk.method({
- selector: 'h1:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_h1", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_iframe',
- smalltalk.method({
- selector: 'iframe',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["iframe"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_iframe_',
- smalltalk.method({
- selector: 'iframe:',
- fn: function (aString){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_iframe", []), "_src_", [aString]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h2_',
- smalltalk.method({
- selector: 'h2:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_h2", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h3_',
- smalltalk.method({
- selector: 'h3:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_h3", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h4_',
- smalltalk.method({
- selector: 'h4:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_h4", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h5_',
- smalltalk.method({
- selector: 'h5:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_h5", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_h6_',
- smalltalk.method({
- selector: 'h6:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_h6", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_img_',
- smalltalk.method({
- selector: 'img:',
- fn: function (aString){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_img", []), "_src_", [aString]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_ol_',
- smalltalk.method({
- selector: 'ol:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_ol", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_li_',
- smalltalk.method({
- selector: 'li:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_li", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_ul_',
- smalltalk.method({
- selector: 'ul:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_ul", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_span_',
- smalltalk.method({
- selector: 'span:',
- fn: function (anObject){
- var self=this;
- return smalltalk.send(smalltalk.send(self, "_span", []), "_with_", [anObject]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_style_',
- smalltalk.method({
- selector: 'style:',
- fn: function (aString){
- var self=this;
- return (function($rec){smalltalk.send($rec, "_with_", [aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_style", []));
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_articles',
- smalltalk.method({
- selector: 'articles',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["articles"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_audio',
- smalltalk.method({
- selector: 'audio',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["audio"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_fieldset',
- smalltalk.method({
- selector: 'fieldset',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["fieldset"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_footer',
- smalltalk.method({
- selector: 'footer',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["footer"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_header',
- smalltalk.method({
- selector: 'header',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["header"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_hr',
- smalltalk.method({
- selector: 'hr',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["hr"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_section',
- smalltalk.method({
- selector: 'section',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["section"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_tbody',
- smalltalk.method({
- selector: 'tbody',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["tbody"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_tfoot',
- smalltalk.method({
- selector: 'tfoot',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["tfoot"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_thead',
- smalltalk.method({
- selector: 'thead',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["thead"]);
- return self;}
- }),
- smalltalk.HTMLCanvas);
- smalltalk.addMethod(
- '_video',
- smalltalk.method({
- selector: 'video',
- fn: function (){
- var self=this;
- return smalltalk.send(self, "_tag_", ["video"]);
- return self;}
- }),
- 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(
- '_element',
- smalltalk.method({
- selector: 'element',
- fn: function (){
- var self=this;
- return self['@element'];
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_contents_',
- smalltalk.method({
- selector: 'contents:',
- fn: function (anObject){
- var self=this;
- (function($rec){smalltalk.send($rec, "_empty", []);return smalltalk.send($rec, "_append_", [anObject]);})(self);
- 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;
- var element=self['@element'];
- if (null == element.canHaveChildren || element.canHaveChildren) {
- element.appendChild(anElement);
- } else {
- element.text = String(element.text) + anElement.innerHTML;
- } ;
- 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(
- '_empty',
- smalltalk.method({
- selector: 'empty',
- fn: function (){
- var self=this;
- smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_empty", []);
- 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;
- self['@element'].className = 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(
- '_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(
- '_width_',
- smalltalk.method({
- selector: 'width:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["width", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_height_',
- smalltalk.method({
- selector: 'height:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["height", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_value_',
- smalltalk.method({
- selector: 'value:',
- fn: function (aString){
- var self=this;
- smalltalk.send(self, "_at_put_", ["value", aString]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_asJQuery',
- smalltalk.method({
- selector: 'asJQuery',
- fn: function (){
- var self=this;
- return smalltalk.send((typeof window == 'undefined' ? nil : window), "_jQuery_", [smalltalk.send(self, "_element", [])]);
- return self;}
- }),
- smalltalk.TagBrush);
- smalltalk.addMethod(
- '_onKeyDown_',
- smalltalk.method({
- selector: 'onKeyDown:',
- fn: function (aBlock){
- var self=this;
- smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_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", []), "_bind_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", []), "_bind_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", []), "_bind_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", []), "_bind_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", []), "_bind_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", []), "_bind_do_", ["click", aBlock]);
- 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(
- '_initializeFromJQuery_canvas_',
- smalltalk.method({
- selector: 'initializeFromJQuery:canvas:',
- fn: function (aJQuery, aCanvas){
- var self=this;
- self['@element']=smalltalk.send(aJQuery, "_get_", [(0)]);
- self['@canvas']=aCanvas;
- 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(
- '_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 || HTMLCanvas), "_onJQuery_", [aJQuery])]);
- return self;}
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- '_renderOn_',
- smalltalk.method({
- selector: 'renderOn:',
- fn: function (html){
- var self=this;
- self;
- return self;}
- }),
- smalltalk.Widget);
- smalltalk.addMethod(
- '_appendToJQuery_',
- smalltalk.method({
- selector: 'appendToJQuery:',
- fn: function (aJQuery){
- var self=this;
- smalltalk.send(aJQuery, "_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, "_append_", [smalltalk.send(self, "_asString", [])]);
- return self;}
- }),
- smalltalk.Object);
- smalltalk.addMethod(
- '_appendToJQuery_',
- smalltalk.method({
- selector: 'appendToJQuery:',
- fn: function (aJQuery){
- var self=this;
- smalltalk.send(self, "_value_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
- return self;}
- }),
- smalltalk.BlockClosure);
- smalltalk.addMethod(
- '_appendToBrush_',
- smalltalk.method({
- selector: 'appendToBrush:',
- fn: function (aTagBrush){
- var self=this;
- smalltalk.send(aTagBrush, "_appendBlock_", [self]);
- return self;}
- }),
- smalltalk.BlockClosure);
- smalltalk.addMethod(
- '_asJQuery',
- smalltalk.method({
- selector: 'asJQuery',
- fn: function (){
- var self=this;
- return jQuery(String(self));
- return self;}
- }),
- smalltalk.String);
- smalltalk.addMethod(
- '_appendToJQuery_',
- smalltalk.method({
- selector: 'appendToJQuery:',
- fn: function (aJQuery){
- var self=this;
- smalltalk.send(aJQuery, "_append_", [self]);
- return self;}
- }),
- smalltalk.String);
- smalltalk.addMethod(
- '_appendToBrush_',
- smalltalk.method({
- selector: 'appendToBrush:',
- fn: function (aTagBrush){
- var self=this;
- smalltalk.send(aTagBrush, "_appendString_", [self]);
- return self;}
- }),
- smalltalk.String);
|