2
0

Canvas.deploy.js 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304
  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['@root'], "_addBrush_", [smalltalk.send((smalltalk.StyleTag || StyleTag), "_canvas_", [self])]);
  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.addClass('StyleTag', smalltalk.TagBrush, ['canvas', 'element'], 'Canvas');
  1079. smalltalk.addMethod(
  1080. '_with_',
  1081. smalltalk.method({
  1082. selector: 'with:',
  1083. fn: function (aString){
  1084. var self=this;
  1085. ((($receiver = smalltalk.send(self, "_isBrowserIE", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_element", []), "_styleSheet", []), "_cssText_", [aString]);})() : (function(){return smalltalk.send(self, "_with_", [aString], smalltalk.TagBrush);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_element", []), "_styleSheet", []), "_cssText_", [aString]);}), (function(){return smalltalk.send(self, "_with_", [aString], smalltalk.TagBrush);})]));
  1086. return self;}
  1087. }),
  1088. smalltalk.StyleTag);
  1089. smalltalk.addMethod(
  1090. '_isBrowserIE',
  1091. smalltalk.method({
  1092. selector: 'isBrowserIE',
  1093. fn: function (){
  1094. var self=this;
  1095. var ie=nil;
  1096. (ie=jQuery.browser.msie);
  1097. return smalltalk.send(ie, "_notNil", []);
  1098. return self;}
  1099. }),
  1100. smalltalk.StyleTag);
  1101. smalltalk.addMethod(
  1102. '_canvas_',
  1103. smalltalk.method({
  1104. selector: 'canvas:',
  1105. fn: function (aCanvas){
  1106. var self=this;
  1107. return (function($rec){smalltalk.send($rec, "_initializeFromString_canvas_", ["style", aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  1108. return self;}
  1109. }),
  1110. smalltalk.StyleTag.klass);
  1111. smalltalk.addMethod(
  1112. '_appendToJQuery_',
  1113. smalltalk.method({
  1114. selector: 'appendToJQuery:',
  1115. fn: function (aJQuery){
  1116. var self=this;
  1117. smalltalk.send(aJQuery, "_append_", [smalltalk.send(self, "_asString", [])]);
  1118. return self;}
  1119. }),
  1120. smalltalk.Object);
  1121. smalltalk.addMethod(
  1122. '_appendToBrush_',
  1123. smalltalk.method({
  1124. selector: 'appendToBrush:',
  1125. fn: function (aTagBrush){
  1126. var self=this;
  1127. smalltalk.send(aTagBrush, "_append_", [smalltalk.send(self, "_asString", [])]);
  1128. return self;}
  1129. }),
  1130. smalltalk.Object);
  1131. smalltalk.addMethod(
  1132. '_appendToJQuery_',
  1133. smalltalk.method({
  1134. selector: 'appendToJQuery:',
  1135. fn: function (aJQuery){
  1136. var self=this;
  1137. smalltalk.send(self, "_value_", [smalltalk.send((smalltalk.HTMLCanvas || HTMLCanvas), "_onJQuery_", [aJQuery])]);
  1138. return self;}
  1139. }),
  1140. smalltalk.BlockClosure);
  1141. smalltalk.addMethod(
  1142. '_appendToBrush_',
  1143. smalltalk.method({
  1144. selector: 'appendToBrush:',
  1145. fn: function (aTagBrush){
  1146. var self=this;
  1147. smalltalk.send(aTagBrush, "_appendBlock_", [self]);
  1148. return self;}
  1149. }),
  1150. smalltalk.BlockClosure);
  1151. smalltalk.addMethod(
  1152. '_asJQuery',
  1153. smalltalk.method({
  1154. selector: 'asJQuery',
  1155. fn: function (){
  1156. var self=this;
  1157. return jQuery(String(self));
  1158. return self;}
  1159. }),
  1160. smalltalk.String);
  1161. smalltalk.addMethod(
  1162. '_appendToJQuery_',
  1163. smalltalk.method({
  1164. selector: 'appendToJQuery:',
  1165. fn: function (aJQuery){
  1166. var self=this;
  1167. smalltalk.send(aJQuery, "_append_", [self]);
  1168. return self;}
  1169. }),
  1170. smalltalk.String);
  1171. smalltalk.addMethod(
  1172. '_appendToBrush_',
  1173. smalltalk.method({
  1174. selector: 'appendToBrush:',
  1175. fn: function (aTagBrush){
  1176. var self=this;
  1177. smalltalk.send(aTagBrush, "_appendString_", [self]);
  1178. return self;}
  1179. }),
  1180. smalltalk.String);