1
0

Canvas.deploy.js 22 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  1. smalltalk.addClass('HTMLCanvas', smalltalk.Object, ['root'], 'Canvas');
  2. smalltalk.addMethod(
  3. '_root_',
  4. smalltalk.method({
  5. selector: 'root:',
  6. fn: function (aTagBrush){
  7. var self=this;
  8. self['@root']=aTagBrush;
  9. return self;}
  10. }),
  11. smalltalk.HTMLCanvas);
  12. smalltalk.addMethod(
  13. '_root',
  14. smalltalk.method({
  15. selector: 'root',
  16. fn: function (){
  17. var self=this;
  18. return self['@root'];
  19. return self;}
  20. }),
  21. smalltalk.HTMLCanvas);
  22. smalltalk.addMethod(
  23. '_with_',
  24. smalltalk.method({
  25. selector: 'with:',
  26. fn: function (anObject){
  27. var self=this;
  28. return smalltalk.send(smalltalk.send(self, "_root", []), "_with_", [anObject]);
  29. return self;}
  30. }),
  31. smalltalk.HTMLCanvas);
  32. smalltalk.addMethod(
  33. '_initialize',
  34. smalltalk.method({
  35. selector: 'initialize',
  36. fn: function (){
  37. var self=this;
  38. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  39. (($receiver = self['@root']) == nil || $receiver == undefined) ? (function(){return self['@root']=smalltalk.send((smalltalk.TagBrush || TagBrush), "_fromString_canvas_", ["div", self]);})() : $receiver;
  40. return self;}
  41. }),
  42. smalltalk.HTMLCanvas);
  43. smalltalk.addMethod(
  44. '_initializeFromJQuery_',
  45. smalltalk.method({
  46. selector: 'initializeFromJQuery:',
  47. fn: function (aJQuery){
  48. var self=this;
  49. self['@root']=smalltalk.send((smalltalk.TagBrush || TagBrush), "_fromJQuery_canvas_", [aJQuery, self]);
  50. return self;}
  51. }),
  52. smalltalk.HTMLCanvas);
  53. smalltalk.addMethod(
  54. '_newTag_',
  55. smalltalk.method({
  56. selector: 'newTag:',
  57. fn: function (aString){
  58. var self=this;
  59. return smalltalk.send((smalltalk.TagBrush || TagBrush), "_fromString_canvas_", [aString, self]);
  60. return self;}
  61. }),
  62. smalltalk.HTMLCanvas);
  63. smalltalk.addMethod(
  64. '_tag_',
  65. smalltalk.method({
  66. selector: 'tag:',
  67. fn: function (aString){
  68. var self=this;
  69. return smalltalk.send(self['@root'], "_addBrush_", [smalltalk.send(self, "_newTag_", [aString])]);
  70. return self;}
  71. }),
  72. smalltalk.HTMLCanvas);
  73. smalltalk.addMethod(
  74. '_h1',
  75. smalltalk.method({
  76. selector: 'h1',
  77. fn: function (){
  78. var self=this;
  79. return smalltalk.send(self, "_tag_", ["h1"]);
  80. return self;}
  81. }),
  82. smalltalk.HTMLCanvas);
  83. smalltalk.addMethod(
  84. '_h2',
  85. smalltalk.method({
  86. selector: 'h2',
  87. fn: function (){
  88. var self=this;
  89. return smalltalk.send(self, "_tag_", ["h2"]);
  90. return self;}
  91. }),
  92. smalltalk.HTMLCanvas);
  93. smalltalk.addMethod(
  94. '_h3',
  95. smalltalk.method({
  96. selector: 'h3',
  97. fn: function (){
  98. var self=this;
  99. return smalltalk.send(self, "_tag_", ["h3"]);
  100. return self;}
  101. }),
  102. smalltalk.HTMLCanvas);
  103. smalltalk.addMethod(
  104. '_h4',
  105. smalltalk.method({
  106. selector: 'h4',
  107. fn: function (){
  108. var self=this;
  109. return smalltalk.send(self, "_tag_", ["h4"]);
  110. return self;}
  111. }),
  112. smalltalk.HTMLCanvas);
  113. smalltalk.addMethod(
  114. '_h5',
  115. smalltalk.method({
  116. selector: 'h5',
  117. fn: function (){
  118. var self=this;
  119. return smalltalk.send(self, "_tag_", ["h5"]);
  120. return self;}
  121. }),
  122. smalltalk.HTMLCanvas);
  123. smalltalk.addMethod(
  124. '_h6',
  125. smalltalk.method({
  126. selector: 'h6',
  127. fn: function (){
  128. var self=this;
  129. return smalltalk.send(self, "_tag_", ["h6"]);
  130. return self;}
  131. }),
  132. smalltalk.HTMLCanvas);
  133. smalltalk.addMethod(
  134. '_p',
  135. smalltalk.method({
  136. selector: 'p',
  137. fn: function (){
  138. var self=this;
  139. return smalltalk.send(self, "_tag_", ["p"]);
  140. return self;}
  141. }),
  142. smalltalk.HTMLCanvas);
  143. smalltalk.addMethod(
  144. '_div',
  145. smalltalk.method({
  146. selector: 'div',
  147. fn: function (){
  148. var self=this;
  149. return smalltalk.send(self, "_tag_", ["div"]);
  150. return self;}
  151. }),
  152. smalltalk.HTMLCanvas);
  153. smalltalk.addMethod(
  154. '_span',
  155. smalltalk.method({
  156. selector: 'span',
  157. fn: function (){
  158. var self=this;
  159. return smalltalk.send(self, "_tag_", ["span"]);
  160. return self;}
  161. }),
  162. smalltalk.HTMLCanvas);
  163. smalltalk.addMethod(
  164. '_img',
  165. smalltalk.method({
  166. selector: 'img',
  167. fn: function (){
  168. var self=this;
  169. return smalltalk.send(self, "_tag_", ["img"]);
  170. return self;}
  171. }),
  172. smalltalk.HTMLCanvas);
  173. smalltalk.addMethod(
  174. '_ul',
  175. smalltalk.method({
  176. selector: 'ul',
  177. fn: function (){
  178. var self=this;
  179. return smalltalk.send(self, "_tag_", ["ul"]);
  180. return self;}
  181. }),
  182. smalltalk.HTMLCanvas);
  183. smalltalk.addMethod(
  184. '_ol',
  185. smalltalk.method({
  186. selector: 'ol',
  187. fn: function (){
  188. var self=this;
  189. return smalltalk.send(self, "_tag_", ["ol"]);
  190. return self;}
  191. }),
  192. smalltalk.HTMLCanvas);
  193. smalltalk.addMethod(
  194. '_li',
  195. smalltalk.method({
  196. selector: 'li',
  197. fn: function (){
  198. var self=this;
  199. return smalltalk.send(self, "_tag_", ["li"]);
  200. return self;}
  201. }),
  202. smalltalk.HTMLCanvas);
  203. smalltalk.addMethod(
  204. '_table',
  205. smalltalk.method({
  206. selector: 'table',
  207. fn: function (){
  208. var self=this;
  209. return smalltalk.send(self, "_tag_", ["table"]);
  210. return self;}
  211. }),
  212. smalltalk.HTMLCanvas);
  213. smalltalk.addMethod(
  214. '_tr',
  215. smalltalk.method({
  216. selector: 'tr',
  217. fn: function (){
  218. var self=this;
  219. return smalltalk.send(self, "_tag_", ["tr"]);
  220. return self;}
  221. }),
  222. smalltalk.HTMLCanvas);
  223. smalltalk.addMethod(
  224. '_td',
  225. smalltalk.method({
  226. selector: 'td',
  227. fn: function (){
  228. var self=this;
  229. return smalltalk.send(self, "_tag_", ["td"]);
  230. return self;}
  231. }),
  232. smalltalk.HTMLCanvas);
  233. smalltalk.addMethod(
  234. '_th',
  235. smalltalk.method({
  236. selector: 'th',
  237. fn: function (){
  238. var self=this;
  239. return smalltalk.send(self, "_tag_", ["th"]);
  240. return self;}
  241. }),
  242. smalltalk.HTMLCanvas);
  243. smalltalk.addMethod(
  244. '_form',
  245. smalltalk.method({
  246. selector: 'form',
  247. fn: function (){
  248. var self=this;
  249. return smalltalk.send(self, "_tag_", ["form"]);
  250. return self;}
  251. }),
  252. smalltalk.HTMLCanvas);
  253. smalltalk.addMethod(
  254. '_input',
  255. smalltalk.method({
  256. selector: 'input',
  257. fn: function (){
  258. var self=this;
  259. return smalltalk.send(self, "_tag_", ["input"]);
  260. return self;}
  261. }),
  262. smalltalk.HTMLCanvas);
  263. smalltalk.addMethod(
  264. '_button',
  265. smalltalk.method({
  266. selector: 'button',
  267. fn: function (){
  268. var self=this;
  269. return smalltalk.send(self, "_tag_", ["button"]);
  270. return self;}
  271. }),
  272. smalltalk.HTMLCanvas);
  273. smalltalk.addMethod(
  274. '_select',
  275. smalltalk.method({
  276. selector: 'select',
  277. fn: function (){
  278. var self=this;
  279. return smalltalk.send(self, "_tag_", ["select"]);
  280. return self;}
  281. }),
  282. smalltalk.HTMLCanvas);
  283. smalltalk.addMethod(
  284. '_option',
  285. smalltalk.method({
  286. selector: 'option',
  287. fn: function (){
  288. var self=this;
  289. return smalltalk.send(self, "_tag_", ["option"]);
  290. return self;}
  291. }),
  292. smalltalk.HTMLCanvas);
  293. smalltalk.addMethod(
  294. '_textarea',
  295. smalltalk.method({
  296. selector: 'textarea',
  297. fn: function (){
  298. var self=this;
  299. return smalltalk.send(self, "_tag_", ["textarea"]);
  300. return self;}
  301. }),
  302. smalltalk.HTMLCanvas);
  303. smalltalk.addMethod(
  304. '_a',
  305. smalltalk.method({
  306. selector: 'a',
  307. fn: function (){
  308. var self=this;
  309. return smalltalk.send(self, "_tag_", ["a"]);
  310. return self;}
  311. }),
  312. smalltalk.HTMLCanvas);
  313. smalltalk.addMethod(
  314. '_canvas',
  315. smalltalk.method({
  316. selector: 'canvas',
  317. fn: function (){
  318. var self=this;
  319. return smalltalk.send(self, "_tag_", ["canvas"]);
  320. return self;}
  321. }),
  322. smalltalk.HTMLCanvas);
  323. smalltalk.addMethod(
  324. '_pre',
  325. smalltalk.method({
  326. selector: 'pre',
  327. fn: function (){
  328. var self=this;
  329. return smalltalk.send(self, "_tag_", ["pre"]);
  330. return self;}
  331. }),
  332. smalltalk.HTMLCanvas);
  333. smalltalk.addMethod(
  334. '_code',
  335. smalltalk.method({
  336. selector: 'code',
  337. fn: function (){
  338. var self=this;
  339. return smalltalk.send(self, "_tag_", ["code"]);
  340. return self;}
  341. }),
  342. smalltalk.HTMLCanvas);
  343. smalltalk.addMethod(
  344. '_br',
  345. smalltalk.method({
  346. selector: 'br',
  347. fn: function (){
  348. var self=this;
  349. return smalltalk.send(self, "_tag_", ["br"]);
  350. return self;}
  351. }),
  352. smalltalk.HTMLCanvas);
  353. smalltalk.addMethod(
  354. '_script',
  355. smalltalk.method({
  356. selector: 'script',
  357. fn: function (){
  358. var self=this;
  359. return smalltalk.send(self, "_tag_", ["script"]);
  360. return self;}
  361. }),
  362. smalltalk.HTMLCanvas);
  363. smalltalk.addMethod(
  364. '_link',
  365. smalltalk.method({
  366. selector: 'link',
  367. fn: function (){
  368. var self=this;
  369. return smalltalk.send(self, "_tag_", ["link"]);
  370. return self;}
  371. }),
  372. smalltalk.HTMLCanvas);
  373. smalltalk.addMethod(
  374. '_style',
  375. smalltalk.method({
  376. selector: 'style',
  377. fn: function (){
  378. var self=this;
  379. return smalltalk.send(self, "_tag_", ["style"]);
  380. return self;}
  381. }),
  382. smalltalk.HTMLCanvas);
  383. smalltalk.addMethod(
  384. '_p_',
  385. smalltalk.method({
  386. selector: 'p:',
  387. fn: function (anObject){
  388. var self=this;
  389. return smalltalk.send(smalltalk.send(self, "_p", []), "_with_", [anObject]);
  390. return self;}
  391. }),
  392. smalltalk.HTMLCanvas);
  393. smalltalk.addMethod(
  394. '_h1_',
  395. smalltalk.method({
  396. selector: 'h1:',
  397. fn: function (anObject){
  398. var self=this;
  399. return smalltalk.send(smalltalk.send(self, "_h1", []), "_with_", [anObject]);
  400. return self;}
  401. }),
  402. smalltalk.HTMLCanvas);
  403. smalltalk.addMethod(
  404. '_iframe',
  405. smalltalk.method({
  406. selector: 'iframe',
  407. fn: function (){
  408. var self=this;
  409. return smalltalk.send(self, "_tag_", ["iframe"]);
  410. return self;}
  411. }),
  412. smalltalk.HTMLCanvas);
  413. smalltalk.addMethod(
  414. '_iframe_',
  415. smalltalk.method({
  416. selector: 'iframe:',
  417. fn: function (aString){
  418. var self=this;
  419. return smalltalk.send(smalltalk.send(self, "_iframe", []), "_src_", [aString]);
  420. return self;}
  421. }),
  422. smalltalk.HTMLCanvas);
  423. smalltalk.addMethod(
  424. '_h2_',
  425. smalltalk.method({
  426. selector: 'h2:',
  427. fn: function (anObject){
  428. var self=this;
  429. return smalltalk.send(smalltalk.send(self, "_h2", []), "_with_", [anObject]);
  430. return self;}
  431. }),
  432. smalltalk.HTMLCanvas);
  433. smalltalk.addMethod(
  434. '_h3_',
  435. smalltalk.method({
  436. selector: 'h3:',
  437. fn: function (anObject){
  438. var self=this;
  439. return smalltalk.send(smalltalk.send(self, "_h3", []), "_with_", [anObject]);
  440. return self;}
  441. }),
  442. smalltalk.HTMLCanvas);
  443. smalltalk.addMethod(
  444. '_h4_',
  445. smalltalk.method({
  446. selector: 'h4:',
  447. fn: function (anObject){
  448. var self=this;
  449. return smalltalk.send(smalltalk.send(self, "_h4", []), "_with_", [anObject]);
  450. return self;}
  451. }),
  452. smalltalk.HTMLCanvas);
  453. smalltalk.addMethod(
  454. '_h5_',
  455. smalltalk.method({
  456. selector: 'h5:',
  457. fn: function (anObject){
  458. var self=this;
  459. return smalltalk.send(smalltalk.send(self, "_h5", []), "_with_", [anObject]);
  460. return self;}
  461. }),
  462. smalltalk.HTMLCanvas);
  463. smalltalk.addMethod(
  464. '_h6_',
  465. smalltalk.method({
  466. selector: 'h6:',
  467. fn: function (anObject){
  468. var self=this;
  469. return smalltalk.send(smalltalk.send(self, "_h6", []), "_with_", [anObject]);
  470. return self;}
  471. }),
  472. smalltalk.HTMLCanvas);
  473. smalltalk.addMethod(
  474. '_img_',
  475. smalltalk.method({
  476. selector: 'img:',
  477. fn: function (aString){
  478. var self=this;
  479. return smalltalk.send(smalltalk.send(self, "_img", []), "_src_", [aString]);
  480. return self;}
  481. }),
  482. smalltalk.HTMLCanvas);
  483. smalltalk.addMethod(
  484. '_ol_',
  485. smalltalk.method({
  486. selector: 'ol:',
  487. fn: function (anObject){
  488. var self=this;
  489. return smalltalk.send(smalltalk.send(self, "_ol", []), "_with_", [anObject]);
  490. return self;}
  491. }),
  492. smalltalk.HTMLCanvas);
  493. smalltalk.addMethod(
  494. '_li_',
  495. smalltalk.method({
  496. selector: 'li:',
  497. fn: function (anObject){
  498. var self=this;
  499. return smalltalk.send(smalltalk.send(self, "_li", []), "_with_", [anObject]);
  500. return self;}
  501. }),
  502. smalltalk.HTMLCanvas);
  503. smalltalk.addMethod(
  504. '_ul_',
  505. smalltalk.method({
  506. selector: 'ul:',
  507. fn: function (anObject){
  508. var self=this;
  509. return smalltalk.send(smalltalk.send(self, "_ul", []), "_with_", [anObject]);
  510. return self;}
  511. }),
  512. smalltalk.HTMLCanvas);
  513. smalltalk.addMethod(
  514. '_span_',
  515. smalltalk.method({
  516. selector: 'span:',
  517. fn: function (anObject){
  518. var self=this;
  519. return smalltalk.send(smalltalk.send(self, "_span", []), "_with_", [anObject]);
  520. return self;}
  521. }),
  522. smalltalk.HTMLCanvas);
  523. smalltalk.addMethod(
  524. '_style_',
  525. smalltalk.method({
  526. selector: 'style:',
  527. fn: function (aString){
  528. var self=this;
  529. return (function($rec){smalltalk.send($rec, "_with_", [aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_style", []));
  530. return self;}
  531. }),
  532. smalltalk.HTMLCanvas);
  533. smalltalk.addMethod(
  534. '_onJQuery_',
  535. smalltalk.method({
  536. selector: 'onJQuery:',
  537. fn: function (aJQuery){
  538. var self=this;
  539. return (function($rec){smalltalk.send($rec, "_initializeFromJQuery_", [aJQuery]);smalltalk.send($rec, "_initialize", []);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_basicNew", []));
  540. return self;}
  541. }),
  542. smalltalk.HTMLCanvas.klass);
  543. smalltalk.addClass('TagBrush', smalltalk.Object, ['canvas', 'element'], 'Canvas');
  544. smalltalk.addMethod(
  545. '_element',
  546. smalltalk.method({
  547. selector: 'element',
  548. fn: function (){
  549. var self=this;
  550. return self['@element'];
  551. return self;}
  552. }),
  553. smalltalk.TagBrush);
  554. smalltalk.addMethod(
  555. '_contents_',
  556. smalltalk.method({
  557. selector: 'contents:',
  558. fn: function (anObject){
  559. var self=this;
  560. (function($rec){smalltalk.send($rec, "_empty", []);return smalltalk.send($rec, "_append_", [anObject]);})(self);
  561. return self;}
  562. }),
  563. smalltalk.TagBrush);
  564. smalltalk.addMethod(
  565. '_addBrush_',
  566. smalltalk.method({
  567. selector: 'addBrush:',
  568. fn: function (aTagBrush){
  569. var self=this;
  570. smalltalk.send(self, "_appendChild_", [smalltalk.send(aTagBrush, "_element", [])]);
  571. return aTagBrush;
  572. return self;}
  573. }),
  574. smalltalk.TagBrush);
  575. smalltalk.addMethod(
  576. '_with_',
  577. smalltalk.method({
  578. selector: 'with:',
  579. fn: function (anObject){
  580. var self=this;
  581. smalltalk.send(self, "_append_", [anObject]);
  582. return self;}
  583. }),
  584. smalltalk.TagBrush);
  585. smalltalk.addMethod(
  586. '_append_',
  587. smalltalk.method({
  588. selector: 'append:',
  589. fn: function (anObject){
  590. var self=this;
  591. smalltalk.send(anObject, "_appendToBrush_", [self]);
  592. return self;}
  593. }),
  594. smalltalk.TagBrush);
  595. smalltalk.addMethod(
  596. '_appendToBrush_',
  597. smalltalk.method({
  598. selector: 'appendToBrush:',
  599. fn: function (aTagBrush){
  600. var self=this;
  601. smalltalk.send(aTagBrush, "_addBrush_", [self]);
  602. return self;}
  603. }),
  604. smalltalk.TagBrush);
  605. smalltalk.addMethod(
  606. '_appendBlock_',
  607. smalltalk.method({
  608. selector: 'appendBlock:',
  609. fn: function (aBlock){
  610. var self=this;
  611. var root=nil;
  612. root=smalltalk.send(self['@canvas'], "_root", []);
  613. smalltalk.send(self['@canvas'], "_root_", [self]);
  614. smalltalk.send(aBlock, "_value_", [self['@canvas']]);
  615. smalltalk.send(self['@canvas'], "_root_", [root]);
  616. return self;}
  617. }),
  618. smalltalk.TagBrush);
  619. smalltalk.addMethod(
  620. '_appendChild_',
  621. smalltalk.method({
  622. selector: 'appendChild:',
  623. fn: function (anElement){
  624. var self=this;
  625. var element=self['@element'];
  626. if (null == element.canHaveChildren || element.canHaveChildren) {
  627. element.appendChild(anElement);
  628. } else {
  629. element.text = String(element.text) + anElement.innerHTML;
  630. } ;
  631. return self;}
  632. }),
  633. smalltalk.TagBrush);
  634. smalltalk.addMethod(
  635. '_appendString_',
  636. smalltalk.method({
  637. selector: 'appendString:',
  638. fn: function (aString){
  639. var self=this;
  640. smalltalk.send(self, "_appendChild_", [smalltalk.send(self, "_createTextNodeFor_", [aString])]);
  641. return self;}
  642. }),
  643. smalltalk.TagBrush);
  644. smalltalk.addMethod(
  645. '_empty',
  646. smalltalk.method({
  647. selector: 'empty',
  648. fn: function (){
  649. var self=this;
  650. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_empty", []);
  651. return self;}
  652. }),
  653. smalltalk.TagBrush);
  654. smalltalk.addMethod(
  655. '_at_put_',
  656. smalltalk.method({
  657. selector: 'at:put:',
  658. fn: function (aString, aValue){
  659. var self=this;
  660. self['@element'].setAttribute(aString, aValue);
  661. return self;}
  662. }),
  663. smalltalk.TagBrush);
  664. smalltalk.addMethod(
  665. '_removeAt_',
  666. smalltalk.method({
  667. selector: 'removeAt:',
  668. fn: function (aString){
  669. var self=this;
  670. self['@element'].removeAttribute(aString);
  671. return self;}
  672. }),
  673. smalltalk.TagBrush);
  674. smalltalk.addMethod(
  675. '_class_',
  676. smalltalk.method({
  677. selector: 'class:',
  678. fn: function (aString){
  679. var self=this;
  680. smalltalk.send(self, "_at_put_", ["class", aString]);
  681. return self;}
  682. }),
  683. smalltalk.TagBrush);
  684. smalltalk.addMethod(
  685. '_id_',
  686. smalltalk.method({
  687. selector: 'id:',
  688. fn: function (aString){
  689. var self=this;
  690. smalltalk.send(self, "_at_put_", ["id", aString]);
  691. return self;}
  692. }),
  693. smalltalk.TagBrush);
  694. smalltalk.addMethod(
  695. '_src_',
  696. smalltalk.method({
  697. selector: 'src:',
  698. fn: function (aString){
  699. var self=this;
  700. smalltalk.send(self, "_at_put_", ["src", aString]);
  701. return self;}
  702. }),
  703. smalltalk.TagBrush);
  704. smalltalk.addMethod(
  705. '_href_',
  706. smalltalk.method({
  707. selector: 'href:',
  708. fn: function (aString){
  709. var self=this;
  710. smalltalk.send(self, "_at_put_", ["href", aString]);
  711. return self;}
  712. }),
  713. smalltalk.TagBrush);
  714. smalltalk.addMethod(
  715. '_title_',
  716. smalltalk.method({
  717. selector: 'title:',
  718. fn: function (aString){
  719. var self=this;
  720. smalltalk.send(self, "_at_put_", ["title", aString]);
  721. return self;}
  722. }),
  723. smalltalk.TagBrush);
  724. smalltalk.addMethod(
  725. '_style_',
  726. smalltalk.method({
  727. selector: 'style:',
  728. fn: function (aString){
  729. var self=this;
  730. smalltalk.send(self, "_at_put_", ["style", aString]);
  731. return self;}
  732. }),
  733. smalltalk.TagBrush);
  734. smalltalk.addMethod(
  735. '_type_',
  736. smalltalk.method({
  737. selector: 'type:',
  738. fn: function (aString){
  739. var self=this;
  740. smalltalk.send(self, "_at_put_", ["type", aString]);
  741. return self;}
  742. }),
  743. smalltalk.TagBrush);
  744. smalltalk.addMethod(
  745. '_media_',
  746. smalltalk.method({
  747. selector: 'media:',
  748. fn: function (aString){
  749. var self=this;
  750. smalltalk.send(self, "_at_put_", ["media", aString]);
  751. return self;}
  752. }),
  753. smalltalk.TagBrush);
  754. smalltalk.addMethod(
  755. '_rel_',
  756. smalltalk.method({
  757. selector: 'rel:',
  758. fn: function (aString){
  759. var self=this;
  760. smalltalk.send(self, "_at_put_", ["rel", aString]);
  761. return self;}
  762. }),
  763. smalltalk.TagBrush);
  764. smalltalk.addMethod(
  765. '_asJQuery',
  766. smalltalk.method({
  767. selector: 'asJQuery',
  768. fn: function (){
  769. var self=this;
  770. return smalltalk.send((typeof window == 'undefined' ? nil : window), "_jQuery_", [smalltalk.send(self, "_element", [])]);
  771. return self;}
  772. }),
  773. smalltalk.TagBrush);
  774. smalltalk.addMethod(
  775. '_onKeyDown_',
  776. smalltalk.method({
  777. selector: 'onKeyDown:',
  778. fn: function (aBlock){
  779. var self=this;
  780. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keydown", aBlock]);
  781. return self;}
  782. }),
  783. smalltalk.TagBrush);
  784. smalltalk.addMethod(
  785. '_onKeyPress_',
  786. smalltalk.method({
  787. selector: 'onKeyPress:',
  788. fn: function (aBlock){
  789. var self=this;
  790. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keypress", aBlock]);
  791. return self;}
  792. }),
  793. smalltalk.TagBrush);
  794. smalltalk.addMethod(
  795. '_onKeyUp_',
  796. smalltalk.method({
  797. selector: 'onKeyUp:',
  798. fn: function (aBlock){
  799. var self=this;
  800. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keyup", aBlock]);
  801. return self;}
  802. }),
  803. smalltalk.TagBrush);
  804. smalltalk.addMethod(
  805. '_onFocus_',
  806. smalltalk.method({
  807. selector: 'onFocus:',
  808. fn: function (aBlock){
  809. var self=this;
  810. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["focus", aBlock]);
  811. return self;}
  812. }),
  813. smalltalk.TagBrush);
  814. smalltalk.addMethod(
  815. '_onBlur_',
  816. smalltalk.method({
  817. selector: 'onBlur:',
  818. fn: function (aBlock){
  819. var self=this;
  820. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["blur", aBlock]);
  821. return self;}
  822. }),
  823. smalltalk.TagBrush);
  824. smalltalk.addMethod(
  825. '_onChange_',
  826. smalltalk.method({
  827. selector: 'onChange:',
  828. fn: function (aBlock){
  829. var self=this;
  830. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["change", aBlock]);
  831. return self;}
  832. }),
  833. smalltalk.TagBrush);
  834. smalltalk.addMethod(
  835. '_onClick_',
  836. smalltalk.method({
  837. selector: 'onClick:',
  838. fn: function (aBlock){
  839. var self=this;
  840. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["click", aBlock]);
  841. return self;}
  842. }),
  843. smalltalk.TagBrush);
  844. smalltalk.addMethod(
  845. '_initializeFromString_canvas_',
  846. smalltalk.method({
  847. selector: 'initializeFromString:canvas:',
  848. fn: function (aString, aCanvas){
  849. var self=this;
  850. self['@element']=smalltalk.send(self, "_createElementFor_", [aString]);
  851. self['@canvas']=aCanvas;
  852. return self;}
  853. }),
  854. smalltalk.TagBrush);
  855. smalltalk.addMethod(
  856. '_initializeFromJQuery_canvas_',
  857. smalltalk.method({
  858. selector: 'initializeFromJQuery:canvas:',
  859. fn: function (aJQuery, aCanvas){
  860. var self=this;
  861. self['@element']=smalltalk.send(aJQuery, "_get_", [(0)]);
  862. self['@canvas']=aCanvas;
  863. return self;}
  864. }),
  865. smalltalk.TagBrush);
  866. smalltalk.addMethod(
  867. '_createElementFor_',
  868. smalltalk.method({
  869. selector: 'createElementFor:',
  870. fn: function (aString){
  871. var self=this;
  872. return document.createElement(String(aString));
  873. return self;}
  874. }),
  875. smalltalk.TagBrush);
  876. smalltalk.addMethod(
  877. '_createTextNodeFor_',
  878. smalltalk.method({
  879. selector: 'createTextNodeFor:',
  880. fn: function (aString){
  881. var self=this;
  882. return document.createTextNode(String(aString));
  883. return self;}
  884. }),
  885. smalltalk.TagBrush);
  886. smalltalk.addMethod(
  887. '_width_',
  888. smalltalk.method({
  889. selector: 'width:',
  890. fn: function (aString){
  891. var self=this;
  892. smalltalk.send(self, "_at_put_", ["width", aString]);
  893. return self;}
  894. }),
  895. smalltalk.TagBrush);
  896. smalltalk.addMethod(
  897. '_height_',
  898. smalltalk.method({
  899. selector: 'height:',
  900. fn: function (aString){
  901. var self=this;
  902. smalltalk.send(self, "_at_put_", ["height", aString]);
  903. return self;}
  904. }),
  905. smalltalk.TagBrush);
  906. smalltalk.addMethod(
  907. '_value_',
  908. smalltalk.method({
  909. selector: 'value:',
  910. fn: function (aString){
  911. var self=this;
  912. smalltalk.send(self, "_at_put_", ["value", aString]);
  913. return self;}
  914. }),
  915. smalltalk.TagBrush);
  916. smalltalk.addMethod(
  917. '_fromString_canvas_',
  918. smalltalk.method({
  919. selector: 'fromString:canvas:',
  920. fn: function (aString, aCanvas){
  921. var self=this;
  922. return (function($rec){smalltalk.send($rec, "_initializeFromString_canvas_", [aString, aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  923. return self;}
  924. }),
  925. smalltalk.TagBrush.klass);
  926. smalltalk.addMethod(
  927. '_fromJQuery_canvas_',
  928. smalltalk.method({
  929. selector: 'fromJQuery:canvas:',
  930. fn: function (aJQuery, aCanvas){
  931. var self=this;
  932. return (function($rec){smalltalk.send($rec, "_initializeFromJQuery_canvas_", [aJQuery, aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  933. return self;}
  934. }),
  935. smalltalk.TagBrush.klass);
  936. smalltalk.addClass('Widget', smalltalk.Object, [], 'Canvas');
  937. smalltalk.addMethod(
  938. '_appendToBrush_',
  939. smalltalk.method({
  940. selector: 'appendToBrush:',
  941. fn: function (aTagBrush){
  942. var self=this;
  943. smalltalk.send(self, "_appendToJQuery_", [smalltalk.send(aTagBrush, "_asJQuery", [])]);
  944. return self;}
  945. }),
  946. smalltalk.Widget);
  947. smalltalk.addMethod(
  948. '_appendToJQuery_',
  949. smalltalk.method({
  950. selector: 'appendToJQuery:',
  951. fn: function (aJQuery){
  952. var self=this;
  953. smalltalk.send(self, "_renderOn_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
  954. return self;}
  955. }),
  956. smalltalk.Widget);
  957. smalltalk.addMethod(
  958. '_renderOn_',
  959. smalltalk.method({
  960. selector: 'renderOn:',
  961. fn: function (html){
  962. var self=this;
  963. self;
  964. return self;}
  965. }),
  966. smalltalk.Widget);
  967. smalltalk.addMethod(
  968. '_appendToJQuery_',
  969. smalltalk.method({
  970. selector: 'appendToJQuery:',
  971. fn: function (aJQuery){
  972. var self=this;
  973. smalltalk.send(aJQuery, "_append_", [smalltalk.send(self, "_asString", [])]);
  974. return self;}
  975. }),
  976. smalltalk.Object);
  977. smalltalk.addMethod(
  978. '_appendToBrush_',
  979. smalltalk.method({
  980. selector: 'appendToBrush:',
  981. fn: function (aTagBrush){
  982. var self=this;
  983. smalltalk.send(aTagBrush, "_append_", [smalltalk.send(self, "_asString", [])]);
  984. return self;}
  985. }),
  986. smalltalk.Object);
  987. smalltalk.addMethod(
  988. '_appendToJQuery_',
  989. smalltalk.method({
  990. selector: 'appendToJQuery:',
  991. fn: function (aJQuery){
  992. var self=this;
  993. smalltalk.send(self, "_value_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
  994. return self;}
  995. }),
  996. smalltalk.BlockClosure);
  997. smalltalk.addMethod(
  998. '_appendToBrush_',
  999. smalltalk.method({
  1000. selector: 'appendToBrush:',
  1001. fn: function (aTagBrush){
  1002. var self=this;
  1003. smalltalk.send(aTagBrush, "_appendBlock_", [self]);
  1004. return self;}
  1005. }),
  1006. smalltalk.BlockClosure);
  1007. smalltalk.addMethod(
  1008. '_asJQuery',
  1009. smalltalk.method({
  1010. selector: 'asJQuery',
  1011. fn: function (){
  1012. var self=this;
  1013. return jQuery(String(self));
  1014. return self;}
  1015. }),
  1016. smalltalk.String);
  1017. smalltalk.addMethod(
  1018. '_appendToJQuery_',
  1019. smalltalk.method({
  1020. selector: 'appendToJQuery:',
  1021. fn: function (aJQuery){
  1022. var self=this;
  1023. smalltalk.send(aJQuery, "_append_", [self]);
  1024. return self;}
  1025. }),
  1026. smalltalk.String);
  1027. smalltalk.addMethod(
  1028. '_appendToBrush_',
  1029. smalltalk.method({
  1030. selector: 'appendToBrush:',
  1031. fn: function (aTagBrush){
  1032. var self=this;
  1033. smalltalk.send(aTagBrush, "_appendString_", [self]);
  1034. return self;}
  1035. }),
  1036. smalltalk.String);