Helios-Layout.js 19 KB

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