The Inbox: ToolBuilder-Morphic-mt.92.mcz

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

The Inbox: ToolBuilder-Morphic-mt.92.mcz

commits-2
A new version of ToolBuilder-Morphic was added to project The Inbox:
http://source.squeak.org/inbox/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!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: ToolBuilder-Morphic-mt.92.mcz

Tobias Pape
Any objections to me moving this patch-set to trunk?

Best
        -Tobias

On 15.06.2014, at 06:49, [hidden email] wrote:

> A new version of ToolBuilder-Morphic was added to project The Inbox:
> http://source.squeak.org/inbox/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!
>
>



signature.asc (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: ToolBuilder-Morphic-mt.92.mcz

David T. Lewis
I have not tried it yet, but it looks perfectly reasonable to me, so +1

Dave

On Sun, Jun 15, 2014 at 06:28:33PM +0200, Tobias Pape wrote:

> Any objections to me moving this patch-set to trunk?
>
> Best
> -Tobias
>
> On 15.06.2014, at 06:49, [hidden email] wrote:
>
> > A new version of ToolBuilder-Morphic was added to project The Inbox:
> > http://source.squeak.org/inbox/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!
> >
> >
>



>