2
0

Canvas.deploy.js 25 KB

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