Helios-Layout.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. define("amber/Helios-Layout", ["amber_vm/smalltalk","amber_vm/nil","amber_vm/_st"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Helios-Layout');
  3. smalltalk.addClass('HLContainer', smalltalk.HLWidget, ['splitter'], 'Helios-Layout');
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "renderOn:",
  7. category: 'rendering',
  8. fn: function (html){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) {
  11. var $1,$2;
  12. $1=_st(html)._div();
  13. _st($1)._class_("tool_container");
  14. $2=_st($1)._with_(self._splitter());
  15. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLContainer)})},
  16. args: ["html"],
  17. source: "renderOn: html\x0a\x09html div \x0a \x09class: 'tool_container'; \x0a with: self splitter",
  18. messageSends: ["class:", "div", "with:", "splitter"],
  19. referencedClasses: []
  20. }),
  21. smalltalk.HLContainer);
  22. smalltalk.addMethod(
  23. smalltalk.method({
  24. selector: "splitter",
  25. category: 'accessing',
  26. fn: function (){
  27. var self=this;
  28. return smalltalk.withContext(function($ctx1) {
  29. var $1;
  30. $1=self["@splitter"];
  31. return $1;
  32. }, function($ctx1) {$ctx1.fill(self,"splitter",{},smalltalk.HLContainer)})},
  33. args: [],
  34. source: "splitter\x0a\x09^ splitter",
  35. messageSends: [],
  36. referencedClasses: []
  37. }),
  38. smalltalk.HLContainer);
  39. smalltalk.addMethod(
  40. smalltalk.method({
  41. selector: "splitter:",
  42. category: 'accessing',
  43. fn: function (aSplitter){
  44. var self=this;
  45. return smalltalk.withContext(function($ctx1) {
  46. self["@splitter"]=aSplitter;
  47. return self}, function($ctx1) {$ctx1.fill(self,"splitter:",{aSplitter:aSplitter},smalltalk.HLContainer)})},
  48. args: ["aSplitter"],
  49. source: "splitter: aSplitter\x0a\x09splitter := aSplitter",
  50. messageSends: [],
  51. referencedClasses: []
  52. }),
  53. smalltalk.HLContainer);
  54. smalltalk.addMethod(
  55. smalltalk.method({
  56. selector: "with:",
  57. category: 'instance creation',
  58. fn: function (aSplitter){
  59. var self=this;
  60. return smalltalk.withContext(function($ctx1) {
  61. var $2,$3,$1;
  62. $2=self._new();
  63. _st($2)._splitter_(aSplitter);
  64. $3=_st($2)._yourself();
  65. $1=$3;
  66. return $1;
  67. }, function($ctx1) {$ctx1.fill(self,"with:",{aSplitter:aSplitter},smalltalk.HLContainer.klass)})},
  68. args: ["aSplitter"],
  69. source: "with: aSplitter\x0a\x09^ self new \x0a \x09splitter: aSplitter; \x0a yourself",
  70. messageSends: ["splitter:", "new", "yourself"],
  71. referencedClasses: []
  72. }),
  73. smalltalk.HLContainer.klass);
  74. smalltalk.addClass('HLSplitter', smalltalk.Widget, ['firstWidget', 'secondWidget', 'firstPane', 'secondPane', 'splitter'], 'Helios-Layout');
  75. smalltalk.addMethod(
  76. smalltalk.method({
  77. selector: "cssClass",
  78. category: 'accessing',
  79. fn: function (){
  80. var self=this;
  81. return smalltalk.withContext(function($ctx1) {
  82. return "splitter";
  83. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLSplitter)})},
  84. args: [],
  85. source: "cssClass\x0a\x09^ 'splitter'",
  86. messageSends: [],
  87. referencedClasses: []
  88. }),
  89. smalltalk.HLSplitter);
  90. smalltalk.addMethod(
  91. smalltalk.method({
  92. selector: "firstWidget",
  93. category: 'accessing',
  94. fn: function (){
  95. var self=this;
  96. return smalltalk.withContext(function($ctx1) {
  97. var $1;
  98. $1=self["@firstWidget"];
  99. return $1;
  100. }, function($ctx1) {$ctx1.fill(self,"firstWidget",{},smalltalk.HLSplitter)})},
  101. args: [],
  102. source: "firstWidget\x0a\x09^ firstWidget",
  103. messageSends: [],
  104. referencedClasses: []
  105. }),
  106. smalltalk.HLSplitter);
  107. smalltalk.addMethod(
  108. smalltalk.method({
  109. selector: "firstWidget:",
  110. category: 'accessing',
  111. fn: function (aWidget){
  112. var self=this;
  113. return smalltalk.withContext(function($ctx1) {
  114. self["@firstWidget"]=aWidget;
  115. return self}, function($ctx1) {$ctx1.fill(self,"firstWidget:",{aWidget:aWidget},smalltalk.HLSplitter)})},
  116. args: ["aWidget"],
  117. source: "firstWidget: aWidget\x0a\x09firstWidget := aWidget",
  118. messageSends: [],
  119. referencedClasses: []
  120. }),
  121. smalltalk.HLSplitter);
  122. smalltalk.addMethod(
  123. smalltalk.method({
  124. selector: "isHeliosSplitter",
  125. category: 'testing',
  126. fn: function (){
  127. var self=this;
  128. return smalltalk.withContext(function($ctx1) {
  129. return true;
  130. }, function($ctx1) {$ctx1.fill(self,"isHeliosSplitter",{},smalltalk.HLSplitter)})},
  131. args: [],
  132. source: "isHeliosSplitter\x0a\x09^ true",
  133. messageSends: [],
  134. referencedClasses: []
  135. }),
  136. smalltalk.HLSplitter);
  137. smalltalk.addMethod(
  138. smalltalk.method({
  139. selector: "panesCssClass",
  140. category: 'rendering',
  141. fn: function (){
  142. var self=this;
  143. return smalltalk.withContext(function($ctx1) {
  144. return "panes";
  145. }, function($ctx1) {$ctx1.fill(self,"panesCssClass",{},smalltalk.HLSplitter)})},
  146. args: [],
  147. source: "panesCssClass\x0a\x09^ 'panes'",
  148. messageSends: [],
  149. referencedClasses: []
  150. }),
  151. smalltalk.HLSplitter);
  152. smalltalk.addMethod(
  153. smalltalk.method({
  154. selector: "renderOn:",
  155. category: 'rendering',
  156. fn: function (html){
  157. var self=this;
  158. return smalltalk.withContext(function($ctx1) {
  159. var $1,$3,$4,$5,$6,$2;
  160. $1=_st(html)._div();
  161. _st($1)._class_(self._panesCssClass());
  162. $2=_st($1)._with_((function(){
  163. return smalltalk.withContext(function($ctx2) {
  164. $3=_st(html)._div();
  165. _st($3)._class_("pane");
  166. $4=_st($3)._with_(self._firstWidget());
  167. self["@firstPane"]=$4;
  168. self["@firstPane"];
  169. self["@splitter"]=_st(_st(html)._div())._class_(self._cssClass());
  170. self["@splitter"];
  171. $5=_st(html)._div();
  172. _st($5)._class_("pane");
  173. $6=_st($5)._with_(self._secondWidget());
  174. self["@secondPane"]=$6;
  175. return self["@secondPane"];
  176. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  177. self._setupSplitter();
  178. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLSplitter)})},
  179. args: ["html"],
  180. source: "renderOn: html\x0a\x09html div class: self panesCssClass; with: [\x0a\x09\x09firstPane := html div class: 'pane'; with: self firstWidget.\x0a \x09splitter := html div class: self cssClass.\x0a \x09secondPane := html div class: 'pane'; with: self secondWidget ].\x0a \x0a\x09self setupSplitter",
  181. messageSends: ["class:", "panesCssClass", "div", "with:", "firstWidget", "cssClass", "secondWidget", "setupSplitter"],
  182. referencedClasses: []
  183. }),
  184. smalltalk.HLSplitter);
  185. smalltalk.addMethod(
  186. smalltalk.method({
  187. selector: "resize",
  188. category: 'rendering',
  189. fn: function (){
  190. var self=this;
  191. return smalltalk.withContext(function($ctx1) {
  192. return self}, function($ctx1) {$ctx1.fill(self,"resize",{},smalltalk.HLSplitter)})},
  193. args: [],
  194. source: "resize",
  195. messageSends: [],
  196. referencedClasses: []
  197. }),
  198. smalltalk.HLSplitter);
  199. smalltalk.addMethod(
  200. smalltalk.method({
  201. selector: "secondWidget",
  202. category: 'accessing',
  203. fn: function (){
  204. var self=this;
  205. return smalltalk.withContext(function($ctx1) {
  206. var $1;
  207. $1=self["@secondWidget"];
  208. return $1;
  209. }, function($ctx1) {$ctx1.fill(self,"secondWidget",{},smalltalk.HLSplitter)})},
  210. args: [],
  211. source: "secondWidget\x0a\x09^ secondWidget",
  212. messageSends: [],
  213. referencedClasses: []
  214. }),
  215. smalltalk.HLSplitter);
  216. smalltalk.addMethod(
  217. smalltalk.method({
  218. selector: "secondWidget:",
  219. category: 'accessing',
  220. fn: function (aWidget){
  221. var self=this;
  222. return smalltalk.withContext(function($ctx1) {
  223. self["@secondWidget"]=aWidget;
  224. return self}, function($ctx1) {$ctx1.fill(self,"secondWidget:",{aWidget:aWidget},smalltalk.HLSplitter)})},
  225. args: ["aWidget"],
  226. source: "secondWidget: aWidget\x0a\x09secondWidget := aWidget",
  227. messageSends: [],
  228. referencedClasses: []
  229. }),
  230. smalltalk.HLSplitter);
  231. smalltalk.addMethod(
  232. smalltalk.method({
  233. selector: "setupSplitter",
  234. category: 'rendering',
  235. fn: function (){
  236. var self=this;
  237. return smalltalk.withContext(function($ctx1) {
  238. return self}, function($ctx1) {$ctx1.fill(self,"setupSplitter",{},smalltalk.HLSplitter)})},
  239. args: [],
  240. source: "setupSplitter",
  241. messageSends: [],
  242. referencedClasses: []
  243. }),
  244. smalltalk.HLSplitter);
  245. smalltalk.addMethod(
  246. smalltalk.method({
  247. selector: "with:with:",
  248. category: 'instance creation',
  249. fn: function (aWidget,anotherWidget){
  250. var self=this;
  251. return smalltalk.withContext(function($ctx1) {
  252. var $2,$3,$1;
  253. $2=self._new();
  254. _st($2)._firstWidget_(aWidget);
  255. _st($2)._secondWidget_(anotherWidget);
  256. $3=_st($2)._yourself();
  257. $1=$3;
  258. return $1;
  259. }, function($ctx1) {$ctx1.fill(self,"with:with:",{aWidget:aWidget,anotherWidget:anotherWidget},smalltalk.HLSplitter.klass)})},
  260. args: ["aWidget", "anotherWidget"],
  261. source: "with: aWidget with: anotherWidget\x0a\x09^ self new\x0a \x09\x09firstWidget: aWidget;\x0a secondWidget: anotherWidget;\x0a yourself",
  262. messageSends: ["firstWidget:", "new", "secondWidget:", "yourself"],
  263. referencedClasses: []
  264. }),
  265. smalltalk.HLSplitter.klass);
  266. smalltalk.addClass('HLHorizontalSplitter', smalltalk.HLSplitter, [], 'Helios-Layout');
  267. smalltalk.addMethod(
  268. smalltalk.method({
  269. selector: "cssClass",
  270. category: 'accessing',
  271. fn: function (){
  272. var self=this;
  273. return smalltalk.withContext(function($ctx1) {
  274. var $1;
  275. $1=_st(smalltalk.HLHorizontalSplitter.superclass.fn.prototype._cssClass.apply(_st(self), [])).__comma(" horizontal");
  276. return $1;
  277. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLHorizontalSplitter)})},
  278. args: [],
  279. source: "cssClass\x0a\x09^ super cssClass, ' horizontal'",
  280. messageSends: [",", "cssClass"],
  281. referencedClasses: []
  282. }),
  283. smalltalk.HLHorizontalSplitter);
  284. smalltalk.addMethod(
  285. smalltalk.method({
  286. selector: "panesCssClass",
  287. category: 'accessing',
  288. fn: function (){
  289. var self=this;
  290. return smalltalk.withContext(function($ctx1) {
  291. var $1;
  292. $1=_st(smalltalk.HLHorizontalSplitter.superclass.fn.prototype._panesCssClass.apply(_st(self), [])).__comma(" horizontal");
  293. return $1;
  294. }, function($ctx1) {$ctx1.fill(self,"panesCssClass",{},smalltalk.HLHorizontalSplitter)})},
  295. args: [],
  296. source: "panesCssClass\x0a\x09^ super panesCssClass, ' horizontal'",
  297. messageSends: [",", "panesCssClass"],
  298. referencedClasses: []
  299. }),
  300. smalltalk.HLHorizontalSplitter);
  301. smalltalk.addMethod(
  302. smalltalk.method({
  303. selector: "resize",
  304. category: 'actions',
  305. fn: function (){
  306. var self=this;
  307. return smalltalk.withContext(function($ctx1) {
  308. self._resize_(_st(_st(self["@splitter"])._asJQuery())._css_("top"));
  309. return self}, function($ctx1) {$ctx1.fill(self,"resize",{},smalltalk.HLHorizontalSplitter)})},
  310. args: [],
  311. source: "resize\x0a\x09self resize: (splitter asJQuery css: 'top')",
  312. messageSends: ["resize:", "css:", "asJQuery"],
  313. referencedClasses: []
  314. }),
  315. smalltalk.HLHorizontalSplitter);
  316. smalltalk.addMethod(
  317. smalltalk.method({
  318. selector: "resize:",
  319. category: 'actions',
  320. fn: function (anInteger){
  321. var self=this;
  322. var container,size,offset,percentage;
  323. return smalltalk.withContext(function($ctx1) {
  324. container=_st(_st(self["@firstPane"])._asJQuery())._parent();
  325. offset=_st(_st(_st(self["@firstPane"])._asJQuery())._offset())._top();
  326. size=_st(container)._height();
  327. percentage=_st(_st(_st(size).__minus(_st(anInteger).__minus(offset))).__slash(size)).__star((100));
  328. percentage=(80)._min_(_st(percentage)._max_((20)));
  329. _st(_st(self["@firstPane"])._asJQuery())._css_put_("bottom",_st(_st(percentage)._asString()).__comma("%"));
  330. _st(_st(self["@splitter"])._asJQuery())._css_put_("top",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
  331. _st(_st(self["@secondPane"])._asJQuery())._css_put_("top",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
  332. return self}, function($ctx1) {$ctx1.fill(self,"resize:",{anInteger:anInteger,container:container,size:size,offset:offset,percentage:percentage},smalltalk.HLHorizontalSplitter)})},
  333. args: ["anInteger"],
  334. source: "resize: anInteger\x0a\x09| container size offset percentage |\x0a \x0a container := firstPane asJQuery parent.\x0a\x09offset := firstPane asJQuery offset top.\x0a size := container height.\x0a\x09\x0a\x09percentage := (size - (anInteger - offset)) / size * 100.\x0a\x09percentage := 80 min: (percentage max: 20).\x0a\x09\x0a firstPane asJQuery css: 'bottom' put: percentage asString, '%'.\x0a\x09\x0a\x09splitter asJQuery css: 'top' put: (100 - percentage) asString, '%'.\x0a\x09secondPane asJQuery css: 'top' put: (100 - percentage) asString, '%'",
  335. messageSends: ["parent", "asJQuery", "top", "offset", "height", "*", "/", "-", "min:", "max:", "css:put:", ",", "asString"],
  336. referencedClasses: []
  337. }),
  338. smalltalk.HLHorizontalSplitter);
  339. smalltalk.addMethod(
  340. smalltalk.method({
  341. selector: "setupSplitter",
  342. category: 'rendering',
  343. fn: function (){
  344. var self=this;
  345. return smalltalk.withContext(function($ctx1) {
  346. _st(_st(self["@splitter"])._asJQuery())._draggable_(smalltalk.HashedCollection._from_(["axis".__minus_gt("y"),"containment".__minus_gt(_st(_st(self["@splitter"])._asJQuery())._parent()),"helper".__minus_gt("clone"),"start".__minus_gt((function(e,ui){
  347. return smalltalk.withContext(function($ctx2) {
  348. return self._startResizing_(_st(ui)._helper());
  349. }, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1)})})),"drag".__minus_gt((function(e,ui){
  350. return smalltalk.withContext(function($ctx2) {
  351. return self._resize_(_st(_st(ui)._offset())._top());
  352. }, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1)})}))]));
  353. return self}, function($ctx1) {$ctx1.fill(self,"setupSplitter",{},smalltalk.HLHorizontalSplitter)})},
  354. args: [],
  355. source: "setupSplitter\x0a\x09splitter asJQuery draggable: #{ \x0a \x09'axis' -> 'y'. \x0a 'containment' -> splitter asJQuery parent.\x0a 'helper' -> 'clone'.\x0a 'start' -> [ :e :ui | self startResizing: ui helper ].\x0a 'drag' -> [ :e :ui | self resize: ui offset top ] }",
  356. messageSends: ["draggable:", "->", "parent", "asJQuery", "startResizing:", "helper", "resize:", "top", "offset"],
  357. referencedClasses: []
  358. }),
  359. smalltalk.HLHorizontalSplitter);
  360. smalltalk.addMethod(
  361. smalltalk.method({
  362. selector: "startResizing:",
  363. category: 'actions',
  364. fn: function (aSplitter){
  365. var self=this;
  366. return smalltalk.withContext(function($ctx1) {
  367. _st(aSplitter)._width_(_st(_st(self["@splitter"])._asJQuery())._width());
  368. return self}, function($ctx1) {$ctx1.fill(self,"startResizing:",{aSplitter:aSplitter},smalltalk.HLHorizontalSplitter)})},
  369. args: ["aSplitter"],
  370. source: "startResizing: aSplitter\x0a\x09aSplitter width: splitter asJQuery width",
  371. messageSends: ["width:", "width", "asJQuery"],
  372. referencedClasses: []
  373. }),
  374. smalltalk.HLHorizontalSplitter);
  375. smalltalk.addClass('HLVerticalSplitter', smalltalk.HLSplitter, [], 'Helios-Layout');
  376. smalltalk.addMethod(
  377. smalltalk.method({
  378. selector: "cssClass",
  379. category: 'accessing',
  380. fn: function (){
  381. var self=this;
  382. return smalltalk.withContext(function($ctx1) {
  383. var $1;
  384. $1=_st(smalltalk.HLVerticalSplitter.superclass.fn.prototype._cssClass.apply(_st(self), [])).__comma(" vertical");
  385. return $1;
  386. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},smalltalk.HLVerticalSplitter)})},
  387. args: [],
  388. source: "cssClass\x0a\x09^ super cssClass, ' vertical'",
  389. messageSends: [",", "cssClass"],
  390. referencedClasses: []
  391. }),
  392. smalltalk.HLVerticalSplitter);
  393. smalltalk.addMethod(
  394. smalltalk.method({
  395. selector: "panesCssClass",
  396. category: 'accessing',
  397. fn: function (){
  398. var self=this;
  399. return smalltalk.withContext(function($ctx1) {
  400. var $1;
  401. $1=_st(smalltalk.HLVerticalSplitter.superclass.fn.prototype._panesCssClass.apply(_st(self), [])).__comma(" vertical");
  402. return $1;
  403. }, function($ctx1) {$ctx1.fill(self,"panesCssClass",{},smalltalk.HLVerticalSplitter)})},
  404. args: [],
  405. source: "panesCssClass\x0a\x09^ super panesCssClass, ' vertical'",
  406. messageSends: [",", "panesCssClass"],
  407. referencedClasses: []
  408. }),
  409. smalltalk.HLVerticalSplitter);
  410. smalltalk.addMethod(
  411. smalltalk.method({
  412. selector: "resize",
  413. category: 'actions',
  414. fn: function (){
  415. var self=this;
  416. return smalltalk.withContext(function($ctx1) {
  417. self._resize_(_st(_st(self["@splitter"])._asJQuery())._css_("left"));
  418. return self}, function($ctx1) {$ctx1.fill(self,"resize",{},smalltalk.HLVerticalSplitter)})},
  419. args: [],
  420. source: "resize\x0a\x09self resize: (splitter asJQuery css: 'left')",
  421. messageSends: ["resize:", "css:", "asJQuery"],
  422. referencedClasses: []
  423. }),
  424. smalltalk.HLVerticalSplitter);
  425. smalltalk.addMethod(
  426. smalltalk.method({
  427. selector: "resize:",
  428. category: 'actions',
  429. fn: function (anInteger){
  430. var self=this;
  431. var container,size,offset,percentage;
  432. return smalltalk.withContext(function($ctx1) {
  433. container=_st(_st(self["@firstPane"])._asJQuery())._parent();
  434. offset=_st(_st(_st(self["@firstPane"])._asJQuery())._offset())._left();
  435. size=_st(container)._width();
  436. percentage=_st(_st(_st(size).__minus(_st(anInteger).__minus(offset))).__slash(size)).__star((100));
  437. percentage=(80)._min_(_st(percentage)._max_((20)));
  438. _st(_st(self["@firstPane"])._asJQuery())._css_put_("right",_st(_st(percentage)._asString()).__comma("%"));
  439. _st(_st(self["@splitter"])._asJQuery())._css_put_("left",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
  440. _st(_st(self["@secondPane"])._asJQuery())._css_put_("left",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
  441. return self}, function($ctx1) {$ctx1.fill(self,"resize:",{anInteger:anInteger,container:container,size:size,offset:offset,percentage:percentage},smalltalk.HLVerticalSplitter)})},
  442. args: ["anInteger"],
  443. source: "resize: anInteger\x0a\x09| container size offset percentage |\x0a \x0a container := firstPane asJQuery parent.\x0a\x09offset := firstPane asJQuery offset left.\x0a size := container width.\x0a\x09\x0a\x09percentage := (size - (anInteger - offset)) / size * 100.\x0a\x09percentage := 80 min: (percentage max: 20).\x0a\x09\x0a firstPane asJQuery css: 'right' put: percentage asString, '%'.\x0a\x09\x0a\x09splitter asJQuery css: 'left' put: (100 - percentage) asString, '%'.\x0a\x09secondPane asJQuery css: 'left' put: (100 - percentage) asString, '%'",
  444. messageSends: ["parent", "asJQuery", "left", "offset", "width", "*", "/", "-", "min:", "max:", "css:put:", ",", "asString"],
  445. referencedClasses: []
  446. }),
  447. smalltalk.HLVerticalSplitter);
  448. smalltalk.addMethod(
  449. smalltalk.method({
  450. selector: "setupSplitter",
  451. category: 'rendering',
  452. fn: function (){
  453. var self=this;
  454. return smalltalk.withContext(function($ctx1) {
  455. _st(_st(self["@splitter"])._asJQuery())._draggable_(smalltalk.HashedCollection._from_(["axis".__minus_gt("x"),"containment".__minus_gt(_st(_st(self["@splitter"])._asJQuery())._parent()),"helper".__minus_gt("clone"),"start".__minus_gt((function(e,ui){
  456. return smalltalk.withContext(function($ctx2) {
  457. return self._startResizing_(_st(ui)._helper());
  458. }, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1)})})),"drag".__minus_gt((function(e,ui){
  459. return smalltalk.withContext(function($ctx2) {
  460. return self._resize_(_st(_st(ui)._offset())._left());
  461. }, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1)})}))]));
  462. return self}, function($ctx1) {$ctx1.fill(self,"setupSplitter",{},smalltalk.HLVerticalSplitter)})},
  463. args: [],
  464. source: "setupSplitter\x0a\x09splitter asJQuery draggable: #{ \x0a \x09'axis' -> 'x'. \x0a 'containment' -> splitter asJQuery parent.\x0a 'helper' -> 'clone'.\x0a 'start' -> [ :e :ui | self startResizing: ui helper ].\x0a 'drag' -> [ :e :ui | self resize: (ui offset left) ] }",
  465. messageSends: ["draggable:", "->", "parent", "asJQuery", "startResizing:", "helper", "resize:", "left", "offset"],
  466. referencedClasses: []
  467. }),
  468. smalltalk.HLVerticalSplitter);
  469. smalltalk.addMethod(
  470. smalltalk.method({
  471. selector: "startResizing:",
  472. category: 'actions',
  473. fn: function (aSplitter){
  474. var self=this;
  475. return smalltalk.withContext(function($ctx1) {
  476. _st(aSplitter)._height_(_st(_st(self["@splitter"])._asJQuery())._height());
  477. return self}, function($ctx1) {$ctx1.fill(self,"startResizing:",{aSplitter:aSplitter},smalltalk.HLVerticalSplitter)})},
  478. args: ["aSplitter"],
  479. source: "startResizing: aSplitter\x0a\x09aSplitter height: splitter asJQuery height",
  480. messageSends: ["height:", "height", "asJQuery"],
  481. referencedClasses: []
  482. }),
  483. smalltalk.HLVerticalSplitter);
  484. smalltalk.addMethod(
  485. smalltalk.method({
  486. selector: "isHeliosSplitter",
  487. category: '*Helios-Layout',
  488. fn: function (){
  489. var self=this;
  490. return smalltalk.withContext(function($ctx1) {
  491. return false;
  492. }, function($ctx1) {$ctx1.fill(self,"isHeliosSplitter",{},smalltalk.Object)})},
  493. args: [],
  494. source: "isHeliosSplitter\x0a\x09^ false",
  495. messageSends: [],
  496. referencedClasses: []
  497. }),
  498. smalltalk.Object);
  499. });