1
0

Helios-Layout.js 19 KB

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