2
0

Canvas.js 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464
  1. smalltalk.addClass('CanvasRenderingContext', smalltalk.Object, [], 'Canvas');
  2. smalltalk.addMethod(
  3. '_fillStyle_',
  4. smalltalk.method({
  5. selector: 'fillStyle:',
  6. category: 'drawing paths',
  7. fn: function (aString){
  8. var self=this;
  9. self.fillStyle = String(aString);
  10. return self;},
  11. source: unescape('fillStyle%3A%20aString%0A%09%3Cself.fillStyle%20%3D%20String%28aString%29%3E'),
  12. messageSends: [],
  13. referencedClasses: []
  14. }),
  15. smalltalk.CanvasRenderingContext);
  16. smalltalk.addMethod(
  17. '_beginPath',
  18. smalltalk.method({
  19. selector: 'beginPath',
  20. category: 'drawing paths',
  21. fn: function (){
  22. var self=this;
  23. self.beginPath();
  24. return self;},
  25. source: unescape('beginPath%0A%09%3Cself.beginPath%28%29%3E'),
  26. messageSends: [],
  27. referencedClasses: []
  28. }),
  29. smalltalk.CanvasRenderingContext);
  30. smalltalk.addMethod(
  31. '_closePath',
  32. smalltalk.method({
  33. selector: 'closePath',
  34. category: 'drawing paths',
  35. fn: function (){
  36. var self=this;
  37. self.closePath();
  38. return self;},
  39. source: unescape('closePath%0A%09%3Cself.closePath%28%29%3E'),
  40. messageSends: [],
  41. referencedClasses: []
  42. }),
  43. smalltalk.CanvasRenderingContext);
  44. smalltalk.addMethod(
  45. '_fill',
  46. smalltalk.method({
  47. selector: 'fill',
  48. category: 'drawing paths',
  49. fn: function (){
  50. var self=this;
  51. self.fill();
  52. return self;},
  53. source: unescape('fill%0A%09%3Cself.fill%28%29%3E'),
  54. messageSends: [],
  55. referencedClasses: []
  56. }),
  57. smalltalk.CanvasRenderingContext);
  58. smalltalk.addMethod(
  59. '_stroke',
  60. smalltalk.method({
  61. selector: 'stroke',
  62. category: 'drawing paths',
  63. fn: function (){
  64. var self=this;
  65. self.stroke();
  66. return self;},
  67. source: unescape('stroke%0A%09%3Cself.stroke%28%29%3E'),
  68. messageSends: [],
  69. referencedClasses: []
  70. }),
  71. smalltalk.CanvasRenderingContext);
  72. smalltalk.addMethod(
  73. '_moveTo_',
  74. smalltalk.method({
  75. selector: 'moveTo:',
  76. category: 'drawing paths',
  77. fn: function (aPoint){
  78. var self=this;
  79. self.moveTo(aPoint._x(), aPoint._y());
  80. return self;},
  81. source: unescape('moveTo%3A%20aPoint%0A%09%3Cself.moveTo%28aPoint._x%28%29%2C%20aPoint._y%28%29%29%3E'),
  82. messageSends: [],
  83. referencedClasses: []
  84. }),
  85. smalltalk.CanvasRenderingContext);
  86. smalltalk.addMethod(
  87. '_lineTo_',
  88. smalltalk.method({
  89. selector: 'lineTo:',
  90. category: 'drawing paths',
  91. fn: function (aPoint){
  92. var self=this;
  93. self.lineTo(aPoint._x(), aPoint._y());
  94. return self;},
  95. source: unescape('lineTo%3A%20aPoint%0A%09%3Cself.lineTo%28aPoint._x%28%29%2C%20aPoint._y%28%29%29%3E'),
  96. messageSends: [],
  97. referencedClasses: []
  98. }),
  99. smalltalk.CanvasRenderingContext);
  100. smalltalk.addMethod(
  101. '_arcTo_radius_startAngle_endAngle_anticlockwise_',
  102. smalltalk.method({
  103. selector: 'arcTo:radius:startAngle:endAngle:anticlockwise:',
  104. category: 'drawing arcs',
  105. fn: function (aPoint, aNumber, aNumber2, aNumber3, aBoolean){
  106. var self=this;
  107. self.arc(aPoint._x(), aPoint._y(), aNumber, aNumber2, aNumber3, aBoolean);
  108. return self;},
  109. source: unescape('arcTo%3A%20aPoint%20radius%3A%20aNumber%20startAngle%3A%20aNumber2%20endAngle%3A%20aNumber3%20anticlockwise%3A%20aBoolean%0A%09%3Cself.arc%28aPoint._x%28%29%2C%20aPoint._y%28%29%2C%20aNumber%2C%20aNumber2%2C%20aNumber3%2C%20aBoolean%29%3E'),
  110. messageSends: [],
  111. referencedClasses: []
  112. }),
  113. smalltalk.CanvasRenderingContext);
  114. smalltalk.addMethod(
  115. '_arcTo_radius_',
  116. smalltalk.method({
  117. selector: 'arcTo:radius:',
  118. category: 'drawing arcs',
  119. fn: function (aPoint, aNumber){
  120. var self=this;
  121. smalltalk.send(self, "_arcTo_radius_startAngle_endAngle_anticlockwise_", [aPoint, aNumber, (0), smalltalk.send(smalltalk.send(smalltalk.Number, "_pi", []), "__star", [(2)]), false]);
  122. return self;},
  123. source: unescape('arcTo%3A%20aPoint%20radius%3A%20aNumber%0A%09self%20arcTo%3A%20aPoint%20radius%3A%20aNumber%20startAngle%3A%200%20endAngle%3A%20Number%20pi%20*%202%20anticlockwise%3A%20false'),
  124. messageSends: ["arcTo:radius:startAngle:endAngle:anticlockwise:", unescape("*"), "pi"],
  125. referencedClasses: [smalltalk.Number]
  126. }),
  127. smalltalk.CanvasRenderingContext);
  128. smalltalk.addMethod(
  129. '_fillRectFrom_to_',
  130. smalltalk.method({
  131. selector: 'fillRectFrom:to:',
  132. category: 'drawing rectangles',
  133. fn: function (aPoint, anotherPoint){
  134. var self=this;
  135. self.fillRect(aPoint._x(), aPoint._y(), anotherPoint._x(), anotherPoint._y());
  136. return self;},
  137. source: unescape('fillRectFrom%3A%20aPoint%20to%3A%20anotherPoint%0A%09%3Cself.fillRect%28aPoint._x%28%29%2C%20aPoint._y%28%29%2C%20anotherPoint._x%28%29%2C%20anotherPoint._y%28%29%29%3E'),
  138. messageSends: [],
  139. referencedClasses: []
  140. }),
  141. smalltalk.CanvasRenderingContext);
  142. smalltalk.addMethod(
  143. '_strokeRectFrom_to_',
  144. smalltalk.method({
  145. selector: 'strokeRectFrom:to:',
  146. category: 'drawing rectangles',
  147. fn: function (aPoint, anotherPoint){
  148. var self=this;
  149. self.strokeRect(aPoint._x(), aPoint._y(), anotherPoint._x(), anotherPoint._y());
  150. return self;},
  151. source: unescape('strokeRectFrom%3A%20aPoint%20to%3A%20anotherPoint%0A%09%3Cself.strokeRect%28aPoint._x%28%29%2C%20aPoint._y%28%29%2C%20anotherPoint._x%28%29%2C%20anotherPoint._y%28%29%29%3E'),
  152. messageSends: [],
  153. referencedClasses: []
  154. }),
  155. smalltalk.CanvasRenderingContext);
  156. smalltalk.addMethod(
  157. '_clearRectFrom_to_',
  158. smalltalk.method({
  159. selector: 'clearRectFrom:to:',
  160. category: 'drawing rectangles',
  161. fn: function (aPoint, anotherPoint){
  162. var self=this;
  163. self.fillRect(aPoint._x(), aPoint._y(), anotherPoint._x(), anotherPoint._y());
  164. return self;},
  165. source: unescape('clearRectFrom%3A%20aPoint%20to%3A%20anotherPoint%0A%09%3Cself.fillRect%28aPoint._x%28%29%2C%20aPoint._y%28%29%2C%20anotherPoint._x%28%29%2C%20anotherPoint._y%28%29%29%3E'),
  166. messageSends: [],
  167. referencedClasses: []
  168. }),
  169. smalltalk.CanvasRenderingContext);
  170. smalltalk.addMethod(
  171. '_strokeStyle_',
  172. smalltalk.method({
  173. selector: 'strokeStyle:',
  174. category: 'drawing paths',
  175. fn: function (aString){
  176. var self=this;
  177. self.strokeStyle = String(aString);
  178. return self;},
  179. source: unescape('strokeStyle%3A%20aString%0A%09%3Cself.strokeStyle%20%3D%20String%28aString%29%3E'),
  180. messageSends: [],
  181. referencedClasses: []
  182. }),
  183. smalltalk.CanvasRenderingContext);
  184. smalltalk.addMethod(
  185. '_lineWidth_',
  186. smalltalk.method({
  187. selector: 'lineWidth:',
  188. category: 'drawing paths',
  189. fn: function (aNumber){
  190. var self=this;
  191. self.lineWidth = aNumber;
  192. return self;},
  193. source: unescape('lineWidth%3A%20aNumber%0A%09%3Cself.lineWidth%20%3D%20aNumber%3E'),
  194. messageSends: [],
  195. referencedClasses: []
  196. }),
  197. smalltalk.CanvasRenderingContext);
  198. smalltalk.addMethod(
  199. '_tagBrush_',
  200. smalltalk.method({
  201. selector: 'tagBrush:',
  202. category: 'instance creation',
  203. fn: function (aTagBrush){
  204. var self=this;
  205. return aTagBrush._element().getContext('2d');
  206. return self;},
  207. source: unescape('tagBrush%3A%20aTagBrush%0A%09%3Creturn%20aTagBrush._element%28%29.getContext%28%272d%27%29%3E'),
  208. messageSends: [],
  209. referencedClasses: []
  210. }),
  211. smalltalk.CanvasRenderingContext.klass);
  212. smalltalk.addClass('HTMLCanvas', smalltalk.Object, ['root'], 'Canvas');
  213. smalltalk.addMethod(
  214. '_root_',
  215. smalltalk.method({
  216. selector: 'root:',
  217. category: 'accessing',
  218. fn: function (aTagBrush){
  219. var self=this;
  220. self['@root']=aTagBrush;
  221. return self;},
  222. source: unescape('root%3A%20aTagBrush%0A%20%20%20%20root%20%3A%3D%20aTagBrush'),
  223. messageSends: [],
  224. referencedClasses: []
  225. }),
  226. smalltalk.HTMLCanvas);
  227. smalltalk.addMethod(
  228. '_root',
  229. smalltalk.method({
  230. selector: 'root',
  231. category: 'accessing',
  232. fn: function (){
  233. var self=this;
  234. return self['@root'];
  235. return self;},
  236. source: unescape('root%0A%20%20%20%20%5Eroot'),
  237. messageSends: [],
  238. referencedClasses: []
  239. }),
  240. smalltalk.HTMLCanvas);
  241. smalltalk.addMethod(
  242. '_initialize',
  243. smalltalk.method({
  244. selector: 'initialize',
  245. category: 'initialization',
  246. fn: function (){
  247. var self=this;
  248. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  249. smalltalk.send(self['@root'], "_ifNil_", [(function(){return self['@root']=smalltalk.send(smalltalk.TagBrush, "_fromString_canvas_", ["div", self]);})]);
  250. return self;},
  251. source: unescape('initialize%0A%20%20%20%20super%20initialize.%0A%20%20%20%20root%20ifNil%3A%20%5Broot%20%3A%3D%20TagBrush%20fromString%3A%20%27div%27%20canvas%3A%20self%5D'),
  252. messageSends: ["initialize", "ifNil:", "fromString:canvas:"],
  253. referencedClasses: [smalltalk.nil]
  254. }),
  255. smalltalk.HTMLCanvas);
  256. smalltalk.addMethod(
  257. '_with_',
  258. smalltalk.method({
  259. selector: 'with:',
  260. category: 'adding',
  261. fn: function (anObject){
  262. var self=this;
  263. return smalltalk.send(smalltalk.send(self, "_root", []), "_with_", [anObject]);
  264. return self;},
  265. source: unescape('with%3A%20anObject%0A%20%20%20%20%5Eself%20root%20with%3A%20anObject'),
  266. messageSends: ["with:", "root"],
  267. referencedClasses: []
  268. }),
  269. smalltalk.HTMLCanvas);
  270. smalltalk.addMethod(
  271. '_newTag_',
  272. smalltalk.method({
  273. selector: 'newTag:',
  274. category: 'tags',
  275. fn: function (aString){
  276. var self=this;
  277. return smalltalk.send(smalltalk.TagBrush, "_fromString_canvas_", [aString, self]);
  278. return self;},
  279. source: unescape('newTag%3A%20aString%0A%20%20%20%20%5ETagBrush%20fromString%3A%20aString%20canvas%3A%20self'),
  280. messageSends: ["fromString:canvas:"],
  281. referencedClasses: [smalltalk.nil]
  282. }),
  283. smalltalk.HTMLCanvas);
  284. smalltalk.addMethod(
  285. '_tag_',
  286. smalltalk.method({
  287. selector: 'tag:',
  288. category: 'tags',
  289. fn: function (aString){
  290. var self=this;
  291. return smalltalk.send(self['@root'], "_addBrush_", [smalltalk.send(self, "_newTag_", [aString])]);
  292. return self;},
  293. source: unescape('tag%3A%20aString%0A%20%20%20%20%5Eroot%20addBrush%3A%20%28self%20newTag%3A%20aString%29'),
  294. messageSends: ["addBrush:", "newTag:"],
  295. referencedClasses: []
  296. }),
  297. smalltalk.HTMLCanvas);
  298. smalltalk.addMethod(
  299. '_h1',
  300. smalltalk.method({
  301. selector: 'h1',
  302. category: 'tags',
  303. fn: function (){
  304. var self=this;
  305. return smalltalk.send(self, "_tag_", ["h1"]);
  306. return self;},
  307. source: unescape('h1%0A%20%20%20%20%5Eself%20tag%3A%20%27h1%27'),
  308. messageSends: ["tag:"],
  309. referencedClasses: []
  310. }),
  311. smalltalk.HTMLCanvas);
  312. smalltalk.addMethod(
  313. '_h2',
  314. smalltalk.method({
  315. selector: 'h2',
  316. category: 'tags',
  317. fn: function (){
  318. var self=this;
  319. return smalltalk.send(self, "_tag_", ["h2"]);
  320. return self;},
  321. source: unescape('h2%0A%20%20%20%20%5Eself%20tag%3A%20%27h2%27'),
  322. messageSends: ["tag:"],
  323. referencedClasses: []
  324. }),
  325. smalltalk.HTMLCanvas);
  326. smalltalk.addMethod(
  327. '_h3',
  328. smalltalk.method({
  329. selector: 'h3',
  330. category: 'tags',
  331. fn: function (){
  332. var self=this;
  333. return smalltalk.send(self, "_tag_", ["h3"]);
  334. return self;},
  335. source: unescape('h3%0A%20%20%20%20%5Eself%20tag%3A%20%27h3%27'),
  336. messageSends: ["tag:"],
  337. referencedClasses: []
  338. }),
  339. smalltalk.HTMLCanvas);
  340. smalltalk.addMethod(
  341. '_h4',
  342. smalltalk.method({
  343. selector: 'h4',
  344. category: 'tags',
  345. fn: function (){
  346. var self=this;
  347. return smalltalk.send(self, "_tag_", ["h4"]);
  348. return self;},
  349. source: unescape('h4%0A%20%20%20%20%5Eself%20tag%3A%20%27h4%27'),
  350. messageSends: ["tag:"],
  351. referencedClasses: []
  352. }),
  353. smalltalk.HTMLCanvas);
  354. smalltalk.addMethod(
  355. '_h5',
  356. smalltalk.method({
  357. selector: 'h5',
  358. category: 'tags',
  359. fn: function (){
  360. var self=this;
  361. return smalltalk.send(self, "_tag_", ["h5"]);
  362. return self;},
  363. source: unescape('h5%0A%20%20%20%20%5Eself%20tag%3A%20%27h5%27'),
  364. messageSends: ["tag:"],
  365. referencedClasses: []
  366. }),
  367. smalltalk.HTMLCanvas);
  368. smalltalk.addMethod(
  369. '_h6',
  370. smalltalk.method({
  371. selector: 'h6',
  372. category: 'tags',
  373. fn: function (){
  374. var self=this;
  375. return smalltalk.send(self, "_tag_", ["h6"]);
  376. return self;},
  377. source: unescape('h6%0A%20%20%20%20%5Eself%20tag%3A%20%27h6%27'),
  378. messageSends: ["tag:"],
  379. referencedClasses: []
  380. }),
  381. smalltalk.HTMLCanvas);
  382. smalltalk.addMethod(
  383. '_p',
  384. smalltalk.method({
  385. selector: 'p',
  386. category: 'tags',
  387. fn: function (){
  388. var self=this;
  389. return smalltalk.send(self, "_tag_", ["p"]);
  390. return self;},
  391. source: unescape('p%0A%20%20%20%20%5Eself%20tag%3A%20%27p%27'),
  392. messageSends: ["tag:"],
  393. referencedClasses: []
  394. }),
  395. smalltalk.HTMLCanvas);
  396. smalltalk.addMethod(
  397. '_div',
  398. smalltalk.method({
  399. selector: 'div',
  400. category: 'tags',
  401. fn: function (){
  402. var self=this;
  403. return smalltalk.send(self, "_tag_", ["div"]);
  404. return self;},
  405. source: unescape('div%0A%20%20%20%20%5Eself%20tag%3A%20%27div%27'),
  406. messageSends: ["tag:"],
  407. referencedClasses: []
  408. }),
  409. smalltalk.HTMLCanvas);
  410. smalltalk.addMethod(
  411. '_span',
  412. smalltalk.method({
  413. selector: 'span',
  414. category: 'tags',
  415. fn: function (){
  416. var self=this;
  417. return smalltalk.send(self, "_tag_", ["span"]);
  418. return self;},
  419. source: unescape('span%0A%20%20%20%20%5Eself%20tag%3A%20%27span%27'),
  420. messageSends: ["tag:"],
  421. referencedClasses: []
  422. }),
  423. smalltalk.HTMLCanvas);
  424. smalltalk.addMethod(
  425. '_img',
  426. smalltalk.method({
  427. selector: 'img',
  428. category: 'tags',
  429. fn: function (){
  430. var self=this;
  431. return smalltalk.send(self, "_tag_", ["img"]);
  432. return self;},
  433. source: unescape('img%0A%20%20%20%20%5Eself%20tag%3A%20%27img%27'),
  434. messageSends: ["tag:"],
  435. referencedClasses: []
  436. }),
  437. smalltalk.HTMLCanvas);
  438. smalltalk.addMethod(
  439. '_ul',
  440. smalltalk.method({
  441. selector: 'ul',
  442. category: 'tags',
  443. fn: function (){
  444. var self=this;
  445. return smalltalk.send(self, "_tag_", ["ul"]);
  446. return self;},
  447. source: unescape('ul%0A%20%20%20%20%5Eself%20tag%3A%20%27ul%27'),
  448. messageSends: ["tag:"],
  449. referencedClasses: []
  450. }),
  451. smalltalk.HTMLCanvas);
  452. smalltalk.addMethod(
  453. '_ol',
  454. smalltalk.method({
  455. selector: 'ol',
  456. category: 'tags',
  457. fn: function (){
  458. var self=this;
  459. return smalltalk.send(self, "_tag_", ["ol"]);
  460. return self;},
  461. source: unescape('ol%0A%20%20%20%20%5Eself%20tag%3A%20%27ol%27'),
  462. messageSends: ["tag:"],
  463. referencedClasses: []
  464. }),
  465. smalltalk.HTMLCanvas);
  466. smalltalk.addMethod(
  467. '_li',
  468. smalltalk.method({
  469. selector: 'li',
  470. category: 'tags',
  471. fn: function (){
  472. var self=this;
  473. return smalltalk.send(self, "_tag_", ["li"]);
  474. return self;},
  475. source: unescape('li%0A%20%20%20%20%5Eself%20tag%3A%20%27li%27'),
  476. messageSends: ["tag:"],
  477. referencedClasses: []
  478. }),
  479. smalltalk.HTMLCanvas);
  480. smalltalk.addMethod(
  481. '_table',
  482. smalltalk.method({
  483. selector: 'table',
  484. category: 'tags',
  485. fn: function (){
  486. var self=this;
  487. return smalltalk.send(self, "_tag_", ["table"]);
  488. return self;},
  489. source: unescape('table%0A%20%20%20%20%5Eself%20tag%3A%20%27table%27'),
  490. messageSends: ["tag:"],
  491. referencedClasses: []
  492. }),
  493. smalltalk.HTMLCanvas);
  494. smalltalk.addMethod(
  495. '_tr',
  496. smalltalk.method({
  497. selector: 'tr',
  498. category: 'tags',
  499. fn: function (){
  500. var self=this;
  501. return smalltalk.send(self, "_tag_", ["tr"]);
  502. return self;},
  503. source: unescape('tr%0A%20%20%20%20%5Eself%20tag%3A%20%27tr%27'),
  504. messageSends: ["tag:"],
  505. referencedClasses: []
  506. }),
  507. smalltalk.HTMLCanvas);
  508. smalltalk.addMethod(
  509. '_td',
  510. smalltalk.method({
  511. selector: 'td',
  512. category: 'tags',
  513. fn: function (){
  514. var self=this;
  515. return smalltalk.send(self, "_tag_", ["td"]);
  516. return self;},
  517. source: unescape('td%20%0A%20%20%20%20%5Eself%20tag%3A%20%27td%27'),
  518. messageSends: ["tag:"],
  519. referencedClasses: []
  520. }),
  521. smalltalk.HTMLCanvas);
  522. smalltalk.addMethod(
  523. '_th',
  524. smalltalk.method({
  525. selector: 'th',
  526. category: 'tags',
  527. fn: function (){
  528. var self=this;
  529. return smalltalk.send(self, "_tag_", ["th"]);
  530. return self;},
  531. source: unescape('th%0A%20%20%20%20%5Eself%20tag%3A%20%27th%27'),
  532. messageSends: ["tag:"],
  533. referencedClasses: []
  534. }),
  535. smalltalk.HTMLCanvas);
  536. smalltalk.addMethod(
  537. '_form',
  538. smalltalk.method({
  539. selector: 'form',
  540. category: 'tags',
  541. fn: function (){
  542. var self=this;
  543. return smalltalk.send(self, "_tag_", ["form"]);
  544. return self;},
  545. source: unescape('form%0A%20%20%20%20%5Eself%20tag%3A%20%27form%27'),
  546. messageSends: ["tag:"],
  547. referencedClasses: []
  548. }),
  549. smalltalk.HTMLCanvas);
  550. smalltalk.addMethod(
  551. '_input',
  552. smalltalk.method({
  553. selector: 'input',
  554. category: 'tags',
  555. fn: function (){
  556. var self=this;
  557. return smalltalk.send(self, "_tag_", ["input"]);
  558. return self;},
  559. source: unescape('input%0A%20%20%20%20%5Eself%20tag%3A%20%27input%27'),
  560. messageSends: ["tag:"],
  561. referencedClasses: []
  562. }),
  563. smalltalk.HTMLCanvas);
  564. smalltalk.addMethod(
  565. '_button',
  566. smalltalk.method({
  567. selector: 'button',
  568. category: 'tags',
  569. fn: function (){
  570. var self=this;
  571. return smalltalk.send(self, "_tag_", ["button"]);
  572. return self;},
  573. source: unescape('button%0A%20%20%20%20%5Eself%20tag%3A%20%27button%27'),
  574. messageSends: ["tag:"],
  575. referencedClasses: []
  576. }),
  577. smalltalk.HTMLCanvas);
  578. smalltalk.addMethod(
  579. '_select',
  580. smalltalk.method({
  581. selector: 'select',
  582. category: 'tags',
  583. fn: function (){
  584. var self=this;
  585. return smalltalk.send(self, "_tag_", ["select"]);
  586. return self;},
  587. source: unescape('select%0A%20%20%20%20%5Eself%20tag%3A%20%27select%27'),
  588. messageSends: ["tag:"],
  589. referencedClasses: []
  590. }),
  591. smalltalk.HTMLCanvas);
  592. smalltalk.addMethod(
  593. '_option',
  594. smalltalk.method({
  595. selector: 'option',
  596. category: 'tags',
  597. fn: function (){
  598. var self=this;
  599. return smalltalk.send(self, "_tag_", ["option"]);
  600. return self;},
  601. source: unescape('option%0A%20%20%20%20%5Eself%20tag%3A%20%27option%27'),
  602. messageSends: ["tag:"],
  603. referencedClasses: []
  604. }),
  605. smalltalk.HTMLCanvas);
  606. smalltalk.addMethod(
  607. '_textarea',
  608. smalltalk.method({
  609. selector: 'textarea',
  610. category: 'tags',
  611. fn: function (){
  612. var self=this;
  613. return smalltalk.send(self, "_tag_", ["textarea"]);
  614. return self;},
  615. source: unescape('textarea%0A%20%20%20%20%5Eself%20tag%3A%20%27textarea%27'),
  616. messageSends: ["tag:"],
  617. referencedClasses: []
  618. }),
  619. smalltalk.HTMLCanvas);
  620. smalltalk.addMethod(
  621. '_a',
  622. smalltalk.method({
  623. selector: 'a',
  624. category: 'tags',
  625. fn: function (){
  626. var self=this;
  627. return smalltalk.send(self, "_tag_", ["a"]);
  628. return self;},
  629. source: unescape('a%0A%20%20%20%20%5Eself%20tag%3A%20%27a%27'),
  630. messageSends: ["tag:"],
  631. referencedClasses: []
  632. }),
  633. smalltalk.HTMLCanvas);
  634. smalltalk.addMethod(
  635. '_canvas',
  636. smalltalk.method({
  637. selector: 'canvas',
  638. category: 'tags',
  639. fn: function (){
  640. var self=this;
  641. return smalltalk.send(self, "_tag_", ["canvas"]);
  642. return self;},
  643. source: unescape('canvas%0A%09%5Eself%20tag%3A%20%27canvas%27'),
  644. messageSends: ["tag:"],
  645. referencedClasses: []
  646. }),
  647. smalltalk.HTMLCanvas);
  648. smalltalk.addMethod(
  649. '_initializeFromJQuery_',
  650. smalltalk.method({
  651. selector: 'initializeFromJQuery:',
  652. category: 'initialization',
  653. fn: function (aJQuery){
  654. var self=this;
  655. self['@root']=smalltalk.send(smalltalk.TagBrush, "_fromJQuery_canvas_", [aJQuery, self]);
  656. return self;},
  657. source: unescape('initializeFromJQuery%3A%20aJQuery%0A%20%20%20%20root%20%3A%3D%20TagBrush%20fromJQuery%3A%20aJQuery%20canvas%3A%20self'),
  658. messageSends: ["fromJQuery:canvas:"],
  659. referencedClasses: [smalltalk.nil]
  660. }),
  661. smalltalk.HTMLCanvas);
  662. smalltalk.addMethod(
  663. '_pre',
  664. smalltalk.method({
  665. selector: 'pre',
  666. category: 'tags',
  667. fn: function (){
  668. var self=this;
  669. return smalltalk.send(self, "_tag_", ["pre"]);
  670. return self;},
  671. source: unescape('pre%0A%20%20%20%20%5Eself%20tag%3A%20%27pre%27'),
  672. messageSends: ["tag:"],
  673. referencedClasses: []
  674. }),
  675. smalltalk.HTMLCanvas);
  676. smalltalk.addMethod(
  677. '_code',
  678. smalltalk.method({
  679. selector: 'code',
  680. category: 'tags',
  681. fn: function (){
  682. var self=this;
  683. return smalltalk.send(self, "_tag_", ["code"]);
  684. return self;},
  685. source: unescape('code%0A%20%20%20%20%5Eself%20tag%3A%20%27code%27'),
  686. messageSends: ["tag:"],
  687. referencedClasses: []
  688. }),
  689. smalltalk.HTMLCanvas);
  690. smalltalk.addMethod(
  691. '_br',
  692. smalltalk.method({
  693. selector: 'br',
  694. category: 'tags',
  695. fn: function (){
  696. var self=this;
  697. return smalltalk.send(self, "_tag_", ["br"]);
  698. return self;},
  699. source: unescape('br%0A%20%20%20%20%5Eself%20tag%3A%20%27br%27'),
  700. messageSends: ["tag:"],
  701. referencedClasses: []
  702. }),
  703. smalltalk.HTMLCanvas);
  704. smalltalk.addMethod(
  705. '_onJQuery_',
  706. smalltalk.method({
  707. selector: 'onJQuery:',
  708. category: 'instance creation',
  709. fn: function (aJQuery){
  710. var self=this;
  711. return (function($rec){smalltalk.send($rec, "_initializeFromJQuery_", [aJQuery]);smalltalk.send($rec, "_initialize", []);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_basicNew", []));
  712. return self;},
  713. source: unescape('onJQuery%3A%20aJQuery%0A%09%5Eself%20basicNew%0A%09%09initializeFromJQuery%3A%20aJQuery%3B%0A%09%09initialize%3B%0A%09%09yourself'),
  714. messageSends: ["initializeFromJQuery:", "initialize", "yourself", "basicNew"],
  715. referencedClasses: []
  716. }),
  717. smalltalk.HTMLCanvas.klass);
  718. smalltalk.addClass('TagBrush', smalltalk.Object, ['canvas', 'element'], 'Canvas');
  719. smalltalk.addMethod(
  720. '_contents_',
  721. smalltalk.method({
  722. selector: 'contents:',
  723. category: 'adding',
  724. fn: function (anObject){
  725. var self=this;
  726. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_empty", []);
  727. smalltalk.send(self, "_append_", [anObject]);
  728. return self;},
  729. source: unescape('contents%3A%20anObject%0A%20%20%20%20self%20asJQuery%20empty.%0A%20%20%20%20self%20append%3A%20anObject'),
  730. messageSends: ["empty", "asJQuery", "append:"],
  731. referencedClasses: []
  732. }),
  733. smalltalk.TagBrush);
  734. smalltalk.addMethod(
  735. '_addBrush_',
  736. smalltalk.method({
  737. selector: 'addBrush:',
  738. category: 'adding',
  739. fn: function (aTagBrush){
  740. var self=this;
  741. smalltalk.send(self, "_appendChild_", [smalltalk.send(aTagBrush, "_element", [])]);
  742. return aTagBrush;
  743. return self;},
  744. source: unescape('addBrush%3A%20aTagBrush%0A%20%20%20%20self%20appendChild%3A%20aTagBrush%20element.%0A%20%20%20%20%5EaTagBrush'),
  745. messageSends: ["appendChild:", "element"],
  746. referencedClasses: []
  747. }),
  748. smalltalk.TagBrush);
  749. smalltalk.addMethod(
  750. '_with_',
  751. smalltalk.method({
  752. selector: 'with:',
  753. category: 'adding',
  754. fn: function (anObject){
  755. var self=this;
  756. smalltalk.send(self, "_append_", [anObject]);
  757. return self;},
  758. source: unescape('with%3A%20anObject%0A%20%20%20%20self%20append%3A%20anObject'),
  759. messageSends: ["append:"],
  760. referencedClasses: []
  761. }),
  762. smalltalk.TagBrush);
  763. smalltalk.addMethod(
  764. '_append_',
  765. smalltalk.method({
  766. selector: 'append:',
  767. category: 'adding',
  768. fn: function (anObject){
  769. var self=this;
  770. smalltalk.send(anObject, "_appendToBrush_", [self]);
  771. return self;},
  772. source: unescape('append%3A%20anObject%0A%20%20%20%20anObject%20appendToBrush%3A%20self'),
  773. messageSends: ["appendToBrush:"],
  774. referencedClasses: []
  775. }),
  776. smalltalk.TagBrush);
  777. smalltalk.addMethod(
  778. '_appendToBrush_',
  779. smalltalk.method({
  780. selector: 'appendToBrush:',
  781. category: 'adding',
  782. fn: function (aTagBrush){
  783. var self=this;
  784. smalltalk.send(aTagBrush, "_addBrush_", [self]);
  785. return self;},
  786. source: unescape('appendToBrush%3A%20aTagBrush%0A%20%20%20%20aTagBrush%20addBrush%3A%20self'),
  787. messageSends: ["addBrush:"],
  788. referencedClasses: []
  789. }),
  790. smalltalk.TagBrush);
  791. smalltalk.addMethod(
  792. '_appendBlock_',
  793. smalltalk.method({
  794. selector: 'appendBlock:',
  795. category: 'adding',
  796. fn: function (aBlock){
  797. var self=this;
  798. var root=nil;
  799. root=smalltalk.send(self['@canvas'], "_root", []);
  800. smalltalk.send(self['@canvas'], "_root_", [self]);
  801. smalltalk.send(aBlock, "_value_", [self['@canvas']]);
  802. smalltalk.send(self['@canvas'], "_root_", [root]);
  803. return self;},
  804. source: unescape('appendBlock%3A%20aBlock%0A%20%20%20%20%7C%20root%20%7C%0A%20%20%20%20root%20%3A%3D%20canvas%20root.%0A%20%20%20%20canvas%20root%3A%20self.%0A%20%20%20%20aBlock%20value%3A%20canvas.%0A%20%20%20%20canvas%20root%3A%20root'),
  805. messageSends: ["root", "root:", "value:"],
  806. referencedClasses: []
  807. }),
  808. smalltalk.TagBrush);
  809. smalltalk.addMethod(
  810. '_appendChild_',
  811. smalltalk.method({
  812. selector: 'appendChild:',
  813. category: 'adding',
  814. fn: function (anElement){
  815. var self=this;
  816. self['@element'].appendChild(anElement);
  817. return self;},
  818. source: unescape('appendChild%3A%20anElement%0A%20%20%20%20%3Cself%5B%27@element%27%5D.appendChild%28anElement%29%3E'),
  819. messageSends: [],
  820. referencedClasses: []
  821. }),
  822. smalltalk.TagBrush);
  823. smalltalk.addMethod(
  824. '_appendString_',
  825. smalltalk.method({
  826. selector: 'appendString:',
  827. category: 'adding',
  828. fn: function (aString){
  829. var self=this;
  830. smalltalk.send(self, "_appendChild_", [smalltalk.send(self, "_createTextNodeFor_", [aString])]);
  831. return self;},
  832. source: unescape('appendString%3A%20aString%0A%20%20%20%20self%20appendChild%3A%20%28self%20createTextNodeFor%3A%20aString%29'),
  833. messageSends: ["appendChild:", "createTextNodeFor:"],
  834. referencedClasses: []
  835. }),
  836. smalltalk.TagBrush);
  837. smalltalk.addMethod(
  838. '_at_put_',
  839. smalltalk.method({
  840. selector: 'at:put:',
  841. category: 'attributes',
  842. fn: function (aString, aValue){
  843. var self=this;
  844. self['@element'].setAttribute(aString, aValue);
  845. return self;},
  846. source: unescape('at%3A%20aString%20put%3A%20aValue%0A%20%20%20%20%3Cself%5B%27@element%27%5D.setAttribute%28aString%2C%20aValue%29%3E'),
  847. messageSends: [],
  848. referencedClasses: []
  849. }),
  850. smalltalk.TagBrush);
  851. smalltalk.addMethod(
  852. '_removeAt_',
  853. smalltalk.method({
  854. selector: 'removeAt:',
  855. category: 'attributes',
  856. fn: function (aString){
  857. var self=this;
  858. self['@element'].removeAttribute(aString);
  859. return self;},
  860. source: unescape('removeAt%3A%20aString%0A%20%20%20%20%3Cself%5B%27@element%27%5D.removeAttribute%28aString%29%3E'),
  861. messageSends: [],
  862. referencedClasses: []
  863. }),
  864. smalltalk.TagBrush);
  865. smalltalk.addMethod(
  866. '_class_',
  867. smalltalk.method({
  868. selector: 'class:',
  869. category: 'attributes',
  870. fn: function (aString){
  871. var self=this;
  872. smalltalk.send(self, "_at_put_", ["class", aString]);
  873. return self;},
  874. source: unescape('class%3A%20aString%0A%20%20%20%20self%20at%3A%20%27class%27%20put%3A%20aString'),
  875. messageSends: ["at:put:"],
  876. referencedClasses: []
  877. }),
  878. smalltalk.TagBrush);
  879. smalltalk.addMethod(
  880. '_id_',
  881. smalltalk.method({
  882. selector: 'id:',
  883. category: 'attributes',
  884. fn: function (aString){
  885. var self=this;
  886. smalltalk.send(self, "_at_put_", ["id", aString]);
  887. return self;},
  888. source: unescape('id%3A%20aString%0A%20%20%20%20self%20at%3A%20%27id%27%20put%3A%20aString'),
  889. messageSends: ["at:put:"],
  890. referencedClasses: []
  891. }),
  892. smalltalk.TagBrush);
  893. smalltalk.addMethod(
  894. '_src_',
  895. smalltalk.method({
  896. selector: 'src:',
  897. category: 'attributes',
  898. fn: function (aString){
  899. var self=this;
  900. smalltalk.send(self, "_at_put_", ["src", aString]);
  901. return self;},
  902. source: unescape('src%3A%20aString%0A%20%20%20%20self%20%20at%3A%20%27src%27%20put%3A%20aString'),
  903. messageSends: ["at:put:"],
  904. referencedClasses: []
  905. }),
  906. smalltalk.TagBrush);
  907. smalltalk.addMethod(
  908. '_href_',
  909. smalltalk.method({
  910. selector: 'href:',
  911. category: 'attributes',
  912. fn: function (aString){
  913. var self=this;
  914. smalltalk.send(self, "_at_put_", ["href", aString]);
  915. return self;},
  916. source: unescape('href%3A%20aString%0A%20%20%20%20self%20at%3A%20%27href%27%20put%3A%20aString'),
  917. messageSends: ["at:put:"],
  918. referencedClasses: []
  919. }),
  920. smalltalk.TagBrush);
  921. smalltalk.addMethod(
  922. '_title_',
  923. smalltalk.method({
  924. selector: 'title:',
  925. category: 'attributes',
  926. fn: function (aString){
  927. var self=this;
  928. smalltalk.send(self, "_at_put_", ["title", aString]);
  929. return self;},
  930. source: unescape('title%3A%20aString%0A%20%20%20%20self%20at%3A%20%27title%27%20put%3A%20aString'),
  931. messageSends: ["at:put:"],
  932. referencedClasses: []
  933. }),
  934. smalltalk.TagBrush);
  935. smalltalk.addMethod(
  936. '_style_',
  937. smalltalk.method({
  938. selector: 'style:',
  939. category: 'attributes',
  940. fn: function (aString){
  941. var self=this;
  942. smalltalk.send(self, "_at_put_", ["style", aString]);
  943. return self;},
  944. source: unescape('style%3A%20aString%0A%20%20%20%20self%20at%3A%20%27style%27%20put%3A%20aString'),
  945. messageSends: ["at:put:"],
  946. referencedClasses: []
  947. }),
  948. smalltalk.TagBrush);
  949. smalltalk.addMethod(
  950. '_initializeFromString_canvas_',
  951. smalltalk.method({
  952. selector: 'initializeFromString:canvas:',
  953. category: 'initialization',
  954. fn: function (aString, aCanvas){
  955. var self=this;
  956. self['@element']=smalltalk.send(self, "_createElementFor_", [aString]);
  957. self['@canvas']=aCanvas;
  958. return self;},
  959. source: unescape('initializeFromString%3A%20aString%20canvas%3A%20aCanvas%0A%20%20%20%20element%20%3A%3D%20self%20createElementFor%3A%20aString.%0A%20%20%20%20canvas%20%3A%3D%20aCanvas'),
  960. messageSends: ["createElementFor:"],
  961. referencedClasses: []
  962. }),
  963. smalltalk.TagBrush);
  964. smalltalk.addMethod(
  965. '_element',
  966. smalltalk.method({
  967. selector: 'element',
  968. category: 'accessing',
  969. fn: function (){
  970. var self=this;
  971. return self['@element'];
  972. return self;},
  973. source: unescape('element%0A%20%20%20%20%5Eelement'),
  974. messageSends: [],
  975. referencedClasses: []
  976. }),
  977. smalltalk.TagBrush);
  978. smalltalk.addMethod(
  979. '_asJQuery',
  980. smalltalk.method({
  981. selector: 'asJQuery',
  982. category: 'converting',
  983. fn: function (){
  984. var self=this;
  985. return smalltalk.JQuery._from_(jQuery(self['@element']));
  986. return self;},
  987. source: unescape('asJQuery%0A%09%3Creturn%20smalltalk.JQuery._from_%28jQuery%28self%5B%27@element%27%5D%29%29%3E'),
  988. messageSends: [],
  989. referencedClasses: []
  990. }),
  991. smalltalk.TagBrush);
  992. smalltalk.addMethod(
  993. '_asJQueryDo_',
  994. smalltalk.method({
  995. selector: 'asJQueryDo:',
  996. category: 'converting',
  997. fn: function (aBlock){
  998. var self=this;
  999. smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_asJQuery", [])]);
  1000. return self;},
  1001. source: unescape('asJQueryDo%3A%20aBlock%0A%20%20%20%20aBlock%20value%3A%20self%20asJQuery'),
  1002. messageSends: ["value:", "asJQuery"],
  1003. referencedClasses: []
  1004. }),
  1005. smalltalk.TagBrush);
  1006. smalltalk.addMethod(
  1007. '_onKeyDown_',
  1008. smalltalk.method({
  1009. selector: 'onKeyDown:',
  1010. category: 'events',
  1011. fn: function (aBlock){
  1012. var self=this;
  1013. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keydown", aBlock]);
  1014. return self;},
  1015. source: unescape('onKeyDown%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27keydown%27%20do%3A%20aBlock'),
  1016. messageSends: ["on:do:", "asJQuery"],
  1017. referencedClasses: []
  1018. }),
  1019. smalltalk.TagBrush);
  1020. smalltalk.addMethod(
  1021. '_onKeyPress_',
  1022. smalltalk.method({
  1023. selector: 'onKeyPress:',
  1024. category: 'events',
  1025. fn: function (aBlock){
  1026. var self=this;
  1027. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keypress", aBlock]);
  1028. return self;},
  1029. source: unescape('onKeyPress%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27keypress%27%20do%3A%20aBlock'),
  1030. messageSends: ["on:do:", "asJQuery"],
  1031. referencedClasses: []
  1032. }),
  1033. smalltalk.TagBrush);
  1034. smalltalk.addMethod(
  1035. '_onKeyUp_',
  1036. smalltalk.method({
  1037. selector: 'onKeyUp:',
  1038. category: 'events',
  1039. fn: function (aBlock){
  1040. var self=this;
  1041. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["keyup", aBlock]);
  1042. return self;},
  1043. source: unescape('onKeyUp%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27keyup%27%20do%3A%20aBlock'),
  1044. messageSends: ["on:do:", "asJQuery"],
  1045. referencedClasses: []
  1046. }),
  1047. smalltalk.TagBrush);
  1048. smalltalk.addMethod(
  1049. '_onFocus_',
  1050. smalltalk.method({
  1051. selector: 'onFocus:',
  1052. category: 'events',
  1053. fn: function (aBlock){
  1054. var self=this;
  1055. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["focus", aBlock]);
  1056. return self;},
  1057. source: unescape('onFocus%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27focus%27%20do%3A%20aBlock'),
  1058. messageSends: ["on:do:", "asJQuery"],
  1059. referencedClasses: []
  1060. }),
  1061. smalltalk.TagBrush);
  1062. smalltalk.addMethod(
  1063. '_onBlur_',
  1064. smalltalk.method({
  1065. selector: 'onBlur:',
  1066. category: 'events',
  1067. fn: function (aBlock){
  1068. var self=this;
  1069. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["blur", aBlock]);
  1070. return self;},
  1071. source: unescape('onBlur%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27blur%27%20do%3A%20aBlock'),
  1072. messageSends: ["on:do:", "asJQuery"],
  1073. referencedClasses: []
  1074. }),
  1075. smalltalk.TagBrush);
  1076. smalltalk.addMethod(
  1077. '_onChange_',
  1078. smalltalk.method({
  1079. selector: 'onChange:',
  1080. category: 'events',
  1081. fn: function (aBlock){
  1082. var self=this;
  1083. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["change", aBlock]);
  1084. return self;},
  1085. source: unescape('onChange%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27change%27%20do%3A%20aBlock'),
  1086. messageSends: ["on:do:", "asJQuery"],
  1087. referencedClasses: []
  1088. }),
  1089. smalltalk.TagBrush);
  1090. smalltalk.addMethod(
  1091. '_onClick_',
  1092. smalltalk.method({
  1093. selector: 'onClick:',
  1094. category: 'events',
  1095. fn: function (aBlock){
  1096. var self=this;
  1097. smalltalk.send(smalltalk.send(self, "_asJQuery", []), "_on_do_", ["click", aBlock]);
  1098. return self;},
  1099. source: unescape('onClick%3A%20aBlock%0A%20%20%20%20self%20asJQuery%20on%3A%20%27click%27%20do%3A%20aBlock'),
  1100. messageSends: ["on:do:", "asJQuery"],
  1101. referencedClasses: []
  1102. }),
  1103. smalltalk.TagBrush);
  1104. smalltalk.addMethod(
  1105. '_createElementFor_',
  1106. smalltalk.method({
  1107. selector: 'createElementFor:',
  1108. category: 'private',
  1109. fn: function (aString){
  1110. var self=this;
  1111. return document.createElement(String(aString));
  1112. return self;},
  1113. source: unescape('createElementFor%3A%20aString%0A%09%3Creturn%20document.createElement%28String%28aString%29%29%3E'),
  1114. messageSends: [],
  1115. referencedClasses: []
  1116. }),
  1117. smalltalk.TagBrush);
  1118. smalltalk.addMethod(
  1119. '_createTextNodeFor_',
  1120. smalltalk.method({
  1121. selector: 'createTextNodeFor:',
  1122. category: 'private',
  1123. fn: function (aString){
  1124. var self=this;
  1125. return document.createTextNode(String(aString));
  1126. return self;},
  1127. source: unescape('createTextNodeFor%3A%20aString%0A%09%3Creturn%20document.createTextNode%28String%28aString%29%29%3E'),
  1128. messageSends: [],
  1129. referencedClasses: []
  1130. }),
  1131. smalltalk.TagBrush);
  1132. smalltalk.addMethod(
  1133. '_initializeFromJQuery_canvas_',
  1134. smalltalk.method({
  1135. selector: 'initializeFromJQuery:canvas:',
  1136. category: 'initialization',
  1137. fn: function (aJQuery, aCanvas){
  1138. var self=this;
  1139. self['@element']=smalltalk.send(smalltalk.send(aJQuery, "_jquery", []), "_get_", [(0)]);
  1140. self['@canvas']=aCanvas;
  1141. return self;},
  1142. source: unescape('initializeFromJQuery%3A%20aJQuery%20canvas%3A%20aCanvas%0A%20%20%20%20element%20%3A%3D%20aJQuery%20jquery%20get%3A%200.%0A%20%20%20%20canvas%20%3A%3D%20aCanvas'),
  1143. messageSends: ["get:", "jquery"],
  1144. referencedClasses: []
  1145. }),
  1146. smalltalk.TagBrush);
  1147. smalltalk.addMethod(
  1148. '_fromString_canvas_',
  1149. smalltalk.method({
  1150. selector: 'fromString:canvas:',
  1151. category: 'instance creation',
  1152. fn: function (aString, aCanvas){
  1153. var self=this;
  1154. return (function($rec){smalltalk.send($rec, "_initializeFromString_canvas_", [aString, aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  1155. return self;},
  1156. source: unescape('fromString%3A%20aString%20canvas%3A%20aCanvas%0A%20%20%20%20%5Eself%20new%0A%09initializeFromString%3A%20aString%20canvas%3A%20aCanvas%3B%0A%09yourself'),
  1157. messageSends: ["initializeFromString:canvas:", "yourself", "new"],
  1158. referencedClasses: []
  1159. }),
  1160. smalltalk.TagBrush.klass);
  1161. smalltalk.addMethod(
  1162. '_fromJQuery_canvas_',
  1163. smalltalk.method({
  1164. selector: 'fromJQuery:canvas:',
  1165. category: 'instance creation',
  1166. fn: function (aJQuery, aCanvas){
  1167. var self=this;
  1168. return (function($rec){smalltalk.send($rec, "_initializeFromJQuery_canvas_", [aJQuery, aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  1169. return self;},
  1170. source: unescape('fromJQuery%3A%20aJQuery%20canvas%3A%20aCanvas%0A%20%20%20%20%5Eself%20new%0A%09initializeFromJQuery%3A%20aJQuery%20canvas%3A%20aCanvas%3B%0A%09yourself'),
  1171. messageSends: ["initializeFromJQuery:canvas:", "yourself", "new"],
  1172. referencedClasses: []
  1173. }),
  1174. smalltalk.TagBrush.klass);
  1175. smalltalk.addClass('Widget', smalltalk.Object, [], 'Canvas');
  1176. smalltalk.addMethod(
  1177. '_appendToBrush_',
  1178. smalltalk.method({
  1179. selector: 'appendToBrush:',
  1180. category: 'adding',
  1181. fn: function (aTagBrush){
  1182. var self=this;
  1183. smalltalk.send(self, "_appendToJQuery_", [smalltalk.send(aTagBrush, "_asJQuery", [])]);
  1184. return self;},
  1185. source: unescape('appendToBrush%3A%20aTagBrush%0A%20%20%20%20self%20appendToJQuery%3A%20aTagBrush%20asJQuery'),
  1186. messageSends: ["appendToJQuery:", "asJQuery"],
  1187. referencedClasses: []
  1188. }),
  1189. smalltalk.Widget);
  1190. smalltalk.addMethod(
  1191. '_appendToJQuery_',
  1192. smalltalk.method({
  1193. selector: 'appendToJQuery:',
  1194. category: 'adding',
  1195. fn: function (aJQuery){
  1196. var self=this;
  1197. smalltalk.send(self, "_renderOn_", [smalltalk.send(smalltalk.HTMLCanvas, "_onJQuery_", [aJQuery])]);
  1198. return self;},
  1199. source: unescape('appendToJQuery%3A%20aJQuery%0A%20%20%20self%20renderOn%3A%20%28HTMLCanvas%20onJQuery%3A%20aJQuery%29'),
  1200. messageSends: ["renderOn:", "onJQuery:"],
  1201. referencedClasses: [smalltalk.HTMLCanvas]
  1202. }),
  1203. smalltalk.Widget);
  1204. smalltalk.addMethod(
  1205. '_alert_',
  1206. smalltalk.method({
  1207. selector: 'alert:',
  1208. category: 'actions',
  1209. fn: function (aString){
  1210. var self=this;
  1211. alert(aString);
  1212. return self;},
  1213. source: unescape('alert%3A%20aString%0A%20%20%20%20%3Calert%28aString%29%3E'),
  1214. messageSends: [],
  1215. referencedClasses: []
  1216. }),
  1217. smalltalk.Widget);
  1218. smalltalk.addMethod(
  1219. '_confirm_',
  1220. smalltalk.method({
  1221. selector: 'confirm:',
  1222. category: 'actions',
  1223. fn: function (aString){
  1224. var self=this;
  1225. return window.confirm(aString);
  1226. return self;},
  1227. source: unescape('confirm%3A%20aString%0A%20%20%20%20%3Creturn%20window.confirm%28aString%29%3E'),
  1228. messageSends: [],
  1229. referencedClasses: []
  1230. }),
  1231. smalltalk.Widget);
  1232. smalltalk.addMethod(
  1233. '_prompt_',
  1234. smalltalk.method({
  1235. selector: 'prompt:',
  1236. category: 'actions',
  1237. fn: function (aString){
  1238. var self=this;
  1239. return smalltalk.send(self, "_prompt_default_", [aString, ""]);
  1240. return self;},
  1241. source: unescape('prompt%3A%20aString%0A%20%20%20%20%5Eself%20prompt%3A%20aString%20default%3A%20%27%27'),
  1242. messageSends: ["prompt:default:"],
  1243. referencedClasses: []
  1244. }),
  1245. smalltalk.Widget);
  1246. smalltalk.addMethod(
  1247. '_prompt_default_',
  1248. smalltalk.method({
  1249. selector: 'prompt:default:',
  1250. category: 'actions',
  1251. fn: function (aString, anotherString){
  1252. var self=this;
  1253. return window.prompt(aString, anotherString);
  1254. return self;},
  1255. source: unescape('prompt%3A%20aString%20default%3A%20anotherString%0A%20%20%20%20%3Creturn%20window.prompt%28aString%2C%20anotherString%29%3E'),
  1256. messageSends: [],
  1257. referencedClasses: []
  1258. }),
  1259. smalltalk.Widget);
  1260. smalltalk.addMethod(
  1261. '_renderOn_',
  1262. smalltalk.method({
  1263. selector: 'renderOn:',
  1264. category: 'rendering',
  1265. fn: function (html){
  1266. var self=this;
  1267. self;
  1268. return self;},
  1269. source: unescape('renderOn%3A%20html%0A%20%20%20%20self'),
  1270. messageSends: [],
  1271. referencedClasses: []
  1272. }),
  1273. smalltalk.Widget);
  1274. smalltalk.addClass('CanvasBrush', smalltalk.TagBrush, [], 'Canvas');
  1275. smalltalk.addMethod(
  1276. '_createElement',
  1277. smalltalk.method({
  1278. selector: 'createElement',
  1279. category: 'private',
  1280. fn: function (){
  1281. var self=this;
  1282. return document.createElement('canvas');
  1283. return self;},
  1284. source: unescape('createElement%0A%09%3Creturn%20document.createElement%28%27canvas%27%29%3E'),
  1285. messageSends: [],
  1286. referencedClasses: []
  1287. }),
  1288. smalltalk.CanvasBrush);
  1289. smalltalk.addMethod(
  1290. '_initializeWithCanvas_',
  1291. smalltalk.method({
  1292. selector: 'initializeWithCanvas:',
  1293. category: 'initialization',
  1294. fn: function (aCanvas){
  1295. var self=this;
  1296. canvas=aCanvas;
  1297. return self;},
  1298. source: unescape('initializeWithCanvas%3A%20aCanvas%0A%09canvas%20%3A%3D%20aCanvas'),
  1299. messageSends: [],
  1300. referencedClasses: []
  1301. }),
  1302. smalltalk.CanvasBrush);
  1303. smalltalk.addMethod(
  1304. '_canvas_',
  1305. smalltalk.method({
  1306. selector: 'canvas:',
  1307. category: 'instance creation',
  1308. fn: function (aCanvas){
  1309. var self=this;
  1310. return (function($rec){smalltalk.send($rec, "_initializeWithCanvas_", [aCanvas]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  1311. return self;},
  1312. source: unescape('canvas%3A%20aCanvas%0A%09%5Eself%20new%0A%09%09initializeWithCanvas%3A%20aCanvas%3B%0A%09%09yourself'),
  1313. messageSends: ["initializeWithCanvas:", "yourself", "new"],
  1314. referencedClasses: []
  1315. }),
  1316. smalltalk.CanvasBrush.klass);
  1317. smalltalk.addMethod(
  1318. '_appendToBrush_',
  1319. smalltalk.method({
  1320. selector: 'appendToBrush:',
  1321. category: '*Canvas',
  1322. fn: function (aTagBrush){
  1323. var self=this;
  1324. smalltalk.send(aTagBrush, "_append_", [smalltalk.send(self, "_asString", [])]);
  1325. return self;},
  1326. source: unescape('appendToBrush%3A%20aTagBrush%0A%20%20%20%20aTagBrush%20append%3A%20self%20asString'),
  1327. messageSends: ["append:", "asString"],
  1328. referencedClasses: []
  1329. }),
  1330. smalltalk.Object);
  1331. smalltalk.addMethod(
  1332. '_appendToBrush_',
  1333. smalltalk.method({
  1334. selector: 'appendToBrush:',
  1335. category: '*Canvas',
  1336. fn: function (aTagBrush){
  1337. var self=this;
  1338. smalltalk.send(aTagBrush, "_appendBlock_", [self]);
  1339. return self;},
  1340. source: unescape('appendToBrush%3A%20aTagBrush%0A%20%20%20%20aTagBrush%20appendBlock%3A%20self'),
  1341. messageSends: ["appendBlock:"],
  1342. referencedClasses: []
  1343. }),
  1344. smalltalk.BlockClosure);
  1345. smalltalk.addMethod(
  1346. '_appendToBrush_',
  1347. smalltalk.method({
  1348. selector: 'appendToBrush:',
  1349. category: '*Canvas',
  1350. fn: function (aTagBrush){
  1351. var self=this;
  1352. smalltalk.send(aTagBrush, "_appendString_", [self]);
  1353. return self;},
  1354. source: unescape('appendToBrush%3A%20aTagBrush%0A%20%20%20%20aTagBrush%20appendString%3A%20self'),
  1355. messageSends: ["appendString:"],
  1356. referencedClasses: []
  1357. }),
  1358. smalltalk.String);