2
0

Canvas.deploy.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  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. '_onJQuery_',
  515. smalltalk.method({
  516. selector: 'onJQuery:',
  517. fn: function (aJQuery){
  518. var self=this;
  519. return (function($rec){smalltalk.send($rec, "_initializeFromJQuery_", [aJQuery]);smalltalk.send($rec, "_initialize", []);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_basicNew", []));
  520. return self;}
  521. }),
  522. smalltalk.HTMLCanvas.klass);
  523. smalltalk.addClass('TagBrush', smalltalk.Object, ['canvas', 'element'], 'Canvas');
  524. smalltalk.addMethod(
  525. '_element',
  526. smalltalk.method({
  527. selector: 'element',
  528. fn: function (){
  529. var self=this;
  530. return self['@element'];
  531. return self;}
  532. }),
  533. smalltalk.TagBrush);
  534. smalltalk.addMethod(
  535. '_contents_',
  536. smalltalk.method({
  537. selector: 'contents:',
  538. fn: function (anObject){
  539. var self=this;
  540. (function($rec){smalltalk.send($rec, "_empty", []);return smalltalk.send($rec, "_append_", [anObject]);})(self);
  541. return self;}
  542. }),
  543. smalltalk.TagBrush);
  544. smalltalk.addMethod(
  545. '_addBrush_',
  546. smalltalk.method({
  547. selector: 'addBrush:',
  548. fn: function (aTagBrush){
  549. var self=this;
  550. smalltalk.send(self, "_appendChild_", [smalltalk.send(aTagBrush, "_element", [])]);
  551. return aTagBrush;
  552. return self;}
  553. }),
  554. smalltalk.TagBrush);
  555. smalltalk.addMethod(
  556. '_with_',
  557. smalltalk.method({
  558. selector: 'with:',
  559. fn: function (anObject){
  560. var self=this;
  561. smalltalk.send(self, "_append_", [anObject]);
  562. return self;}
  563. }),
  564. smalltalk.TagBrush);
  565. smalltalk.addMethod(
  566. '_append_',
  567. smalltalk.method({
  568. selector: 'append:',
  569. fn: function (anObject){
  570. var self=this;
  571. smalltalk.send(anObject, "_appendToBrush_", [self]);
  572. return self;}
  573. }),
  574. smalltalk.TagBrush);
  575. smalltalk.addMethod(
  576. '_appendToBrush_',
  577. smalltalk.method({
  578. selector: 'appendToBrush:',
  579. fn: function (aTagBrush){
  580. var self=this;
  581. smalltalk.send(aTagBrush, "_addBrush_", [self]);
  582. return self;}
  583. }),
  584. smalltalk.TagBrush);
  585. smalltalk.addMethod(
  586. '_appendBlock_',
  587. smalltalk.method({
  588. selector: 'appendBlock:',
  589. fn: function (aBlock){
  590. var self=this;
  591. var root=nil;
  592. root=smalltalk.send(self['@canvas'], "_root", []);
  593. smalltalk.send(self['@canvas'], "_root_", [self]);
  594. smalltalk.send(aBlock, "_value_", [self['@canvas']]);
  595. smalltalk.send(self['@canvas'], "_root_", [root]);
  596. return self;}
  597. }),
  598. smalltalk.TagBrush);
  599. smalltalk.addMethod(
  600. '_appendChild_',
  601. smalltalk.method({
  602. selector: 'appendChild:',
  603. fn: function (anElement){
  604. var self=this;
  605. var element=self['@element'];
  606. if (null == element.canHaveChildren || element.canHaveChildren) {
  607. element.appendChild(anElement);
  608. } else {
  609. element.text = String(element.text) + anElement.innerHTML;
  610. } ;
  611. return self;}
  612. }),
  613. smalltalk.TagBrush);
  614. smalltalk.addMethod(
  615. '_appendString_',
  616. smalltalk.method({
  617. selector: 'appendString:',
  618. fn: function (aString){
  619. var self=this;
  620. smalltalk.send(self, "_appendChild_", [smalltalk.send(self, "_createTextNodeFor_", [aString])]);
  621. return self;}
  622. }),
  623. smalltalk.TagBrush);
  624. smalltalk.addMethod(
  625. '_empty',
  626. smalltalk.method({
  627. selector: 'empty',
  628. fn: function (){
  629. var self=this;
  630. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_empty", []);
  631. return self;}
  632. }),
  633. smalltalk.TagBrush);
  634. smalltalk.addMethod(
  635. '_at_put_',
  636. smalltalk.method({
  637. selector: 'at:put:',
  638. fn: function (aString, aValue){
  639. var self=this;
  640. self['@element'].setAttribute(aString, aValue);
  641. return self;}
  642. }),
  643. smalltalk.TagBrush);
  644. smalltalk.addMethod(
  645. '_removeAt_',
  646. smalltalk.method({
  647. selector: 'removeAt:',
  648. fn: function (aString){
  649. var self=this;
  650. self['@element'].removeAttribute(aString);
  651. return self;}
  652. }),
  653. smalltalk.TagBrush);
  654. smalltalk.addMethod(
  655. '_class_',
  656. smalltalk.method({
  657. selector: 'class:',
  658. fn: function (aString){
  659. var self=this;
  660. smalltalk.send(self, "_at_put_", ["class", aString]);
  661. return self;}
  662. }),
  663. smalltalk.TagBrush);
  664. smalltalk.addMethod(
  665. '_id_',
  666. smalltalk.method({
  667. selector: 'id:',
  668. fn: function (aString){
  669. var self=this;
  670. smalltalk.send(self, "_at_put_", ["id", aString]);
  671. return self;}
  672. }),
  673. smalltalk.TagBrush);
  674. smalltalk.addMethod(
  675. '_src_',
  676. smalltalk.method({
  677. selector: 'src:',
  678. fn: function (aString){
  679. var self=this;
  680. smalltalk.send(self, "_at_put_", ["src", aString]);
  681. return self;}
  682. }),
  683. smalltalk.TagBrush);
  684. smalltalk.addMethod(
  685. '_href_',
  686. smalltalk.method({
  687. selector: 'href:',
  688. fn: function (aString){
  689. var self=this;
  690. smalltalk.send(self, "_at_put_", ["href", aString]);
  691. return self;}
  692. }),
  693. smalltalk.TagBrush);
  694. smalltalk.addMethod(
  695. '_title_',
  696. smalltalk.method({
  697. selector: 'title:',
  698. fn: function (aString){
  699. var self=this;
  700. smalltalk.send(self, "_at_put_", ["title", aString]);
  701. return self;}
  702. }),
  703. smalltalk.TagBrush);
  704. smalltalk.addMethod(
  705. '_style_',
  706. smalltalk.method({
  707. selector: 'style:',
  708. fn: function (aString){
  709. var self=this;
  710. smalltalk.send(self, "_at_put_", ["style", aString]);
  711. return self;}
  712. }),
  713. smalltalk.TagBrush);
  714. smalltalk.addMethod(
  715. '_type_',
  716. smalltalk.method({
  717. selector: 'type:',
  718. fn: function (aString){
  719. var self=this;
  720. smalltalk.send(self, "_at_put_", ["type", aString]);
  721. return self;}
  722. }),
  723. smalltalk.TagBrush);
  724. smalltalk.addMethod(
  725. '_media_',
  726. smalltalk.method({
  727. selector: 'media:',
  728. fn: function (aString){
  729. var self=this;
  730. smalltalk.send(self, "_at_put_", ["media", aString]);
  731. return self;}
  732. }),
  733. smalltalk.TagBrush);
  734. smalltalk.addMethod(
  735. '_rel_',
  736. smalltalk.method({
  737. selector: 'rel:',
  738. fn: function (aString){
  739. var self=this;
  740. smalltalk.send(self, "_at_put_", ["rel", aString]);
  741. return self;}
  742. }),
  743. smalltalk.TagBrush);
  744. smalltalk.addMethod(
  745. '_asJQuery',
  746. smalltalk.method({
  747. selector: 'asJQuery',
  748. fn: function (){
  749. var self=this;
  750. return smalltalk.send((typeof window == 'undefined' ? nil : window), "_jQuery_", [smalltalk.send(self, "_element", [])]);
  751. return self;}
  752. }),
  753. smalltalk.TagBrush);
  754. smalltalk.addMethod(
  755. '_onKeyDown_',
  756. smalltalk.method({
  757. selector: 'onKeyDown:',
  758. fn: function (aBlock){
  759. var self=this;
  760. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keydown", aBlock]);
  761. return self;}
  762. }),
  763. smalltalk.TagBrush);
  764. smalltalk.addMethod(
  765. '_onKeyPress_',
  766. smalltalk.method({
  767. selector: 'onKeyPress:',
  768. fn: function (aBlock){
  769. var self=this;
  770. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keypress", aBlock]);
  771. return self;}
  772. }),
  773. smalltalk.TagBrush);
  774. smalltalk.addMethod(
  775. '_onKeyUp_',
  776. smalltalk.method({
  777. selector: 'onKeyUp:',
  778. fn: function (aBlock){
  779. var self=this;
  780. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["keyup", aBlock]);
  781. return self;}
  782. }),
  783. smalltalk.TagBrush);
  784. smalltalk.addMethod(
  785. '_onFocus_',
  786. smalltalk.method({
  787. selector: 'onFocus:',
  788. fn: function (aBlock){
  789. var self=this;
  790. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["focus", aBlock]);
  791. return self;}
  792. }),
  793. smalltalk.TagBrush);
  794. smalltalk.addMethod(
  795. '_onBlur_',
  796. smalltalk.method({
  797. selector: 'onBlur:',
  798. fn: function (aBlock){
  799. var self=this;
  800. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["blur", aBlock]);
  801. return self;}
  802. }),
  803. smalltalk.TagBrush);
  804. smalltalk.addMethod(
  805. '_onChange_',
  806. smalltalk.method({
  807. selector: 'onChange:',
  808. fn: function (aBlock){
  809. var self=this;
  810. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["change", aBlock]);
  811. return self;}
  812. }),
  813. smalltalk.TagBrush);
  814. smalltalk.addMethod(
  815. '_onClick_',
  816. smalltalk.method({
  817. selector: 'onClick:',
  818. fn: function (aBlock){
  819. var self=this;
  820. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_bind_do_", ["click", aBlock]);
  821. return self;}
  822. }),
  823. smalltalk.TagBrush);
  824. smalltalk.addMethod(
  825. '_initializeFromString_canvas_',
  826. smalltalk.method({
  827. selector: 'initializeFromString:canvas:',
  828. fn: function (aString, aCanvas){
  829. var self=this;
  830. self['@element']=smalltalk.send(self, "_createElementFor_", [aString]);
  831. self['@canvas']=aCanvas;
  832. return self;}
  833. }),
  834. smalltalk.TagBrush);
  835. smalltalk.addMethod(
  836. '_initializeFromJQuery_canvas_',
  837. smalltalk.method({
  838. selector: 'initializeFromJQuery:canvas:',
  839. fn: function (aJQuery, aCanvas){
  840. var self=this;
  841. self['@element']=smalltalk.send(aJQuery, "_get_", [(0)]);
  842. self['@canvas']=aCanvas;
  843. return self;}
  844. }),
  845. smalltalk.TagBrush);
  846. smalltalk.addMethod(
  847. '_createElementFor_',
  848. smalltalk.method({
  849. selector: 'createElementFor:',
  850. fn: function (aString){
  851. var self=this;
  852. return document.createElement(String(aString));
  853. return self;}
  854. }),
  855. smalltalk.TagBrush);
  856. smalltalk.addMethod(
  857. '_createTextNodeFor_',
  858. smalltalk.method({
  859. selector: 'createTextNodeFor:',
  860. fn: function (aString){
  861. var self=this;
  862. return document.createTextNode(String(aString));
  863. return self;}
  864. }),
  865. smalltalk.TagBrush);
  866. smalltalk.addMethod(
  867. '_width_',
  868. smalltalk.method({
  869. selector: 'width:',
  870. fn: function (aString){
  871. var self=this;
  872. smalltalk.send(self, "_at_put_", ["width", aString]);
  873. return self;}
  874. }),
  875. smalltalk.TagBrush);
  876. smalltalk.addMethod(
  877. '_height_',
  878. smalltalk.method({
  879. selector: 'height:',
  880. fn: function (aString){
  881. var self=this;
  882. smalltalk.send(self, "_at_put_", ["height", aString]);
  883. return self;}
  884. }),
  885. smalltalk.TagBrush);
  886. smalltalk.addMethod(
  887. '_fromString_canvas_',
  888. smalltalk.method({
  889. selector: 'fromString:canvas:',
  890. fn: function (aString, aCanvas){
  891. var self=this;
  892. return (function($rec){smalltalk.send($rec, "_initializeFromString_canvas_", [aString, aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  893. return self;}
  894. }),
  895. smalltalk.TagBrush.klass);
  896. smalltalk.addMethod(
  897. '_fromJQuery_canvas_',
  898. smalltalk.method({
  899. selector: 'fromJQuery:canvas:',
  900. fn: function (aJQuery, aCanvas){
  901. var self=this;
  902. return (function($rec){smalltalk.send($rec, "_initializeFromJQuery_canvas_", [aJQuery, aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  903. return self;}
  904. }),
  905. smalltalk.TagBrush.klass);
  906. smalltalk.addClass('Widget', smalltalk.Object, [], 'Canvas');
  907. smalltalk.addMethod(
  908. '_alert_',
  909. smalltalk.method({
  910. selector: 'alert:',
  911. fn: function (aString){
  912. var self=this;
  913. alert(aString);
  914. return self;}
  915. }),
  916. smalltalk.Widget);
  917. smalltalk.addMethod(
  918. '_confirm_',
  919. smalltalk.method({
  920. selector: 'confirm:',
  921. fn: function (aString){
  922. var self=this;
  923. return window.confirm(aString);
  924. return self;}
  925. }),
  926. smalltalk.Widget);
  927. smalltalk.addMethod(
  928. '_prompt_',
  929. smalltalk.method({
  930. selector: 'prompt:',
  931. fn: function (aString){
  932. var self=this;
  933. return smalltalk.send(self, "_prompt_default_", [aString, ""]);
  934. return self;}
  935. }),
  936. smalltalk.Widget);
  937. smalltalk.addMethod(
  938. '_prompt_default_',
  939. smalltalk.method({
  940. selector: 'prompt:default:',
  941. fn: function (aString, anotherString){
  942. var self=this;
  943. return window.prompt(aString, anotherString);
  944. return self;}
  945. }),
  946. smalltalk.Widget);
  947. smalltalk.addMethod(
  948. '_appendToBrush_',
  949. smalltalk.method({
  950. selector: 'appendToBrush:',
  951. fn: function (aTagBrush){
  952. var self=this;
  953. smalltalk.send(self, "_appendToJQuery_", [smalltalk.send(aTagBrush, "_asJQuery", [])]);
  954. return self;}
  955. }),
  956. smalltalk.Widget);
  957. smalltalk.addMethod(
  958. '_appendToJQuery_',
  959. smalltalk.method({
  960. selector: 'appendToJQuery:',
  961. fn: function (aJQuery){
  962. var self=this;
  963. smalltalk.send(self, "_renderOn_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
  964. return self;}
  965. }),
  966. smalltalk.Widget);
  967. smalltalk.addMethod(
  968. '_renderOn_',
  969. smalltalk.method({
  970. selector: 'renderOn:',
  971. fn: function (html){
  972. var self=this;
  973. self;
  974. return self;}
  975. }),
  976. smalltalk.Widget);
  977. smalltalk.addMethod(
  978. '_appendToJQuery_',
  979. smalltalk.method({
  980. selector: 'appendToJQuery:',
  981. fn: function (aJQuery){
  982. var self=this;
  983. smalltalk.send(aJQuery, "_append_", [smalltalk.send(self, "_asString", [])]);
  984. return self;}
  985. }),
  986. smalltalk.Object);
  987. smalltalk.addMethod(
  988. '_appendToBrush_',
  989. smalltalk.method({
  990. selector: 'appendToBrush:',
  991. fn: function (aTagBrush){
  992. var self=this;
  993. smalltalk.send(aTagBrush, "_append_", [smalltalk.send(self, "_asString", [])]);
  994. return self;}
  995. }),
  996. smalltalk.Object);
  997. smalltalk.addMethod(
  998. '_appendToJQuery_',
  999. smalltalk.method({
  1000. selector: 'appendToJQuery:',
  1001. fn: function (aJQuery){
  1002. var self=this;
  1003. smalltalk.send(self, "_value_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
  1004. return self;}
  1005. }),
  1006. smalltalk.BlockClosure);
  1007. smalltalk.addMethod(
  1008. '_appendToBrush_',
  1009. smalltalk.method({
  1010. selector: 'appendToBrush:',
  1011. fn: function (aTagBrush){
  1012. var self=this;
  1013. smalltalk.send(aTagBrush, "_appendBlock_", [self]);
  1014. return self;}
  1015. }),
  1016. smalltalk.BlockClosure);
  1017. smalltalk.addMethod(
  1018. '_asJQuery',
  1019. smalltalk.method({
  1020. selector: 'asJQuery',
  1021. fn: function (){
  1022. var self=this;
  1023. return jQuery(String(self));
  1024. return self;}
  1025. }),
  1026. smalltalk.String);
  1027. smalltalk.addMethod(
  1028. '_appendToJQuery_',
  1029. smalltalk.method({
  1030. selector: 'appendToJQuery:',
  1031. fn: function (aJQuery){
  1032. var self=this;
  1033. smalltalk.send(aJQuery, "_append_", [self]);
  1034. return self;}
  1035. }),
  1036. smalltalk.String);
  1037. smalltalk.addMethod(
  1038. '_appendToBrush_',
  1039. smalltalk.method({
  1040. selector: 'appendToBrush:',
  1041. fn: function (aTagBrush){
  1042. var self=this;
  1043. smalltalk.send(aTagBrush, "_appendString_", [self]);
  1044. return self;}
  1045. }),
  1046. smalltalk.String);