The Trunk: ToolBuilder-Morphic-mt.93.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ToolBuilder-Morphic-mt.93.mcz

commits-2
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.93.mcz

==================== Summary ====================

Name: ToolBuilder-Morphic-mt.93
Author: mt
Time: 13 August 2014, 10:55:11.88 am
UUID: b0f4fa7e-d60a-e944-98b3-341e5df2fb91
Ancestors: ToolBuilder-Morphic-mt.92

Added support for pluggable scroll panes as introduced in ToolBuilder-Kernel-mt.62 (merged from inbox)

=============== 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!