Helios-Layout.js 19 KB

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