Helios-Core.js 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122
  1. smalltalk.addPackage('Helios-Core', {});
  2. smalltalk.addClass('HLEnvironment', smalltalk.Object, [], 'Helios-Core');
  3. smalltalk.HLEnvironment.comment="Abstract class defining common behavior for local and remote environments"
  4. smalltalk.addMethod(
  5. "_eval_on_",
  6. smalltalk.method({
  7. selector: "eval:on:",
  8. category: 'actions',
  9. fn: function (someCode, aReceiver) {
  10. var self = this;
  11. var $1;
  12. $1 = smalltalk.send(self, "_subclassResponsibility", []);
  13. return $1;
  14. },
  15. args: ["someCode", "aReceiver"],
  16. source: "eval: someCode on: aReceiver\x0a\x0a\x09^ self subclassResponsibility",
  17. messageSends: ["subclassResponsibility"],
  18. referencedClasses: []
  19. }),
  20. smalltalk.HLEnvironment);
  21. smalltalk.addMethod(
  22. "_packages",
  23. smalltalk.method({
  24. selector: "packages",
  25. category: 'accessing',
  26. fn: function () {
  27. var self = this;
  28. var $1;
  29. $1 = smalltalk.send(self, "_subclassResponsibility", []);
  30. return $1;
  31. },
  32. args: [],
  33. source: "packages\x0a\x0a\x09^ self subclassResponsibility",
  34. messageSends: ["subclassResponsibility"],
  35. referencedClasses: []
  36. }),
  37. smalltalk.HLEnvironment);
  38. smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Core');
  39. smalltalk.addMethod(
  40. "_eval_on_",
  41. smalltalk.method({
  42. selector: "eval:on:",
  43. category: 'actions',
  44. fn: function (someCode, aReceiver) {
  45. var self = this;
  46. var $1, $2;
  47. var $early = {};
  48. try {
  49. var compiler;
  50. compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
  51. smalltalk.send(function () {return smalltalk.send(compiler, "_parseExpression_", [someCode]);}, "_on_do_", [smalltalk.Error || Error, function (ex) {$1 = smalltalk.send(window, "_alert_", [smalltalk.send(ex, "_messageText", [])]);throw $early = [$1];}]);
  52. $2 = smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compile_forClass_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [someCode]), "__comma", ["] value"]), smalltalk.DoIt || DoIt])]), "_fn", []), "_applyTo_arguments_", [aReceiver, []]);
  53. return $2;
  54. } catch (e) {
  55. if (e === $early) {
  56. return e[0];
  57. }
  58. throw e;
  59. }
  60. },
  61. args: ["someCode", "aReceiver"],
  62. source: "eval: someCode on: aReceiver\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[compiler parseExpression: someCode] on: Error do: [:ex |\x0a\x09\x09^window alert: ex messageText].\x0a\x09^(compiler eval: (compiler compile: 'doIt ^[', someCode, '] value' forClass: DoIt)) fn applyTo: aReceiver arguments: #()",
  63. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "applyTo:arguments:", "fn", "eval:", "compile:forClass:", ","],
  64. referencedClasses: ["Compiler", "Error", "DoIt"]
  65. }),
  66. smalltalk.HLLocalEnvironment);
  67. smalltalk.addMethod(
  68. "_packages",
  69. smalltalk.method({
  70. selector: "packages",
  71. category: 'accessing',
  72. fn: function () {
  73. var self = this;
  74. var $1;
  75. $1 = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packages", []);
  76. return $1;
  77. },
  78. args: [],
  79. source: "packages\x0a\x0a\x09^ Smalltalk current packages",
  80. messageSends: ["packages", "current"],
  81. referencedClasses: ["Smalltalk"]
  82. }),
  83. smalltalk.HLLocalEnvironment);
  84. smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Core');
  85. smalltalk.addMethod(
  86. "_eval_on_",
  87. smalltalk.method({
  88. selector: "eval:on:",
  89. category: 'actions',
  90. fn: function (someCode, aReceiver) {
  91. var self = this;
  92. smalltalk.send(self, "_notYetImplemented", []);
  93. return self;
  94. },
  95. args: ["someCode", "aReceiver"],
  96. source: "eval: someCode on: aReceiver\x0a\x0a\x09\x22Note for future self and friends:\x0a whatever way this compilation happens on the other side, \x0a it should return a proxy to the remote resulting object\x22\x0a \x0a self notYetImplemented",
  97. messageSends: ["notYetImplemented"],
  98. referencedClasses: []
  99. }),
  100. smalltalk.HLRemoteEnvironment);
  101. smalltalk.addMethod(
  102. "_packages",
  103. smalltalk.method({
  104. selector: "packages",
  105. category: 'accessing',
  106. fn: function () {
  107. var self = this;
  108. return self;
  109. },
  110. args: [],
  111. source: "packages\x0a\x09\x22Answer the remote environment's packages\x22\x0a \x0a\x09\x22to-do\x22\x0a \x0a \x22Note for future self and friends:\x0a the problem with remote stuff is that the answers shouldn't be expected to be\x0a received in a syncrhonous fashion. Everything network is asyc, so you *are going to deal with callbacks* here\x22",
  112. messageSends: [],
  113. referencedClasses: []
  114. }),
  115. smalltalk.HLRemoteEnvironment);
  116. smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Core');
  117. smalltalk.HLRemoteObject.comment="This is a local proxy to a remote object.\x0aTipically useful for evaluating and inspecting and interacting with instances of a remote VM.\x0a"
  118. smalltalk.addMethod(
  119. "_doesNotUnderstand_",
  120. smalltalk.method({
  121. selector: "doesNotUnderstand:",
  122. category: 'actions',
  123. fn: function (aMessage) {
  124. var self = this;
  125. return self;
  126. },
  127. args: ["aMessage"],
  128. source: "doesNotUnderstand: aMessage\x0a\x0a\x09\x22to-do\x0a\x0a\x09aham, blah blah\x0a\x0a\x09super doesNotUnderstand: aMessage\x22",
  129. messageSends: [],
  130. referencedClasses: []
  131. }),
  132. smalltalk.HLRemoteObject);
  133. smalltalk.addMethod(
  134. "_inspectOn_",
  135. smalltalk.method({
  136. selector: "inspectOn:",
  137. category: 'actions',
  138. fn: function (anInspector) {
  139. var self = this;
  140. return self;
  141. },
  142. args: ["anInspector"],
  143. source: "inspectOn: anInspector\x0a\x0a\x09\x22to-do\x22\x0a\x0a\x09\x22this is a source of so much fun...\x22\x0a",
  144. messageSends: [],
  145. referencedClasses: []
  146. }),
  147. smalltalk.HLRemoteObject);
  148. smalltalk.addMethod(
  149. "_printString",
  150. smalltalk.method({
  151. selector: "printString",
  152. category: 'actions',
  153. fn: function () {
  154. var self = this;
  155. return "this is a remote object";
  156. },
  157. args: [],
  158. source: "printString\x0a\x09^ 'this is a remote object'",
  159. messageSends: [],
  160. referencedClasses: []
  161. }),
  162. smalltalk.HLRemoteObject);
  163. smalltalk.addClass('HLSourceArea', smalltalk.Widget, ['editor', 'textarea', 'div', 'receiver', 'onDoIt'], 'Helios-Core');
  164. smalltalk.addMethod(
  165. "_clear",
  166. smalltalk.method({
  167. selector: "clear",
  168. category: 'actions',
  169. fn: function () {
  170. var self = this;
  171. smalltalk.send(self, "_contents_", [""]);
  172. return self;
  173. },
  174. args: [],
  175. source: "clear\x0a self contents: ''",
  176. messageSends: ["contents:"],
  177. referencedClasses: []
  178. }),
  179. smalltalk.HLSourceArea);
  180. smalltalk.addMethod(
  181. "_contents",
  182. smalltalk.method({
  183. selector: "contents",
  184. category: 'accessing',
  185. fn: function () {
  186. var self = this;
  187. var $1;
  188. $1 = smalltalk.send(self['@editor'], "_getValue", []);
  189. return $1;
  190. },
  191. args: [],
  192. source: "contents\x0a ^editor getValue",
  193. messageSends: ["getValue"],
  194. referencedClasses: []
  195. }),
  196. smalltalk.HLSourceArea);
  197. smalltalk.addMethod(
  198. "_contents_",
  199. smalltalk.method({
  200. selector: "contents:",
  201. category: 'accessing',
  202. fn: function (aString) {
  203. var self = this;
  204. smalltalk.send(self['@editor'], "_setValue_", [aString]);
  205. return self;
  206. },
  207. args: ["aString"],
  208. source: "contents: aString\x0a editor setValue: aString",
  209. messageSends: ["setValue:"],
  210. referencedClasses: []
  211. }),
  212. smalltalk.HLSourceArea);
  213. smalltalk.addMethod(
  214. "_currentLine",
  215. smalltalk.method({
  216. selector: "currentLine",
  217. category: 'accessing',
  218. fn: function () {
  219. var self = this;
  220. var $1;
  221. $1 = smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]);
  222. return $1;
  223. },
  224. args: [],
  225. source: "currentLine\x0a ^editor getLine: (editor getCursor line)",
  226. messageSends: ["getLine:", "line", "getCursor"],
  227. referencedClasses: []
  228. }),
  229. smalltalk.HLSourceArea);
  230. smalltalk.addMethod(
  231. "_currentLineOrSelection",
  232. smalltalk.method({
  233. selector: "currentLineOrSelection",
  234. category: 'accessing',
  235. fn: function () {
  236. var self = this;
  237. var $2, $1;
  238. $2 = smalltalk.send(self['@editor'], "_somethingSelected", []);
  239. if (smalltalk.assert($2)) {
  240. $1 = smalltalk.send(self, "_selection", []);
  241. } else {
  242. $1 = smalltalk.send(self, "_currentLine", []);
  243. }
  244. return $1;
  245. },
  246. args: [],
  247. source: "currentLineOrSelection\x0a ^editor somethingSelected\x0a\x09ifFalse: [self currentLine]\x0a\x09ifTrue: [self selection]",
  248. messageSends: ["ifFalse:ifTrue:", "currentLine", "selection", "somethingSelected"],
  249. referencedClasses: []
  250. }),
  251. smalltalk.HLSourceArea);
  252. smalltalk.addMethod(
  253. "_doIt",
  254. smalltalk.method({
  255. selector: "doIt",
  256. category: 'actions',
  257. fn: function () {
  258. var self = this;
  259. var $1;
  260. var result;
  261. result = smalltalk.send(self, "_eval_", [smalltalk.send(self, "_currentLineOrSelection", [])]);
  262. $1 = smalltalk.send(self, "_onDoIt", []);
  263. if (($receiver = $1) == nil || $receiver == undefined) {
  264. } else {
  265. smalltalk.send(smalltalk.send(self, "_onDoIt", []), "_value", []);
  266. }
  267. return result;
  268. },
  269. args: [],
  270. source: "doIt\x0a | result |\x0a result := self eval: self currentLineOrSelection.\x0a self onDoIt ifNotNil: [self onDoIt value].\x0a ^result",
  271. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "value", "onDoIt"],
  272. referencedClasses: []
  273. }),
  274. smalltalk.HLSourceArea);
  275. smalltalk.addMethod(
  276. "_editor",
  277. smalltalk.method({
  278. selector: "editor",
  279. category: 'accessing',
  280. fn: function () {
  281. var self = this;
  282. return self['@editor'];
  283. },
  284. args: [],
  285. source: "editor\x0a\x09^editor",
  286. messageSends: [],
  287. referencedClasses: []
  288. }),
  289. smalltalk.HLSourceArea);
  290. smalltalk.addMethod(
  291. "_eval_",
  292. smalltalk.method({
  293. selector: "eval:",
  294. category: 'actions',
  295. fn: function (aString) {
  296. var self = this;
  297. var $1, $2;
  298. var $early = {};
  299. try {
  300. var compiler;
  301. compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
  302. smalltalk.send(function () {return smalltalk.send(compiler, "_parseExpression_", [aString]);}, "_on_do_", [smalltalk.Error || Error, function (ex) {$1 = smalltalk.send(window, "_alert_", [smalltalk.send(ex, "_messageText", [])]);throw $early = [$1];}]);
  303. $2 = smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compile_forClass_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [aString]), "__comma", ["] value"]), smalltalk.DoIt || DoIt])]), "_fn", []), "_applyTo_arguments_", [smalltalk.send(self, "_receiver", []), []]);
  304. return $2;
  305. } catch (e) {
  306. if (e === $early) {
  307. return e[0];
  308. }
  309. throw e;
  310. }
  311. },
  312. args: ["aString"],
  313. source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[compiler parseExpression: aString] on: Error do: [:ex |\x0a\x09\x09^window alert: ex messageText].\x0a\x09^(compiler eval: (compiler compile: 'doIt ^[', aString, '] value' forClass: DoIt)) fn applyTo: self receiver arguments: #()",
  314. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "applyTo:arguments:", "receiver", "fn", "eval:", "compile:forClass:", ","],
  315. referencedClasses: ["Compiler", "Error", "DoIt"]
  316. }),
  317. smalltalk.HLSourceArea);
  318. smalltalk.addMethod(
  319. "_fileIn",
  320. smalltalk.method({
  321. selector: "fileIn",
  322. category: 'actions',
  323. fn: function () {
  324. var self = this;
  325. smalltalk.send(smalltalk.send(smalltalk.Importer || Importer, "_new", []), "_import_", [smalltalk.send(smalltalk.send(self, "_currentLineOrSelection", []), "_readStream", [])]);
  326. return self;
  327. },
  328. args: [],
  329. source: "fileIn\x0a Importer new import: self currentLineOrSelection readStream",
  330. messageSends: ["import:", "readStream", "currentLineOrSelection", "new"],
  331. referencedClasses: ["Importer"]
  332. }),
  333. smalltalk.HLSourceArea);
  334. smalltalk.addMethod(
  335. "_handleKeyDown_",
  336. smalltalk.method({
  337. selector: "handleKeyDown:",
  338. category: 'actions',
  339. fn: function (anEvent) {
  340. var self = this;
  341. if (anEvent.ctrlKey) {
  342. if (anEvent.keyCode === 80) {
  343. self._printIt();
  344. anEvent.preventDefault();
  345. return false;
  346. }
  347. if (anEvent.keyCode === 68) {
  348. self._doIt();
  349. anEvent.preventDefault();
  350. return false;
  351. }
  352. if (anEvent.keyCode === 73) {
  353. self._inspectIt();
  354. anEvent.preventDefault();
  355. return false;
  356. }
  357. }
  358. return self;
  359. },
  360. args: ["anEvent"],
  361. source: "handleKeyDown: anEvent\x0a <if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
  362. messageSends: [],
  363. referencedClasses: []
  364. }),
  365. smalltalk.HLSourceArea);
  366. smalltalk.addMethod(
  367. "_inspectIt",
  368. smalltalk.method({
  369. selector: "inspectIt",
  370. category: 'actions',
  371. fn: function () {
  372. var self = this;
  373. smalltalk.send(smalltalk.send(self, "_doIt", []), "_inspect", []);
  374. return self;
  375. },
  376. args: [],
  377. source: "inspectIt\x0a self doIt inspect",
  378. messageSends: ["inspect", "doIt"],
  379. referencedClasses: []
  380. }),
  381. smalltalk.HLSourceArea);
  382. smalltalk.addMethod(
  383. "_onDoIt",
  384. smalltalk.method({
  385. selector: "onDoIt",
  386. category: 'accessing',
  387. fn: function () {
  388. var self = this;
  389. return self['@onDoIt'];
  390. },
  391. args: [],
  392. source: "onDoIt\x0a\x09^onDoIt",
  393. messageSends: [],
  394. referencedClasses: []
  395. }),
  396. smalltalk.HLSourceArea);
  397. smalltalk.addMethod(
  398. "_onDoIt_",
  399. smalltalk.method({
  400. selector: "onDoIt:",
  401. category: 'accessing',
  402. fn: function (aBlock) {
  403. var self = this;
  404. self['@onDoIt'] = aBlock;
  405. return self;
  406. },
  407. args: ["aBlock"],
  408. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  409. messageSends: [],
  410. referencedClasses: []
  411. }),
  412. smalltalk.HLSourceArea);
  413. smalltalk.addMethod(
  414. "_onKeyDown_",
  415. smalltalk.method({
  416. selector: "onKeyDown:",
  417. category: 'events',
  418. fn: function (aBlock) {
  419. var self = this;
  420. smalltalk.send(self['@div'], "_onKeyDown_", [aBlock]);
  421. return self;
  422. },
  423. args: ["aBlock"],
  424. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  425. messageSends: ["onKeyDown:"],
  426. referencedClasses: []
  427. }),
  428. smalltalk.HLSourceArea);
  429. smalltalk.addMethod(
  430. "_onKeyUp_",
  431. smalltalk.method({
  432. selector: "onKeyUp:",
  433. category: 'events',
  434. fn: function (aBlock) {
  435. var self = this;
  436. smalltalk.send(self['@div'], "_onKeyUp_", [aBlock]);
  437. return self;
  438. },
  439. args: ["aBlock"],
  440. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  441. messageSends: ["onKeyUp:"],
  442. referencedClasses: []
  443. }),
  444. smalltalk.HLSourceArea);
  445. smalltalk.addMethod(
  446. "_print_",
  447. smalltalk.method({
  448. selector: "print:",
  449. category: 'actions',
  450. fn: function (aString) {
  451. var self = this;
  452. var start;
  453. var stop;
  454. start = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
  455. stop = smalltalk.send(smalltalk.HashedCollection || HashedCollection, "_new", []);
  456. smalltalk.send(start, "_at_put_", ["line", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_line", [])]);
  457. smalltalk.send(start, "_at_put_", ["ch", smalltalk.send(smalltalk.send(self['@editor'], "_getCursor_", [false]), "_ch", [])]);
  458. smalltalk.send(stop, "_at_put_", ["line", smalltalk.send(start, "_at_", ["line"])]);
  459. smalltalk.send(stop, "_at_put_", ["ch", smalltalk.send(smalltalk.send(smalltalk.send(start, "_at_", ["ch"]), "__plus", [smalltalk.send(aString, "_size", [])]), "__plus", [2])]);
  460. smalltalk.send(self['@editor'], "_replaceSelection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@editor'], "_getSelection", []), "__comma", [" "]), "__comma", [aString]), "__comma", [" "])]);
  461. smalltalk.send(self['@editor'], "_setCursor_", [smalltalk.send(self['@editor'], "_getCursor_", [true])]);
  462. smalltalk.send(self['@editor'], "_setSelection_end_", [stop, start]);
  463. return self;
  464. },
  465. args: ["aString"],
  466. source: "print: aString\x0a\x09| start stop |\x0a\x09start := HashedCollection new.\x0a\x09stop := HashedCollection new.\x0a\x09start at: 'line' put: (editor getCursor: false) line.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a\x09stop at: 'line' put: (start at: 'line').\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
  467. messageSends: ["new", "at:put:", "line", "getCursor:", "ch", "at:", "+", "size", "replaceSelection:", ",", "getSelection", "setCursor:", "setSelection:end:"],
  468. referencedClasses: ["HashedCollection"]
  469. }),
  470. smalltalk.HLSourceArea);
  471. smalltalk.addMethod(
  472. "_printIt",
  473. smalltalk.method({
  474. selector: "printIt",
  475. category: 'actions',
  476. fn: function () {
  477. var self = this;
  478. smalltalk.send(self, "_print_", [smalltalk.send(smalltalk.send(self, "_doIt", []), "_printString", [])]);
  479. return self;
  480. },
  481. args: [],
  482. source: "printIt\x0a self print: self doIt printString",
  483. messageSends: ["print:", "printString", "doIt"],
  484. referencedClasses: []
  485. }),
  486. smalltalk.HLSourceArea);
  487. smalltalk.addMethod(
  488. "_receiver",
  489. smalltalk.method({
  490. selector: "receiver",
  491. category: 'accessing',
  492. fn: function () {
  493. var self = this;
  494. var $1;
  495. if (($receiver = self['@receiver']) == nil || $receiver == undefined) {
  496. $1 = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
  497. } else {
  498. $1 = self['@receiver'];
  499. }
  500. return $1;
  501. },
  502. args: [],
  503. source: "receiver\x0a\x09^receiver ifNil: [DoIt new]",
  504. messageSends: ["ifNil:", "new"],
  505. referencedClasses: ["DoIt"]
  506. }),
  507. smalltalk.HLSourceArea);
  508. smalltalk.addMethod(
  509. "_receiver_",
  510. smalltalk.method({
  511. selector: "receiver:",
  512. category: 'accessing',
  513. fn: function (anObject) {
  514. var self = this;
  515. self['@receiver'] = anObject;
  516. return self;
  517. },
  518. args: ["anObject"],
  519. source: "receiver: anObject\x0a\x09receiver := anObject",
  520. messageSends: [],
  521. referencedClasses: []
  522. }),
  523. smalltalk.HLSourceArea);
  524. smalltalk.addMethod(
  525. "_renderOn_",
  526. smalltalk.method({
  527. selector: "renderOn:",
  528. category: 'rendering',
  529. fn: function (html) {
  530. var self = this;
  531. self['@div'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["source"]);
  532. smalltalk.send(self['@div'], "_with_", [function () {self['@textarea'] = smalltalk.send(html, "_textarea", []);return self['@textarea'];}]);
  533. smalltalk.send(self, "_setEditorOn_", [smalltalk.send(self['@textarea'], "_element", [])]);
  534. smalltalk.send(self['@div'], "_onKeyDown_", [function (e) {return smalltalk.send(self, "_handleKeyDown_", [e]);}]);
  535. return self;
  536. },
  537. args: ["html"],
  538. source: "renderOn: html\x0a div := html div class: 'source'.\x0a div with: [textarea := html textarea].\x0a self setEditorOn: textarea element.\x0a div onKeyDown: [:e | self handleKeyDown: e]",
  539. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
  540. referencedClasses: []
  541. }),
  542. smalltalk.HLSourceArea);
  543. smalltalk.addMethod(
  544. "_selection",
  545. smalltalk.method({
  546. selector: "selection",
  547. category: 'accessing',
  548. fn: function () {
  549. var self = this;
  550. var $1;
  551. $1 = smalltalk.send(self['@editor'], "_getSelection", []);
  552. return $1;
  553. },
  554. args: [],
  555. source: "selection\x0a\x09^editor getSelection",
  556. messageSends: ["getSelection"],
  557. referencedClasses: []
  558. }),
  559. smalltalk.HLSourceArea);
  560. smalltalk.addMethod(
  561. "_selectionEnd",
  562. smalltalk.method({
  563. selector: "selectionEnd",
  564. category: 'accessing',
  565. fn: function () {
  566. var self = this;
  567. var $1;
  568. $1 = smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionEnd", []);
  569. return $1;
  570. },
  571. args: [],
  572. source: "selectionEnd\x0a ^textarea element selectionEnd",
  573. messageSends: ["selectionEnd", "element"],
  574. referencedClasses: []
  575. }),
  576. smalltalk.HLSourceArea);
  577. smalltalk.addMethod(
  578. "_selectionEnd_",
  579. smalltalk.method({
  580. selector: "selectionEnd:",
  581. category: 'accessing',
  582. fn: function (anInteger) {
  583. var self = this;
  584. smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionEnd_", [anInteger]);
  585. return self;
  586. },
  587. args: ["anInteger"],
  588. source: "selectionEnd: anInteger\x0a textarea element selectionEnd: anInteger",
  589. messageSends: ["selectionEnd:", "element"],
  590. referencedClasses: []
  591. }),
  592. smalltalk.HLSourceArea);
  593. smalltalk.addMethod(
  594. "_selectionStart",
  595. smalltalk.method({
  596. selector: "selectionStart",
  597. category: 'accessing',
  598. fn: function () {
  599. var self = this;
  600. var $1;
  601. $1 = smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionStart", []);
  602. return $1;
  603. },
  604. args: [],
  605. source: "selectionStart\x0a ^textarea element selectionStart",
  606. messageSends: ["selectionStart", "element"],
  607. referencedClasses: []
  608. }),
  609. smalltalk.HLSourceArea);
  610. smalltalk.addMethod(
  611. "_selectionStart_",
  612. smalltalk.method({
  613. selector: "selectionStart:",
  614. category: 'accessing',
  615. fn: function (anInteger) {
  616. var self = this;
  617. smalltalk.send(smalltalk.send(self['@textarea'], "_element", []), "_selectionStart_", [anInteger]);
  618. return self;
  619. },
  620. args: ["anInteger"],
  621. source: "selectionStart: anInteger\x0a textarea element selectionStart: anInteger",
  622. messageSends: ["selectionStart:", "element"],
  623. referencedClasses: []
  624. }),
  625. smalltalk.HLSourceArea);
  626. smalltalk.addMethod(
  627. "_setEditorOn_",
  628. smalltalk.method({
  629. selector: "setEditorOn:",
  630. category: 'accessing',
  631. fn: function (aTextarea) {
  632. var self = this;
  633. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {theme: "amber", lineNumbers: true, enterMode: "flat", matchBrackets: true, electricChars: false});
  634. return self;
  635. },
  636. args: ["aTextarea"],
  637. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'amber',\x0a lineNumbers: true,\x0a enterMode: 'flat',\x0a matchBrackets: true,\x0a electricChars: false\x0a\x09})>",
  638. messageSends: [],
  639. referencedClasses: []
  640. }),
  641. smalltalk.HLSourceArea);
  642. smalltalk.addMethod(
  643. "_val",
  644. smalltalk.method({
  645. selector: "val",
  646. category: 'accessing',
  647. fn: function () {
  648. var self = this;
  649. var $1;
  650. $1 = smalltalk.send(self['@editor'], "_getValue", []);
  651. return $1;
  652. },
  653. args: [],
  654. source: "val\x0a ^editor getValue",
  655. messageSends: ["getValue"],
  656. referencedClasses: []
  657. }),
  658. smalltalk.HLSourceArea);
  659. smalltalk.addMethod(
  660. "_val_",
  661. smalltalk.method({
  662. selector: "val:",
  663. category: 'accessing',
  664. fn: function (aString) {
  665. var self = this;
  666. smalltalk.send(self['@editor'], "_setValue_", [aString]);
  667. return self;
  668. },
  669. args: ["aString"],
  670. source: "val: aString\x0a editor setValue: aString",
  671. messageSends: ["setValue:"],
  672. referencedClasses: []
  673. }),
  674. smalltalk.HLSourceArea);
  675. smalltalk.addClass('HLTab', smalltalk.Object, ['widget', 'label'], 'Helios-Core');
  676. smalltalk.addMethod(
  677. "_activate",
  678. smalltalk.method({
  679. selector: "activate",
  680. category: 'accessing',
  681. fn: function () {
  682. var self = this;
  683. smalltalk.send(smalltalk.send(self, "_manager", []), "_activate_", [self]);
  684. return self;
  685. },
  686. args: [],
  687. source: "activate\x0a\x09self manager activate: self",
  688. messageSends: ["activate:", "manager"],
  689. referencedClasses: []
  690. }),
  691. smalltalk.HLTab);
  692. smalltalk.addMethod(
  693. "_add",
  694. smalltalk.method({
  695. selector: "add",
  696. category: 'accessing',
  697. fn: function () {
  698. var self = this;
  699. smalltalk.send(smalltalk.send(self, "_manager", []), "_addTab_", [self]);
  700. return self;
  701. },
  702. args: [],
  703. source: "add\x0a\x09self manager addTab: self",
  704. messageSends: ["addTab:", "manager"],
  705. referencedClasses: []
  706. }),
  707. smalltalk.HLTab);
  708. smalltalk.addMethod(
  709. "_isActive",
  710. smalltalk.method({
  711. selector: "isActive",
  712. category: 'testing',
  713. fn: function () {
  714. var self = this;
  715. var $1;
  716. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_manager", []), "_activeTab", []), "__eq", [self]);
  717. return $1;
  718. },
  719. args: [],
  720. source: "isActive\x0a\x09^ self manager activeTab = self",
  721. messageSends: ["=", "activeTab", "manager"],
  722. referencedClasses: []
  723. }),
  724. smalltalk.HLTab);
  725. smalltalk.addMethod(
  726. "_label",
  727. smalltalk.method({
  728. selector: "label",
  729. category: 'accessing',
  730. fn: function () {
  731. var self = this;
  732. var $1;
  733. if (($receiver = self['@label']) == nil || $receiver == undefined) {
  734. $1 = "";
  735. } else {
  736. $1 = self['@label'];
  737. }
  738. return $1;
  739. },
  740. args: [],
  741. source: "label\x0a\x09^ label ifNil: [ '' ]",
  742. messageSends: ["ifNil:"],
  743. referencedClasses: []
  744. }),
  745. smalltalk.HLTab);
  746. smalltalk.addMethod(
  747. "_label_",
  748. smalltalk.method({
  749. selector: "label:",
  750. category: 'accessing',
  751. fn: function (aString) {
  752. var self = this;
  753. self['@label'] = aString;
  754. return self;
  755. },
  756. args: ["aString"],
  757. source: "label: aString\x0a\x09label := aString",
  758. messageSends: [],
  759. referencedClasses: []
  760. }),
  761. smalltalk.HLTab);
  762. smalltalk.addMethod(
  763. "_manager",
  764. smalltalk.method({
  765. selector: "manager",
  766. category: 'accessing',
  767. fn: function () {
  768. var self = this;
  769. var $1;
  770. $1 = smalltalk.send(smalltalk.HLManager || HLManager, "_current", []);
  771. return $1;
  772. },
  773. args: [],
  774. source: "manager\x0a\x09^ HLManager current",
  775. messageSends: ["current"],
  776. referencedClasses: ["HLManager"]
  777. }),
  778. smalltalk.HLTab);
  779. smalltalk.addMethod(
  780. "_widget",
  781. smalltalk.method({
  782. selector: "widget",
  783. category: 'accessing',
  784. fn: function () {
  785. var self = this;
  786. return self['@widget'];
  787. },
  788. args: [],
  789. source: "widget\x0a\x09^ widget",
  790. messageSends: [],
  791. referencedClasses: []
  792. }),
  793. smalltalk.HLTab);
  794. smalltalk.addMethod(
  795. "_widget_",
  796. smalltalk.method({
  797. selector: "widget:",
  798. category: 'accessing',
  799. fn: function (aWidget) {
  800. var self = this;
  801. self['@widget'] = aWidget;
  802. return self;
  803. },
  804. args: ["aWidget"],
  805. source: "widget: aWidget\x0a\x09widget := aWidget",
  806. messageSends: [],
  807. referencedClasses: []
  808. }),
  809. smalltalk.HLTab);
  810. smalltalk.addMethod(
  811. "_on_labelled_",
  812. smalltalk.method({
  813. selector: "on:labelled:",
  814. category: 'instance creation',
  815. fn: function (aWidget, aString) {
  816. var self = this;
  817. var $2, $3, $1;
  818. $2 = smalltalk.send(self, "_new", []);
  819. smalltalk.send($2, "_widget_", [aWidget]);
  820. smalltalk.send($2, "_label_", [aString]);
  821. $3 = smalltalk.send($2, "_yourself", []);
  822. $1 = $3;
  823. return $1;
  824. },
  825. args: ["aWidget", "aString"],
  826. source: "on: aWidget labelled: aString\x0a\x09^ self new\x0a\x09\x09widget: aWidget;\x0a\x09\x09label: aString;\x0a\x09\x09yourself",
  827. messageSends: ["widget:", "new", "label:", "yourself"],
  828. referencedClasses: []
  829. }),
  830. smalltalk.HLTab.klass);
  831. smalltalk.addClass('HLWidget', smalltalk.Widget, ['rootDiv'], 'Helios-Core');
  832. smalltalk.addMethod(
  833. "_manager",
  834. smalltalk.method({
  835. selector: "manager",
  836. category: 'accessing',
  837. fn: function () {
  838. var self = this;
  839. var $1;
  840. $1 = smalltalk.send(smalltalk.HLManager || HLManager, "_current", []);
  841. return $1;
  842. },
  843. args: [],
  844. source: "manager\x0a\x09^ HLManager current",
  845. messageSends: ["current"],
  846. referencedClasses: ["HLManager"]
  847. }),
  848. smalltalk.HLWidget);
  849. smalltalk.addMethod(
  850. "_refresh",
  851. smalltalk.method({
  852. selector: "refresh",
  853. category: 'updating',
  854. fn: function () {
  855. var self = this;
  856. if (($receiver = self['@rootDiv']) == nil || $receiver == undefined) {
  857. return self;
  858. } else {
  859. self['@rootDiv'];
  860. }
  861. smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_empty", []);
  862. smalltalk.send(function (html) {return smalltalk.send(self, "_renderContentOn_", [html]);}, "_appendToJQuery_", [smalltalk.send(self['@rootDiv'], "_asJQuery", [])]);
  863. return self;
  864. },
  865. args: [],
  866. source: "refresh\x0a\x09rootDiv ifNil: [ ^ self ].\x0a \x0a\x09rootDiv asJQuery empty.\x0a [ :html | self renderContentOn: html ] appendToJQuery: rootDiv asJQuery",
  867. messageSends: ["ifNil:", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"],
  868. referencedClasses: []
  869. }),
  870. smalltalk.HLWidget);
  871. smalltalk.addMethod(
  872. "_registerBindings",
  873. smalltalk.method({
  874. selector: "registerBindings",
  875. category: 'keybindings',
  876. fn: function () {
  877. var self = this;
  878. smalltalk.send(self, "_registerBindingsOn_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_manager", []), "_keyBinder", []), "_bindings", [])]);
  879. return self;
  880. },
  881. args: [],
  882. source: "registerBindings\x0a\x09self registerBindingsOn: self manager keyBinder bindings",
  883. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"],
  884. referencedClasses: []
  885. }),
  886. smalltalk.HLWidget);
  887. smalltalk.addMethod(
  888. "_registerBindingsOn_",
  889. smalltalk.method({
  890. selector: "registerBindingsOn:",
  891. category: 'keybindings',
  892. fn: function (aBindingGroup) {
  893. var self = this;
  894. return self;
  895. },
  896. args: ["aBindingGroup"],
  897. source: "registerBindingsOn: aBindingGroup",
  898. messageSends: [],
  899. referencedClasses: []
  900. }),
  901. smalltalk.HLWidget);
  902. smalltalk.addMethod(
  903. "_renderContentOn_",
  904. smalltalk.method({
  905. selector: "renderContentOn:",
  906. category: 'rendering',
  907. fn: function (html) {
  908. var self = this;
  909. return self;
  910. },
  911. args: ["html"],
  912. source: "renderContentOn: html\x0a",
  913. messageSends: [],
  914. referencedClasses: []
  915. }),
  916. smalltalk.HLWidget);
  917. smalltalk.addMethod(
  918. "_renderOn_",
  919. smalltalk.method({
  920. selector: "renderOn:",
  921. category: 'rendering',
  922. fn: function (html) {
  923. var self = this;
  924. smalltalk.send(self, "_registerBindings", []);
  925. self['@rootDiv'] = smalltalk.send(smalltalk.send(html, "_div", []), "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
  926. return self;
  927. },
  928. args: ["html"],
  929. source: "renderOn: html\x0a self registerBindings.\x0a\x0a\x09rootDiv := html div with: [\x0a \x09self renderContentOn: html ]",
  930. messageSends: ["registerBindings", "with:", "renderContentOn:", "div"],
  931. referencedClasses: []
  932. }),
  933. smalltalk.HLWidget);
  934. smalltalk.addMethod(
  935. "_subscribeTo_",
  936. smalltalk.method({
  937. selector: "subscribeTo:",
  938. category: 'announcements',
  939. fn: function (anAnnouncer) {
  940. var self = this;
  941. return self;
  942. },
  943. args: ["anAnnouncer"],
  944. source: "subscribeTo: anAnnouncer",
  945. messageSends: [],
  946. referencedClasses: []
  947. }),
  948. smalltalk.HLWidget);
  949. smalltalk.addMethod(
  950. "_canBeOpenAsTab",
  951. smalltalk.method({
  952. selector: "canBeOpenAsTab",
  953. category: 'testing',
  954. fn: function () {
  955. var self = this;
  956. return false;
  957. },
  958. args: [],
  959. source: "canBeOpenAsTab\x0a\x09^ false",
  960. messageSends: [],
  961. referencedClasses: []
  962. }),
  963. smalltalk.HLWidget.klass);
  964. smalltalk.addMethod(
  965. "_openAsTab",
  966. smalltalk.method({
  967. selector: "openAsTab",
  968. category: 'accessing',
  969. fn: function () {
  970. var self = this;
  971. smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_addTab_", [smalltalk.send(smalltalk.HLTab || HLTab, "_on_labelled_", [smalltalk.send(self, "_new", []), smalltalk.send(self, "_tabLabel", [])])]);
  972. return self;
  973. },
  974. args: [],
  975. source: "openAsTab\x0a\x09HLManager current addTab: (HLTab on: self new labelled: self tabLabel)",
  976. messageSends: ["addTab:", "on:labelled:", "new", "tabLabel", "current"],
  977. referencedClasses: ["HLTab", "HLManager"]
  978. }),
  979. smalltalk.HLWidget.klass);
  980. smalltalk.addMethod(
  981. "_tabLabel",
  982. smalltalk.method({
  983. selector: "tabLabel",
  984. category: 'accessing',
  985. fn: function () {
  986. var self = this;
  987. return "Tab";
  988. },
  989. args: [],
  990. source: "tabLabel\x0a\x09^ 'Tab'",
  991. messageSends: [],
  992. referencedClasses: []
  993. }),
  994. smalltalk.HLWidget.klass);
  995. smalltalk.addMethod(
  996. "_tabPriority",
  997. smalltalk.method({
  998. selector: "tabPriority",
  999. category: 'accessing',
  1000. fn: function () {
  1001. var self = this;
  1002. return 500;
  1003. },
  1004. args: [],
  1005. source: "tabPriority\x0a\x09^ 500",
  1006. messageSends: [],
  1007. referencedClasses: []
  1008. }),
  1009. smalltalk.HLWidget.klass);
  1010. smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Core');
  1011. smalltalk.addClass('HLFocusableWidget', smalltalk.HLWidget, ['hiddenInput'], 'Helios-Core');
  1012. smalltalk.addMethod(
  1013. "_blur",
  1014. smalltalk.method({
  1015. selector: "blur",
  1016. category: 'events',
  1017. fn: function () {
  1018. var self = this;
  1019. smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_blur", []);
  1020. return self;
  1021. },
  1022. args: [],
  1023. source: "blur\x0a\x09hiddenInput asJQuery blur",
  1024. messageSends: ["blur", "asJQuery"],
  1025. referencedClasses: []
  1026. }),
  1027. smalltalk.HLFocusableWidget);
  1028. smalltalk.addMethod(
  1029. "_focus",
  1030. smalltalk.method({
  1031. selector: "focus",
  1032. category: 'events',
  1033. fn: function () {
  1034. var self = this;
  1035. smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_focus", []);
  1036. return self;
  1037. },
  1038. args: [],
  1039. source: "focus\x0a\x09hiddenInput asJQuery focus",
  1040. messageSends: ["focus", "asJQuery"],
  1041. referencedClasses: []
  1042. }),
  1043. smalltalk.HLFocusableWidget);
  1044. smalltalk.addMethod(
  1045. "_focusClass",
  1046. smalltalk.method({
  1047. selector: "focusClass",
  1048. category: 'accessing',
  1049. fn: function () {
  1050. var self = this;
  1051. return "focused";
  1052. },
  1053. args: [],
  1054. source: "focusClass\x0a\x09^ 'focused'",
  1055. messageSends: [],
  1056. referencedClasses: []
  1057. }),
  1058. smalltalk.HLFocusableWidget);
  1059. smalltalk.addMethod(
  1060. "_hasFocus",
  1061. smalltalk.method({
  1062. selector: "hasFocus",
  1063. category: 'events',
  1064. fn: function () {
  1065. var self = this;
  1066. var $1;
  1067. $1 = smalltalk.send(smalltalk.send(self['@rootDiv'], "_notNil", []), "_and_", [function () {return smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_hasClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
  1068. return $1;
  1069. },
  1070. args: [],
  1071. source: "hasFocus\x0a\x09^ rootDiv notNil and: [ rootDiv asJQuery hasClass: self focusClass ]",
  1072. messageSends: ["and:", "hasClass:", "focusClass", "asJQuery", "notNil"],
  1073. referencedClasses: []
  1074. }),
  1075. smalltalk.HLFocusableWidget);
  1076. smalltalk.addMethod(
  1077. "_renderContentOn_",
  1078. smalltalk.method({
  1079. selector: "renderContentOn:",
  1080. category: 'rendering',
  1081. fn: function (html) {
  1082. var self = this;
  1083. return self;
  1084. },
  1085. args: ["html"],
  1086. source: "renderContentOn: html",
  1087. messageSends: [],
  1088. referencedClasses: []
  1089. }),
  1090. smalltalk.HLFocusableWidget);
  1091. smalltalk.addMethod(
  1092. "_renderHiddenInputOn_",
  1093. smalltalk.method({
  1094. selector: "renderHiddenInputOn:",
  1095. category: 'rendering',
  1096. fn: function (html) {
  1097. var self = this;
  1098. var $1, $2;
  1099. $1 = smalltalk.send(html, "_input", []);
  1100. smalltalk.send($1, "_style_", ["position: absolute; left: -100000px;"]);
  1101. smalltalk.send($1, "_onBlur_", [function () {return smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_removeClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
  1102. $2 = smalltalk.send($1, "_onFocus_", [function () {return smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_addClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
  1103. self['@hiddenInput'] = $2;
  1104. return self;
  1105. },
  1106. args: ["html"],
  1107. source: "renderHiddenInputOn: html\x0a\x09hiddenInput := html input\x0a \x09style: 'position: absolute; left: -100000px;';\x0a \x09onBlur: [ rootDiv asJQuery removeClass: self focusClass ];\x0a onFocus: [ rootDiv asJQuery addClass: self focusClass ]",
  1108. messageSends: ["style:", "input", "onBlur:", "removeClass:", "focusClass", "asJQuery", "onFocus:", "addClass:"],
  1109. referencedClasses: []
  1110. }),
  1111. smalltalk.HLFocusableWidget);
  1112. smalltalk.addMethod(
  1113. "_renderOn_",
  1114. smalltalk.method({
  1115. selector: "renderOn:",
  1116. category: 'rendering',
  1117. fn: function (html) {
  1118. var self = this;
  1119. var $1, $2;
  1120. smalltalk.send(self, "_registerBindings", []);
  1121. smalltalk.send(self, "_renderHiddenInputOn_", [html]);
  1122. $1 = smalltalk.send(html, "_div", []);
  1123. smalltalk.send($1, "_class_", ["hl_widget"]);
  1124. smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_focus", []);}]);
  1125. $2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
  1126. self['@rootDiv'] = $2;
  1127. return self;
  1128. },
  1129. args: ["html"],
  1130. source: "renderOn: html\x0a\x09self registerBindings.\x0a\x09self renderHiddenInputOn: html.\x0a \x0a rootDiv := html div \x0a \x09class: 'hl_widget'; \x0a onClick: [ hiddenInput asJQuery focus ];\x0a with: [\x0a\x09\x09\x09self renderContentOn: html ]",
  1131. messageSends: ["registerBindings", "renderHiddenInputOn:", "class:", "div", "onClick:", "focus", "asJQuery", "with:", "renderContentOn:"],
  1132. referencedClasses: []
  1133. }),
  1134. smalltalk.HLFocusableWidget);
  1135. smalltalk.addClass('HLListWidget', smalltalk.HLFocusableWidget, ['items', 'selectedItem'], 'Helios-Core');
  1136. smalltalk.addMethod(
  1137. "_activateListItem_",
  1138. smalltalk.method({
  1139. selector: "activateListItem:",
  1140. category: 'actions',
  1141. fn: function (aListItem) {
  1142. var self = this;
  1143. var $1, $2, $3;
  1144. var parent;
  1145. var position;
  1146. $1 = smalltalk.send(aListItem, "_get_", [0]);
  1147. if (($receiver = $1) == nil || $receiver == undefined) {
  1148. return self;
  1149. } else {
  1150. }
  1151. position = aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1;
  1152. parent = smalltalk.send(aListItem, "_parent", []);
  1153. smalltalk.send(smalltalk.send(parent, "_children", []), "_removeClass_", ["active"]);
  1154. smalltalk.send(aListItem, "_addClass_", ["active"]);
  1155. $2 = smalltalk.send(smalltalk.send(smalltalk.send(aListItem, "_position", []), "_top", []), "__lt", [0]);
  1156. if (smalltalk.assert($2)) {
  1157. smalltalk.send(smalltalk.send(parent, "_get_", [0]), "_scrollTop_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(parent, "_get_", [0]), "_scrollTop", []), "__plus", [smalltalk.send(smalltalk.send(aListItem, "_position", []), "_top", [])]), "__minus", [10])]);
  1158. }
  1159. $3 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aListItem, "_position", []), "_top", []), "__plus", [smalltalk.send(aListItem, "_height", [])]), "__gt", [smalltalk.send(parent, "_height", [])]);
  1160. if (smalltalk.assert($3)) {
  1161. smalltalk.send(smalltalk.send(parent, "_get_", [0]), "_scrollTop_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(parent, "_get_", [0]), "_scrollTop", []), "__plus", [smalltalk.send(aListItem, "_height", [])]), "__minus", [smalltalk.send(smalltalk.send(parent, "_height", []), "__minus", [smalltalk.send(smalltalk.send(aListItem, "_position", []), "_top", [])])]), "__plus", [10])]);
  1162. }
  1163. smalltalk.send(self, "_selectItem_", [smalltalk.send(smalltalk.send(self, "_items", []), "_at_", [smalltalk.send(smalltalk.send(aListItem, "_attr_", ["list-data"]), "_asNumber", [])])]);
  1164. return self;
  1165. },
  1166. args: ["aListItem"],
  1167. source: "activateListItem: aListItem\x0a\x09| parent position |\x0a \x0a\x09(aListItem get: 0) ifNil: [ ^self ].\x0a\x0a\x09<position = aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1>.\x0a\x0a parent := aListItem parent.\x0a\x09parent children removeClass: 'active'.\x0a\x09aListItem addClass: 'active'.\x0a \x0a \x22Move the scrollbar to show the active element\x22\x0a aListItem position top < 0 ifTrue: [\x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem position top - 10) ].\x0a aListItem position top + aListItem height > parent height ifTrue: [ \x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem height - (parent height - aListItem position top)) +10 ].\x0a \x0a \x22Activate the corresponding item\x22\x0a self selectItem: (self items at: (aListItem attr: 'list-data') asNumber)",
  1168. messageSends: ["ifNil:", "get:", "parent", "removeClass:", "children", "addClass:", "ifTrue:", "scrollTop:", "-", "+", "top", "position", "scrollTop", "<", "height", ">", "selectItem:", "at:", "asNumber", "attr:", "items"],
  1169. referencedClasses: []
  1170. }),
  1171. smalltalk.HLListWidget);
  1172. smalltalk.addMethod(
  1173. "_cssClassForItem_",
  1174. smalltalk.method({
  1175. selector: "cssClassForItem:",
  1176. category: 'accessing',
  1177. fn: function (anObject) {
  1178. var self = this;
  1179. var $2, $1;
  1180. $2 = smalltalk.send(smalltalk.send(self, "_selectedItem", []), "__eq", [anObject]);
  1181. if (smalltalk.assert($2)) {
  1182. $1 = "active";
  1183. } else {
  1184. $1 = "inactive";
  1185. }
  1186. return $1;
  1187. },
  1188. args: ["anObject"],
  1189. source: "cssClassForItem: anObject\x0a\x09^ self selectedItem = anObject\x0a\x09\x09\x09ifTrue: [ 'active' ]\x0a\x09\x09\x09ifFalse: [ 'inactive' ]",
  1190. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem"],
  1191. referencedClasses: []
  1192. }),
  1193. smalltalk.HLListWidget);
  1194. smalltalk.addMethod(
  1195. "_iconForItem_",
  1196. smalltalk.method({
  1197. selector: "iconForItem:",
  1198. category: 'accessing',
  1199. fn: function (anObject) {
  1200. var self = this;
  1201. return "";
  1202. },
  1203. args: ["anObject"],
  1204. source: "iconForItem: anObject\x0a\x09^ ''",
  1205. messageSends: [],
  1206. referencedClasses: []
  1207. }),
  1208. smalltalk.HLListWidget);
  1209. smalltalk.addMethod(
  1210. "_initializeItems",
  1211. smalltalk.method({
  1212. selector: "initializeItems",
  1213. category: 'initializing',
  1214. fn: function () {
  1215. var self = this;
  1216. var $1;
  1217. self['@items'] = [];
  1218. $1 = self['@items'];
  1219. return $1;
  1220. },
  1221. args: [],
  1222. source: "initializeItems\x0a\x09^ items := #()",
  1223. messageSends: [],
  1224. referencedClasses: []
  1225. }),
  1226. smalltalk.HLListWidget);
  1227. smalltalk.addMethod(
  1228. "_items",
  1229. smalltalk.method({
  1230. selector: "items",
  1231. category: 'accessing',
  1232. fn: function () {
  1233. var self = this;
  1234. var $1;
  1235. if (($receiver = self['@items']) == nil || $receiver == undefined) {
  1236. $1 = smalltalk.send(self, "_initializeItems", []);
  1237. } else {
  1238. $1 = self['@items'];
  1239. }
  1240. return $1;
  1241. },
  1242. args: [],
  1243. source: "items\x0a\x09^ items ifNil: [ self initializeItems ]",
  1244. messageSends: ["ifNil:", "initializeItems"],
  1245. referencedClasses: []
  1246. }),
  1247. smalltalk.HLListWidget);
  1248. smalltalk.addMethod(
  1249. "_items_",
  1250. smalltalk.method({
  1251. selector: "items:",
  1252. category: 'accessing',
  1253. fn: function (aCollection) {
  1254. var self = this;
  1255. self['@items'] = aCollection;
  1256. return self;
  1257. },
  1258. args: ["aCollection"],
  1259. source: "items: aCollection\x0a\x09items := aCollection",
  1260. messageSends: [],
  1261. referencedClasses: []
  1262. }),
  1263. smalltalk.HLListWidget);
  1264. smalltalk.addMethod(
  1265. "_renderButtonsOn_",
  1266. smalltalk.method({
  1267. selector: "renderButtonsOn:",
  1268. category: 'rendering',
  1269. fn: function (html) {
  1270. var self = this;
  1271. return self;
  1272. },
  1273. args: ["html"],
  1274. source: "renderButtonsOn: html",
  1275. messageSends: [],
  1276. referencedClasses: []
  1277. }),
  1278. smalltalk.HLListWidget);
  1279. smalltalk.addMethod(
  1280. "_renderContentOn_",
  1281. smalltalk.method({
  1282. selector: "renderContentOn:",
  1283. category: 'rendering',
  1284. fn: function (html) {
  1285. var self = this;
  1286. var $1, $2, $3, $4;
  1287. $1 = smalltalk.send(html, "_ul", []);
  1288. smalltalk.send($1, "_class_", ["nav nav-pills nav-stacked"]);
  1289. $2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(self, "_renderListOn_", [html]);}]);
  1290. $3 = smalltalk.send(html, "_div", []);
  1291. smalltalk.send($3, "_class_", ["pane_actions form-actions"]);
  1292. $4 = smalltalk.send($3, "_with_", [function () {return smalltalk.send(self, "_renderButtonsOn_", [html]);}]);
  1293. smalltalk.send(self, "_setupKeyBindings", []);
  1294. return self;
  1295. },
  1296. args: ["html"],
  1297. source: "renderContentOn: html\x0a\x09html ul \x0a \x09class: 'nav nav-pills nav-stacked';\x0a with: [ self renderListOn: html ].\x0a html div class: 'pane_actions form-actions'; with: [\x0a \x09self renderButtonsOn: html ].\x0a \x0a self setupKeyBindings",
  1298. messageSends: ["class:", "ul", "with:", "renderListOn:", "div", "renderButtonsOn:", "setupKeyBindings"],
  1299. referencedClasses: []
  1300. }),
  1301. smalltalk.HLListWidget);
  1302. smalltalk.addMethod(
  1303. "_renderItem_on_",
  1304. smalltalk.method({
  1305. selector: "renderItem:on:",
  1306. category: 'rendering',
  1307. fn: function (anObject, html) {
  1308. var self = this;
  1309. var $2, $3, $1;
  1310. var li;
  1311. li = smalltalk.send(html, "_li", []);
  1312. smalltalk.send(li, "_class_", [smalltalk.send(self, "_cssClassForItem_", [anObject])]);
  1313. smalltalk.send(li, "_at_put_", ["list-data", smalltalk.send(smalltalk.send(smalltalk.send(self, "_items", []), "_indexOf_", [anObject]), "_asString", [])]);
  1314. $1 = smalltalk.send(li, "_with_", [function () {$2 = smalltalk.send(html, "_a", []);smalltalk.send($2, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_tag_", ["i"]), "_class_", [smalltalk.send(self, "_iconForItem_", [anObject])]);return smalltalk.send(self, "_renderItemLabel_on_", [anObject, html]);}]);$3 = smalltalk.send($2, "_onClick_", [function () {return smalltalk.send(self, "_activateListItem_", [smalltalk.send(li, "_asJQuery", [])]);}]);return $3;}]);
  1315. return self;
  1316. },
  1317. args: ["anObject", "html"],
  1318. source: "renderItem: anObject on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a li\x0a \x09class: (self cssClassForItem: anObject);\x0a at: 'list-data' put: (self items indexOf: anObject) asString;\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self iconForItem: anObject).\x0a \x09\x09\x09\x09\x09self renderItemLabel: anObject on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li asJQuery ] ]",
  1319. messageSends: ["li", "class:", "cssClassForItem:", "at:put:", "asString", "indexOf:", "items", "with:", "iconForItem:", "tag:", "renderItemLabel:on:", "a", "onClick:", "activateListItem:", "asJQuery"],
  1320. referencedClasses: []
  1321. }),
  1322. smalltalk.HLListWidget);
  1323. smalltalk.addMethod(
  1324. "_renderItemLabel_on_",
  1325. smalltalk.method({
  1326. selector: "renderItemLabel:on:",
  1327. category: 'rendering',
  1328. fn: function (anObject, html) {
  1329. var self = this;
  1330. smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_asString", [])]);
  1331. return self;
  1332. },
  1333. args: ["anObject", "html"],
  1334. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject asString",
  1335. messageSends: ["with:", "asString"],
  1336. referencedClasses: []
  1337. }),
  1338. smalltalk.HLListWidget);
  1339. smalltalk.addMethod(
  1340. "_renderListOn_",
  1341. smalltalk.method({
  1342. selector: "renderListOn:",
  1343. category: 'rendering',
  1344. fn: function (html) {
  1345. var self = this;
  1346. smalltalk.send(smalltalk.send(self, "_items", []), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_on_", [each, html]);}]);
  1347. return self;
  1348. },
  1349. args: ["html"],
  1350. source: "renderListOn: html\x0a\x09self items do: [ :each | \x0a \x09self renderItem: each on: html ]",
  1351. messageSends: ["do:", "renderItem:on:", "items"],
  1352. referencedClasses: []
  1353. }),
  1354. smalltalk.HLListWidget);
  1355. smalltalk.addMethod(
  1356. "_selectItem_",
  1357. smalltalk.method({
  1358. selector: "selectItem:",
  1359. category: 'actions',
  1360. fn: function (anObject) {
  1361. var self = this;
  1362. smalltalk.send(self, "_selectedItem_", [anObject]);
  1363. return self;
  1364. },
  1365. args: ["anObject"],
  1366. source: "selectItem: anObject\x0a\x09self selectedItem: anObject",
  1367. messageSends: ["selectedItem:"],
  1368. referencedClasses: []
  1369. }),
  1370. smalltalk.HLListWidget);
  1371. smalltalk.addMethod(
  1372. "_selectedItem",
  1373. smalltalk.method({
  1374. selector: "selectedItem",
  1375. category: 'accessing',
  1376. fn: function () {
  1377. var self = this;
  1378. return self['@selectedItem'];
  1379. },
  1380. args: [],
  1381. source: "selectedItem\x0a\x09^ selectedItem",
  1382. messageSends: [],
  1383. referencedClasses: []
  1384. }),
  1385. smalltalk.HLListWidget);
  1386. smalltalk.addMethod(
  1387. "_selectedItem_",
  1388. smalltalk.method({
  1389. selector: "selectedItem:",
  1390. category: 'accessing',
  1391. fn: function (anObject) {
  1392. var self = this;
  1393. self['@selectedItem'] = anObject;
  1394. return self;
  1395. },
  1396. args: ["anObject"],
  1397. source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
  1398. messageSends: [],
  1399. referencedClasses: []
  1400. }),
  1401. smalltalk.HLListWidget);
  1402. smalltalk.addMethod(
  1403. "_setupKeyBindings",
  1404. smalltalk.method({
  1405. selector: "setupKeyBindings",
  1406. category: 'events',
  1407. fn: function () {
  1408. var self = this;
  1409. var $1, $2, $3;
  1410. var next;
  1411. smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_unbind_", ["keydown"]);
  1412. smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_keydown_", [function (e) {var selected;selected = smalltalk.send(window, "_jQuery_", [".focused .nav-pills .active"]);$1 = smalltalk.send(smalltalk.send(e, "_which", []), "__eq", [38]);if (smalltalk.assert($1)) {smalltalk.send(self, "_activateListItem_", [smalltalk.send(selected, "_prev", [])]);}$2 = smalltalk.send(smalltalk.send(e, "_which", []), "__eq", [40]);if (smalltalk.assert($2)) {next = smalltalk.send(selected, "_next", []);next;$3 = smalltalk.send(next, "_get_", [0]);if (($receiver = $3) == nil || $receiver == undefined) {next = smalltalk.send(window, "_jQuery_", [".focused .nav-pills li:first-child"]);next;} else {$3;}return smalltalk.send(self, "_activateListItem_", [next]);}}]);
  1413. return self;
  1414. },
  1415. args: [],
  1416. source: "setupKeyBindings\x0a\x09| next |\x0a\x09hiddenInput asJQuery unbind: 'keydown'.\x0a\x0a\x09hiddenInput asJQuery keydown: [ :e | | selected |\x0a \x09selected := window jQuery: '.focused .nav-pills .active'.\x0a e which = 38 ifTrue: [ \x0a \x09self activateListItem: selected prev ].\x0a \x09e which = 40 ifTrue: [\x0a \x09next := selected next.\x0a (next get: 0) ifNil: [ next := window jQuery: '.focused .nav-pills li:first-child' ].\x0a\x09\x09\x09self activateListItem: next ] ]",
  1417. messageSends: ["unbind:", "asJQuery", "keydown:", "jQuery:", "ifTrue:", "activateListItem:", "prev", "=", "which", "next", "ifNil:", "get:"],
  1418. referencedClasses: []
  1419. }),
  1420. smalltalk.HLListWidget);
  1421. smalltalk.addClass('HLNavigationListWidget', smalltalk.HLListWidget, ['previous', 'next'], 'Helios-Core');
  1422. smalltalk.addMethod(
  1423. "_next",
  1424. smalltalk.method({
  1425. selector: "next",
  1426. category: 'accessing',
  1427. fn: function () {
  1428. var self = this;
  1429. return self['@next'];
  1430. },
  1431. args: [],
  1432. source: "next\x0a\x09^ next",
  1433. messageSends: [],
  1434. referencedClasses: []
  1435. }),
  1436. smalltalk.HLNavigationListWidget);
  1437. smalltalk.addMethod(
  1438. "_next_",
  1439. smalltalk.method({
  1440. selector: "next:",
  1441. category: 'accessing',
  1442. fn: function (aWidget) {
  1443. var self = this;
  1444. var $1;
  1445. self['@next'] = aWidget;
  1446. $1 = smalltalk.send(smalltalk.send(aWidget, "_previous", []), "__eq", [self]);
  1447. if (!smalltalk.assert($1)) {
  1448. smalltalk.send(aWidget, "_previous_", [self]);
  1449. }
  1450. return self;
  1451. },
  1452. args: ["aWidget"],
  1453. source: "next: aWidget\x0a\x09next := aWidget.\x0a aWidget previous = self ifFalse: [ aWidget previous: self ]",
  1454. messageSends: ["ifFalse:", "previous:", "=", "previous"],
  1455. referencedClasses: []
  1456. }),
  1457. smalltalk.HLNavigationListWidget);
  1458. smalltalk.addMethod(
  1459. "_nextFocus",
  1460. smalltalk.method({
  1461. selector: "nextFocus",
  1462. category: 'actions',
  1463. fn: function () {
  1464. var self = this;
  1465. var $1;
  1466. $1 = smalltalk.send(self, "_next", []);
  1467. if (($receiver = $1) == nil || $receiver == undefined) {
  1468. } else {
  1469. smalltalk.send(smalltalk.send(self, "_next", []), "_focus", []);
  1470. }
  1471. return self;
  1472. },
  1473. args: [],
  1474. source: "nextFocus\x0a\x09self next ifNotNil: [ self next focus ]",
  1475. messageSends: ["ifNotNil:", "focus", "next"],
  1476. referencedClasses: []
  1477. }),
  1478. smalltalk.HLNavigationListWidget);
  1479. smalltalk.addMethod(
  1480. "_previous",
  1481. smalltalk.method({
  1482. selector: "previous",
  1483. category: 'accessing',
  1484. fn: function () {
  1485. var self = this;
  1486. return self['@previous'];
  1487. },
  1488. args: [],
  1489. source: "previous\x0a\x09^ previous",
  1490. messageSends: [],
  1491. referencedClasses: []
  1492. }),
  1493. smalltalk.HLNavigationListWidget);
  1494. smalltalk.addMethod(
  1495. "_previous_",
  1496. smalltalk.method({
  1497. selector: "previous:",
  1498. category: 'accessing',
  1499. fn: function (aWidget) {
  1500. var self = this;
  1501. var $1;
  1502. self['@previous'] = aWidget;
  1503. $1 = smalltalk.send(smalltalk.send(aWidget, "_next", []), "__eq", [self]);
  1504. if (!smalltalk.assert($1)) {
  1505. smalltalk.send(aWidget, "_next_", [self]);
  1506. }
  1507. return self;
  1508. },
  1509. args: ["aWidget"],
  1510. source: "previous: aWidget\x0a\x09previous := aWidget.\x0a aWidget next = self ifFalse: [ aWidget next: self ]",
  1511. messageSends: ["ifFalse:", "next:", "=", "next"],
  1512. referencedClasses: []
  1513. }),
  1514. smalltalk.HLNavigationListWidget);
  1515. smalltalk.addMethod(
  1516. "_previousFocus",
  1517. smalltalk.method({
  1518. selector: "previousFocus",
  1519. category: 'actions',
  1520. fn: function () {
  1521. var self = this;
  1522. var $1;
  1523. $1 = smalltalk.send(self, "_previous", []);
  1524. if (($receiver = $1) == nil || $receiver == undefined) {
  1525. } else {
  1526. smalltalk.send(smalltalk.send(self, "_previous", []), "_focus", []);
  1527. }
  1528. return self;
  1529. },
  1530. args: [],
  1531. source: "previousFocus\x0a\x09self previous ifNotNil: [ self previous focus ]",
  1532. messageSends: ["ifNotNil:", "focus", "previous"],
  1533. referencedClasses: []
  1534. }),
  1535. smalltalk.HLNavigationListWidget);
  1536. smalltalk.addMethod(
  1537. "_setupKeyBindings",
  1538. smalltalk.method({
  1539. selector: "setupKeyBindings",
  1540. category: 'events',
  1541. fn: function () {
  1542. var self = this;
  1543. var $1, $2;
  1544. smalltalk.send(self, "_setupKeyBindings", [], smalltalk.HLListWidget);
  1545. smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_keydown_", [function (e) {$1 = smalltalk.send(smalltalk.send(e, "_which", []), "__eq", [39]);if (smalltalk.assert($1)) {smalltalk.send(self, "_nextFocus", []);}$2 = smalltalk.send(smalltalk.send(e, "_which", []), "__eq", [37]);if (smalltalk.assert($2)) {return smalltalk.send(self, "_previousFocus", []);}}]);
  1546. return self;
  1547. },
  1548. args: [],
  1549. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x0a\x09hiddenInput asJQuery keydown: [ :e |\x0a e which = 39 ifTrue: [ \x0a \x09self nextFocus ].\x0a\x09\x09e which = 37 ifTrue: [ \x0a \x09self previousFocus ] ]",
  1550. messageSends: ["setupKeyBindings", "keydown:", "ifTrue:", "nextFocus", "=", "which", "previousFocus", "asJQuery"],
  1551. referencedClasses: []
  1552. }),
  1553. smalltalk.HLNavigationListWidget);
  1554. smalltalk.addClass('HLManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'keyBinder', 'environment'], 'Helios-Core');
  1555. smalltalk.addMethod(
  1556. "_activate_",
  1557. smalltalk.method({
  1558. selector: "activate:",
  1559. category: 'actions',
  1560. fn: function (aTab) {
  1561. var self = this;
  1562. var $1;
  1563. smalltalk.send(smalltalk.send(self, "_keyBinder", []), "_flushBindings", []);
  1564. self['@activeTab'] = aTab;
  1565. smalltalk.send(self, "_refresh", []);
  1566. $1 = smalltalk.send(self, "_show_", [aTab]);
  1567. return self;
  1568. },
  1569. args: ["aTab"],
  1570. source: "activate: aTab\x0a\x09self keyBinder flushBindings.\x0a\x09activeTab := aTab.\x0a \x0a\x09self \x0a\x09\x09refresh;\x0a\x09\x09show: aTab",
  1571. messageSends: ["flushBindings", "keyBinder", "refresh", "show:"],
  1572. referencedClasses: []
  1573. }),
  1574. smalltalk.HLManager);
  1575. smalltalk.addMethod(
  1576. "_activeTab",
  1577. smalltalk.method({
  1578. selector: "activeTab",
  1579. category: 'accessing',
  1580. fn: function () {
  1581. var self = this;
  1582. return self['@activeTab'];
  1583. },
  1584. args: [],
  1585. source: "activeTab\x0a\x09^ activeTab",
  1586. messageSends: [],
  1587. referencedClasses: []
  1588. }),
  1589. smalltalk.HLManager);
  1590. smalltalk.addMethod(
  1591. "_addTab_",
  1592. smalltalk.method({
  1593. selector: "addTab:",
  1594. category: 'actions',
  1595. fn: function (aTab) {
  1596. var self = this;
  1597. smalltalk.send(smalltalk.send(self, "_tabs", []), "_add_", [aTab]);
  1598. smalltalk.send(self, "_activate_", [aTab]);
  1599. return self;
  1600. },
  1601. args: ["aTab"],
  1602. source: "addTab: aTab\x0a\x09self tabs add: aTab.\x0a self activate: aTab",
  1603. messageSends: ["add:", "tabs", "activate:"],
  1604. referencedClasses: []
  1605. }),
  1606. smalltalk.HLManager);
  1607. smalltalk.addMethod(
  1608. "_defaultEnvironment",
  1609. smalltalk.method({
  1610. selector: "defaultEnvironment",
  1611. category: 'defaults',
  1612. fn: function () {
  1613. var self = this;
  1614. var $1;
  1615. $1 = smalltalk.send(smalltalk.HLLocalEnvironment || HLLocalEnvironment, "_new", []);
  1616. return $1;
  1617. },
  1618. args: [],
  1619. source: "defaultEnvironment\x0a\x09^ HLLocalEnvironment new",
  1620. messageSends: ["new"],
  1621. referencedClasses: ["HLLocalEnvironment"]
  1622. }),
  1623. smalltalk.HLManager);
  1624. smalltalk.addMethod(
  1625. "_environment",
  1626. smalltalk.method({
  1627. selector: "environment",
  1628. category: 'accessing',
  1629. fn: function () {
  1630. var self = this;
  1631. var $1;
  1632. if (($receiver = self['@environment']) == nil || $receiver == undefined) {
  1633. self['@environment'] = smalltalk.send(self, "_defaultEnvironment", []);
  1634. $1 = self['@environment'];
  1635. } else {
  1636. $1 = self['@environment'];
  1637. }
  1638. return $1;
  1639. },
  1640. args: [],
  1641. source: "environment\x0a\x09\x22The default environment used by all Helios objects\x22\x0a \x0a\x09^ environment ifNil: [ environment := self defaultEnvironment ]",
  1642. messageSends: ["ifNil:", "defaultEnvironment"],
  1643. referencedClasses: []
  1644. }),
  1645. smalltalk.HLManager);
  1646. smalltalk.addMethod(
  1647. "_environment_",
  1648. smalltalk.method({
  1649. selector: "environment:",
  1650. category: 'accessing',
  1651. fn: function (anEnvironment) {
  1652. var self = this;
  1653. self['@environment'] = anEnvironment;
  1654. return self;
  1655. },
  1656. args: ["anEnvironment"],
  1657. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  1658. messageSends: [],
  1659. referencedClasses: []
  1660. }),
  1661. smalltalk.HLManager);
  1662. smalltalk.addMethod(
  1663. "_initialize",
  1664. smalltalk.method({
  1665. selector: "initialize",
  1666. category: 'initialization',
  1667. fn: function () {
  1668. var self = this;
  1669. smalltalk.send(self, "_initialize", [], smalltalk.HLWidget);
  1670. smalltalk.send(smalltalk.send(self, "_keyBinder", []), "_setupEvents", []);
  1671. return self;
  1672. },
  1673. args: [],
  1674. source: "initialize\x0a\x09super initialize.\x0a self keyBinder setupEvents",
  1675. messageSends: ["initialize", "setupEvents", "keyBinder"],
  1676. referencedClasses: []
  1677. }),
  1678. smalltalk.HLManager);
  1679. smalltalk.addMethod(
  1680. "_keyBinder",
  1681. smalltalk.method({
  1682. selector: "keyBinder",
  1683. category: 'accessing',
  1684. fn: function () {
  1685. var self = this;
  1686. var $1;
  1687. if (($receiver = self['@keyBinder']) == nil || $receiver == undefined) {
  1688. self['@keyBinder'] = smalltalk.send(smalltalk.HLKeyBinder || HLKeyBinder, "_new", []);
  1689. $1 = self['@keyBinder'];
  1690. } else {
  1691. $1 = self['@keyBinder'];
  1692. }
  1693. return $1;
  1694. },
  1695. args: [],
  1696. source: "keyBinder\x0a\x09^ keyBinder ifNil: [ keyBinder := HLKeyBinder new ]",
  1697. messageSends: ["ifNil:", "new"],
  1698. referencedClasses: ["HLKeyBinder"]
  1699. }),
  1700. smalltalk.HLManager);
  1701. smalltalk.addMethod(
  1702. "_refresh",
  1703. smalltalk.method({
  1704. selector: "refresh",
  1705. category: 'rendering',
  1706. fn: function () {
  1707. var self = this;
  1708. smalltalk.send(smalltalk.send(window, "_jQuery_", [".navbar"]), "_remove", []);
  1709. smalltalk.send(smalltalk.send(window, "_jQuery_", ["#container"]), "_remove", []);
  1710. smalltalk.send(self, "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
  1711. return self;
  1712. },
  1713. args: [],
  1714. source: "refresh\x0a\x09(window jQuery: '.navbar') remove.\x0a\x09(window jQuery: '#container') remove.\x0a\x09self appendToJQuery: 'body' asJQuery",
  1715. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"],
  1716. referencedClasses: []
  1717. }),
  1718. smalltalk.HLManager);
  1719. smalltalk.addMethod(
  1720. "_removeTab_",
  1721. smalltalk.method({
  1722. selector: "removeTab:",
  1723. category: 'actions',
  1724. fn: function (aTab) {
  1725. var self = this;
  1726. var $1;
  1727. $1 = smalltalk.send(smalltalk.send(self, "_tabs", []), "_includes_", [aTab]);
  1728. if (!smalltalk.assert($1)) {
  1729. return self;
  1730. }
  1731. smalltalk.send(smalltalk.send(self, "_tabs", []), "_remove_", [aTab]);
  1732. smalltalk.send(self, "_refresh", []);
  1733. return self;
  1734. },
  1735. args: ["aTab"],
  1736. source: "removeTab: aTab\x0a\x09\x22Todo: activate the previously activated tab. Keep a history of tabs selection\x22\x0a\x0a\x09(self tabs includes: aTab) ifFalse: [ ^ self ].\x0a\x0a\x09self tabs remove: aTab.\x0a\x09self refresh",
  1737. messageSends: ["ifFalse:", "includes:", "tabs", "remove:", "refresh"],
  1738. referencedClasses: []
  1739. }),
  1740. smalltalk.HLManager);
  1741. smalltalk.addMethod(
  1742. "_renderAddOn_",
  1743. smalltalk.method({
  1744. selector: "renderAddOn:",
  1745. category: 'rendering',
  1746. fn: function (html) {
  1747. var self = this;
  1748. var $1, $3, $4, $5, $7, $8, $6, $2;
  1749. $1 = smalltalk.send(html, "_li", []);
  1750. smalltalk.send($1, "_class_", ["dropdown"]);
  1751. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_a", []);smalltalk.send($3, "_class_", ["dropdown-toggle"]);smalltalk.send($3, "_at_put_", ["data-toggle", "dropdown"]);$4 = smalltalk.send($3, "_with_", [function () {smalltalk.send(html, "_with_", ["Open..."]);return smalltalk.send(smalltalk.send(html, "_tag_", ["b"]), "_class_", ["caret"]);}]);$4;$5 = smalltalk.send(html, "_ul", []);smalltalk.send($5, "_class_", ["dropdown-menu"]);$6 = smalltalk.send($5, "_with_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.HLWidget || HLWidget, "_withAllSubclasses", []), "_select_", [function (each) {return smalltalk.send(each, "_canBeOpenAsTab", []);}]), "_sorted_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_tabPriority", []), "__lt", [smalltalk.send(b, "_tabPriority", [])]);}]), "_do_", [function (each) {return smalltalk.send(smalltalk.send(html, "_li", []), "_with_", [function () {$7 = smalltalk.send(html, "_a", []);smalltalk.send($7, "_with_", [smalltalk.send(each, "_tabLabel", [])]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(each, "_openAsTab", []);}]);return $8;}]);}]);}]);return $6;}]);
  1752. return self;
  1753. },
  1754. args: ["html"],
  1755. source: "renderAddOn: html\x0a html li \x0a \x09class: 'dropdown';\x0a with: [ \x0a\x09\x09\x09html a \x0a \x09\x09class: 'dropdown-toggle';\x0a \x09 \x09at: 'data-toggle' put: 'dropdown';\x0a \x09with: [ \x0a \x09\x09html with: 'Open...'.\x0a \x09\x09\x09\x09\x09(html tag: 'b') class: 'caret' ].\x0a html ul \x0a \x09\x09class: 'dropdown-menu';\x0a with: [\x0a \x09((HLWidget withAllSubclasses\x0a \x09select: [ :each | each canBeOpenAsTab ])\x0a sorted: [ :a :b | a tabPriority < b tabPriority ])\x0a do: [ :each |\x0a \x09\x09\x09\x09\x09\x09\x09html li with: [\x0a \x09\x09\x09html a \x0a \x09with: each tabLabel;\x0a \x09\x09\x09\x09\x09\x09\x09\x09onClick: [ each openAsTab ] ] ] ] ]",
  1756. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"],
  1757. referencedClasses: ["HLWidget"]
  1758. }),
  1759. smalltalk.HLManager);
  1760. smalltalk.addMethod(
  1761. "_renderContentOn_",
  1762. smalltalk.method({
  1763. selector: "renderContentOn:",
  1764. category: 'rendering',
  1765. fn: function (html) {
  1766. var self = this;
  1767. var $1, $3, $4, $2;
  1768. $1 = smalltalk.send(html, "_div", []);
  1769. smalltalk.send($1, "_class_", ["navbar navbar-fixed-top"]);
  1770. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["navbar-inner"]);$4 = smalltalk.send($3, "_with_", [function () {return smalltalk.send(self, "_renderTabsOn_", [html]);}]);return $4;}]);
  1771. smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["container"]);
  1772. return self;
  1773. },
  1774. args: ["html"],
  1775. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'navbar navbar-fixed-top';\x0a\x09\x09with: [ html div \x0a\x09\x09\x09class: 'navbar-inner';\x0a\x09\x09\x09with: [ self renderTabsOn: html ] ].\x0a\x09html div id: 'container'",
  1776. messageSends: ["class:", "div", "with:", "renderTabsOn:", "id:"],
  1777. referencedClasses: []
  1778. }),
  1779. smalltalk.HLManager);
  1780. smalltalk.addMethod(
  1781. "_renderTabsOn_",
  1782. smalltalk.method({
  1783. selector: "renderTabsOn:",
  1784. category: 'rendering',
  1785. fn: function (html) {
  1786. var self = this;
  1787. var $1, $3, $5, $4, $7, $8, $6, $2;
  1788. $1 = smalltalk.send(html, "_ul", []);
  1789. smalltalk.send($1, "_class_", ["nav"]);
  1790. $2 = smalltalk.send($1, "_with_", [function () {smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [function (each) {$3 = smalltalk.send(html, "_li", []);$5 = smalltalk.send(each, "_isActive", []);if (smalltalk.assert($5)) {$4 = "active";} else {$4 = "inactive";}smalltalk.send($3, "_class_", [$4]);$6 = smalltalk.send($3, "_with_", [function () {$7 = smalltalk.send(html, "_a", []);smalltalk.send($7, "_with_", [function () {smalltalk.send(smalltalk.send(smalltalk.send(html, "_tag_", ["i"]), "_class_", ["icon-remove-circle"]), "_onClick_", [function () {return smalltalk.send(self, "_removeTab_", [each]);}]);return smalltalk.send(html, "_with_", [smalltalk.send(each, "_label", [])]);}]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(each, "_activate", []);}]);return $8;}]);return $6;}]);return smalltalk.send(self, "_renderAddOn_", [html]);}]);
  1791. return self;
  1792. },
  1793. args: ["html"],
  1794. source: "renderTabsOn: html\x0a\x09html ul \x0a\x09\x09class: 'nav';\x0a\x09\x09with: [ \x0a \x09self tabs do: [ :each |\x0a\x09\x09\x09\x09html li \x0a\x09\x09\x09\x09\x09class: (each isActive ifTrue: [ 'active' ] ifFalse: [ 'inactive' ]);\x0a\x09\x09\x09\x09\x09with: [\x0a\x09\x09\x09\x09\x09\x09html a\x0a\x09\x09\x09\x09\x09\x09\x09with: [\x0a \x09\x09\x09\x09\x09\x09\x09((html tag: 'i') class: 'icon-remove-circle')\x0a \x09\x09\x09\x09\x09\x09\x09\x09\x09onClick: [ self removeTab: each ].\x0a \x09html with: each label ];\x0a\x09\x09\x09\x09\x09\x09\x09onClick: [ each activate ] ] ].\x0a\x09\x09\x09self renderAddOn: html ]",
  1795. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "label", "a", "activate", "tabs", "renderAddOn:"],
  1796. referencedClasses: []
  1797. }),
  1798. smalltalk.HLManager);
  1799. smalltalk.addMethod(
  1800. "_show_",
  1801. smalltalk.method({
  1802. selector: "show:",
  1803. category: 'rendering',
  1804. fn: function (aTab) {
  1805. var self = this;
  1806. smalltalk.send(smalltalk.send(window, "_jQuery_", ["#container"]), "_empty", []);
  1807. smalltalk.send(smalltalk.send(aTab, "_widget", []), "_appendToJQuery_", [smalltalk.send("#container", "_asJQuery", [])]);
  1808. return self;
  1809. },
  1810. args: ["aTab"],
  1811. source: "show: aTab\x0a\x09(window jQuery: '#container') empty.\x0a\x09aTab widget appendToJQuery: '#container' asJQuery",
  1812. messageSends: ["empty", "jQuery:", "appendToJQuery:", "asJQuery", "widget"],
  1813. referencedClasses: []
  1814. }),
  1815. smalltalk.HLManager);
  1816. smalltalk.addMethod(
  1817. "_tabs",
  1818. smalltalk.method({
  1819. selector: "tabs",
  1820. category: 'accessing',
  1821. fn: function () {
  1822. var self = this;
  1823. var $1;
  1824. if (($receiver = self['@tabs']) == nil || $receiver == undefined) {
  1825. self['@tabs'] = smalltalk.send(smalltalk.OrderedCollection || OrderedCollection, "_new", []);
  1826. $1 = self['@tabs'];
  1827. } else {
  1828. $1 = self['@tabs'];
  1829. }
  1830. return $1;
  1831. },
  1832. args: [],
  1833. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := OrderedCollection new ]",
  1834. messageSends: ["ifNil:", "new"],
  1835. referencedClasses: ["OrderedCollection"]
  1836. }),
  1837. smalltalk.HLManager);
  1838. smalltalk.HLManager.klass.iVarNames = ['current'];
  1839. smalltalk.addMethod(
  1840. "_current",
  1841. smalltalk.method({
  1842. selector: "current",
  1843. category: 'accessing',
  1844. fn: function () {
  1845. var self = this;
  1846. var $1;
  1847. if (($receiver = self['@current']) == nil || $receiver == undefined) {
  1848. self['@current'] = smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  1849. $1 = self['@current'];
  1850. } else {
  1851. $1 = self['@current'];
  1852. }
  1853. return $1;
  1854. },
  1855. args: [],
  1856. source: "current\x0a\x09^ current ifNil: [ current := self basicNew initialize ]",
  1857. messageSends: ["ifNil:", "initialize", "basicNew"],
  1858. referencedClasses: []
  1859. }),
  1860. smalltalk.HLManager.klass);
  1861. smalltalk.addMethod(
  1862. "_initialize",
  1863. smalltalk.method({
  1864. selector: "initialize",
  1865. category: 'initialization',
  1866. fn: function () {
  1867. var self = this;
  1868. smalltalk.send(smalltalk.send(self, "_current", []), "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
  1869. return self;
  1870. },
  1871. args: [],
  1872. source: "initialize\x0a\x09self current appendToJQuery: 'body' asJQuery",
  1873. messageSends: ["appendToJQuery:", "asJQuery", "current"],
  1874. referencedClasses: []
  1875. }),
  1876. smalltalk.HLManager.klass);
  1877. smalltalk.addMethod(
  1878. "_new",
  1879. smalltalk.method({
  1880. selector: "new",
  1881. category: 'instance creation',
  1882. fn: function () {
  1883. var self = this;
  1884. smalltalk.send(self, "_shouldNotImplement", []);
  1885. return self;
  1886. },
  1887. args: [],
  1888. source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
  1889. messageSends: ["shouldNotImplement"],
  1890. referencedClasses: []
  1891. }),
  1892. smalltalk.HLManager.klass);
  1893. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Core');
  1894. smalltalk.addMethod(
  1895. "_canBeOpenAsTab",
  1896. smalltalk.method({
  1897. selector: "canBeOpenAsTab",
  1898. category: 'testing',
  1899. fn: function () {
  1900. var self = this;
  1901. return true;
  1902. },
  1903. args: [],
  1904. source: "canBeOpenAsTab\x0a\x09^ true",
  1905. messageSends: [],
  1906. referencedClasses: []
  1907. }),
  1908. smalltalk.HLSUnit.klass);
  1909. smalltalk.addMethod(
  1910. "_tabLabel",
  1911. smalltalk.method({
  1912. selector: "tabLabel",
  1913. category: 'accessing',
  1914. fn: function () {
  1915. var self = this;
  1916. return "SUnit";
  1917. },
  1918. args: [],
  1919. source: "tabLabel\x0a\x09^ 'SUnit'",
  1920. messageSends: [],
  1921. referencedClasses: []
  1922. }),
  1923. smalltalk.HLSUnit.klass);
  1924. smalltalk.addMethod(
  1925. "_tabPriority",
  1926. smalltalk.method({
  1927. selector: "tabPriority",
  1928. category: 'accessing',
  1929. fn: function () {
  1930. var self = this;
  1931. return 1000;
  1932. },
  1933. args: [],
  1934. source: "tabPriority\x0a\x09^ 1000",
  1935. messageSends: [],
  1936. referencedClasses: []
  1937. }),
  1938. smalltalk.HLSUnit.klass);
  1939. smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
  1940. smalltalk.addMethod(
  1941. "_canBeOpenAsTab",
  1942. smalltalk.method({
  1943. selector: "canBeOpenAsTab",
  1944. category: 'testing',
  1945. fn: function () {
  1946. var self = this;
  1947. return true;
  1948. },
  1949. args: [],
  1950. source: "canBeOpenAsTab\x0a\x09^ true",
  1951. messageSends: [],
  1952. referencedClasses: []
  1953. }),
  1954. smalltalk.HLTranscript.klass);
  1955. smalltalk.addMethod(
  1956. "_tabLabel",
  1957. smalltalk.method({
  1958. selector: "tabLabel",
  1959. category: 'accessing',
  1960. fn: function () {
  1961. var self = this;
  1962. return "Transcript";
  1963. },
  1964. args: [],
  1965. source: "tabLabel\x0a\x09^ 'Transcript'",
  1966. messageSends: [],
  1967. referencedClasses: []
  1968. }),
  1969. smalltalk.HLTranscript.klass);
  1970. smalltalk.addMethod(
  1971. "_tabPriority",
  1972. smalltalk.method({
  1973. selector: "tabPriority",
  1974. category: 'accessing',
  1975. fn: function () {
  1976. var self = this;
  1977. return 600;
  1978. },
  1979. args: [],
  1980. source: "tabPriority\x0a\x09^ 600",
  1981. messageSends: [],
  1982. referencedClasses: []
  1983. }),
  1984. smalltalk.HLTranscript.klass);