David T. Lewis uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.92.mcz==================== Summary ====================
Name: ToolBuilder-Morphic-mt.92
Author: mt
Time: 15 June 2014, 8:49:17.404 am
UUID: afad358c-8192-f54c-b472-e89b457071de
Ancestors: ToolBuilder-Morphic-fbs.91
Added support for pluggable scroll panes as introduced in ToolBuilder-Kernel-mt.61
=============== Diff against ToolBuilder-Morphic-fbs.91 ===============
Item was added:
+ ----- Method: MorphicToolBuilder>>buildPluggableScrollPane: (in category 'widgets optional') -----
+ buildPluggableScrollPane: spec
+
+ | widget |
+ widget := self scrollPaneClass new.
+ widget model: spec model.
+ self register: widget id: spec name.
+
+ spec children
+ ifNotNil: [:obj |
+ "Create panel morph to scroll it."
+ widget morph: (self pluggablePanelSpec new
+ children: obj;
+ layout: spec layout;
+ frame: (0@0 corner: 1@1);
+ buildWith: self).
+ spec layout ~~ #proportional ifTrue: [
+ "Fix #spaceFill resizing because it does not make sense in scroll pane."
+ widget morph
+ hResizing: #shrinkWrap;
+ vResizing: #shrinkWrap.
+ widget morph submorphsDo: [:m |
+ m
+ extent: 100@100;
+ flag: #refactor; "mt: Restore orginial properties?"
+ hResizing: #rigid;
+ vResizing: #rigid]
+ ]]
+ ifNil: [spec morph
+ ifNotNil: [:m | widget morph: m]
+ ifNil: [widget morphClass: spec morphClass]].
+
+ self setFrame: spec frame in: widget.
+ parent ifNotNil: [self add: widget to: parent].
+
+ widget borderWidth: spec borderWidth.
+
+ spec hScrollBarPolicy caseOf: {
+ [#always] -> [widget alwaysShowHScrollBar: true].
+ [#never] -> [widget hideHScrollBarIndefinitely: true].
+ [#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded: true]}.
+ spec vScrollBarPolicy caseOf: {
+ [#always] -> [widget alwaysShowVScrollBar: true].
+ [#never] -> [widget hideVScrollBarIndefinitely: true].
+ [#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded: true]}.
+
+ ^ widget!
Item was added:
+ ----- Method: MorphicToolBuilder>>scrollPaneClass (in category 'widget classes') -----
+ scrollPaneClass
+ ^ PluggableScrollPane!