Canvas.deploy.js 23 KB

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