The Trunk: Morphic-kfr.1048.mcz

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

The Trunk: Morphic-kfr.1048.mcz

commits-2
Karl Ramberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-kfr.1048.mcz

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

Name: Morphic-kfr.1048
Author: kfr
Time: 19 November 2015, 9:00:00.723 pm
UUID: 63b86f93-377e-4fb1-a338-3968d13dce13
Ancestors: Morphic-mt.1047

ProgressMorph and ProgressBarMorph are not used as widgets. Moved to MorphicExtras-Obsolete

=============== Diff against Morphic-mt.1047 ===============

Item was removed:
- BorderedMorph subclass: #ProgressBarMorph
- instanceVariableNames: 'value progressColor lastValue'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Morphic-Widgets'!

Item was removed:
- ----- Method: ProgressBarMorph>>addCustomMenuItems:hand: (in category 'menu') -----
- addCustomMenuItems: aCustomMenu hand: aHandMorph
- super addCustomMenuItems: aCustomMenu hand: aHandMorph.
- aCustomMenu addList: {
- {'progress color...' translated. #changeProgressColor:}.
- {'progress value...' translated. #changeProgressValue:}.
- }!

Item was removed:
- ----- Method: ProgressBarMorph>>changeProgressColor: (in category 'menu') -----
- changeProgressColor: evt
- | aHand |
- aHand := evt ifNotNil: [evt hand] ifNil: [self primaryHand].
- self changeColorTarget: self selector: #progressColor: originalColor: self progressColor hand: aHand.!

Item was removed:
- ----- Method: ProgressBarMorph>>changeProgressValue: (in category 'menu') -----
- changeProgressValue: evt
- | answer |
- answer := UIManager default
- request: 'Enter new value (0 - 1.0)'
- initialAnswer: self value contents asString.
- answer isEmptyOrNil ifTrue: [^ self].
- self value contents: answer asNumber!

Item was removed:
- ----- Method: ProgressBarMorph>>drawOn: (in category 'drawing') -----
- drawOn: aCanvas
- | width inner |
- super drawOn: aCanvas.
- inner := self innerBounds.
- width := (inner width * lastValue) truncated min: inner width.
- aCanvas fillRectangle: (inner origin extent: width @ inner height) color: progressColor.!

Item was removed:
- ----- Method: ProgressBarMorph>>initialize (in category 'initialization') -----
- initialize
- super initialize.
- progressColor := Color green.
- self value: (ValueHolder new contents: 0.0).
- lastValue := 0.0!

Item was removed:
- ----- Method: ProgressBarMorph>>progressColor (in category 'accessing') -----
- progressColor
- ^progressColor!

Item was removed:
- ----- Method: ProgressBarMorph>>progressColor: (in category 'accessing') -----
- progressColor: aColor
- progressColor = aColor
- ifFalse:
- [progressColor := aColor.
- self changed]!

Item was removed:
- ----- Method: ProgressBarMorph>>update: (in category 'updating') -----
- update: aSymbol
- aSymbol == #contents
- ifTrue:
- [lastValue := value contents.
- self changed]!

Item was removed:
- ----- Method: ProgressBarMorph>>value (in category 'accessing') -----
- value
- ^value!

Item was removed:
- ----- Method: ProgressBarMorph>>value: (in category 'accessing') -----
- value: aModel
- value ifNotNil: [value removeDependent: self].
- value := aModel.
- value ifNotNil: [value addDependent: self]!

Item was removed:
- RectangleMorph subclass: #ProgressMorph
- instanceVariableNames: 'labelMorph subLabelMorph progress'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Morphic-Widgets'!

Item was removed:
- ----- Method: ProgressMorph class>>example (in category 'example') -----
- example
- "ProgressMorph example"
-
- | progress |
- progress := ProgressMorph label: 'Test progress'.
- progress subLabel: 'this is the subheading'.
- progress openInWorld.
- [10 timesRepeat:
- [(Delay forMilliseconds: 200) wait.
- progress incrDone: 0.1].
- progress delete] fork!

Item was removed:
- ----- Method: ProgressMorph class>>label: (in category 'instance creation') -----
- label: aString
- ^self new label: aString!

Item was removed:
- ----- Method: ProgressMorph>>done (in category 'accessing') -----
- done
- ^self progress value contents!

Item was removed:
- ----- Method: ProgressMorph>>done: (in category 'accessing') -----
- done: amountDone
- self progress value contents: ((amountDone min: 1.0) max: 0.0).
- self currentWorld displayWorld!

Item was removed:
- ----- Method: ProgressMorph>>fontOfPointSize: (in category 'private') -----
- fontOfPointSize: size
- ^ (TextConstants at: Preferences standardEToysFont familyName ifAbsent: [TextStyle default]) fontOfPointSize: size!

Item was removed:
- ----- Method: ProgressMorph>>incrDone: (in category 'accessing') -----
- incrDone: incrDone
- self done: self done + incrDone!

Item was removed:
- ----- Method: ProgressMorph>>initLabelMorph (in category 'initialization') -----
- initLabelMorph
- ^ labelMorph := StringMorph contents: '' font: (self fontOfPointSize: 14)!

Item was removed:
- ----- Method: ProgressMorph>>initProgressMorph (in category 'initialization') -----
- initProgressMorph
- progress := ProgressBarMorph new.
- progress borderWidth: 1.
- progress color: Color white.
- progress progressColor: Color gray.
- progress extent: 200 @ 15.
- !

Item was removed:
- ----- Method: ProgressMorph>>initSubLabelMorph (in category 'initialization') -----
- initSubLabelMorph
- ^ subLabelMorph := StringMorph contents: '' font: (self fontOfPointSize: 12)!

Item was removed:
- ----- Method: ProgressMorph>>initialize (in category 'initialization') -----
- initialize
- super initialize.
- self setupMorphs!

Item was removed:
- ----- Method: ProgressMorph>>label (in category 'accessing') -----
- label
- ^self labelMorph contents!

Item was removed:
- ----- Method: ProgressMorph>>label: (in category 'accessing') -----
- label: aString
- self labelMorph contents: aString.
- self currentWorld displayWorld!

Item was removed:
- ----- Method: ProgressMorph>>labelMorph (in category 'private') -----
- labelMorph
- ^labelMorph ifNil: [self initLabelMorph]!

Item was removed:
- ----- Method: ProgressMorph>>progress (in category 'accessing') -----
- progress
- ^progress ifNil: [self initProgressMorph]!

Item was removed:
- ----- Method: ProgressMorph>>setupMorphs (in category 'initialization') -----
- setupMorphs
- |  |
- self initProgressMorph.
- self
- layoutPolicy: TableLayout new;
- listDirection: #topToBottom;
- cellPositioning: #topCenter;
- listCentering: #center;
- hResizing: #shrinkWrap;
- vResizing: #shrinkWrap;
- color: Color transparent.
-
- self addMorphBack: self labelMorph.
- self addMorphBack: self subLabelMorph.
- self addMorphBack: self progress.
-
- self borderWidth: 2.
- self borderColor: Color black.
-
- self color: Color veryLightGray.
- self align: self fullBounds center with: Display boundingBox center
- !

Item was removed:
- ----- Method: ProgressMorph>>subLabel (in category 'accessing') -----
- subLabel
- ^self subLabelMorph contents!

Item was removed:
- ----- Method: ProgressMorph>>subLabel: (in category 'accessing') -----
- subLabel: aString
- self subLabelMorph contents: aString.
- self currentWorld displayWorld!

Item was removed:
- ----- Method: ProgressMorph>>subLabelMorph (in category 'private') -----
- subLabelMorph
- ^subLabelMorph ifNil: [self initSubLabelMorph]!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1048.mcz

marcel.taeumel
Why obsolete? Any application that may need a progress bar can use it.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1048.mcz

Karl Ramberg
All progress bar uses in image is SystemProgressMorph which is used from MorphicUIManager.

Best,
Karl

On Fri, Nov 20, 2015 at 9:10 AM, marcel.taeumel <[hidden email]> wrote:
Why obsolete? Any application that may need a progress bar can use it.

Best,
Marcel



--
View this message in context: http://forum.world.st/The-Trunk-Morphic-kfr-1048-mcz-tp4862058p4862149.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1048.mcz

marcel.taeumel
Imagine a wizard that wants to indicate progress to the user. Or a questionnaire. :)

Like this widget: http://doc.qt.io/qt-4.8/qprogressbar.html

Maybe we need a PluggableProgressBar. I understand that the ProgressBarMorph used to be used to show system progress. Nevertheless, such a widget can be valuable for any application.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1048.mcz

Karl Ramberg
Maybe it should be moved to MorphicExtras-Widgets ?

If it's in Morphic-Widgets it's seems like it's the standard progress widget, which it is not .

Best,
Karl


On Fri, Nov 20, 2015 at 9:49 PM, marcel.taeumel <[hidden email]> wrote:
Imagine a wizard that wants to indicate progress to the user. Or a
questionnaire. :)

Like this widget: http://doc.qt.io/qt-4.8/qprogressbar.html

Maybe we need a PluggableProgressBar. I understand that the ProgressBarMorph
used to be used to show system progress. Nevertheless, such a widget can be
valuable for any application.

Best,
Marcel



--
View this message in context: http://forum.world.st/The-Trunk-Morphic-kfr-1048-mcz-tp4862058p4862317.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1048.mcz

Tobias Pape

On 20.11.2015, at 23:37, karl ramberg <[hidden email]> wrote:

> Maybe it should be moved to MorphicExtras-Widgets ?
>
> If it's in Morphic-Widgets it's seems like it's the standard progress widget, which it is not .

It depends on what 'standard progress widget' means.

If it is the one I can just use in my mophic application, without anythin fancy, won't that be the 'standard widget'?
And the one opened during system progress (using that Progress Notification thingy) be the system progress widget, hence, 'non-standard' (but special) widget?

just my 2ct

Best regards
        -Tobias


>
> Best,
> Karl
>
>
> On Fri, Nov 20, 2015 at 9:49 PM, marcel.taeumel <[hidden email]> wrote:
> Imagine a wizard that wants to indicate progress to the user. Or a
> questionnaire. :)
>
> Like this widget: http://doc.qt.io/qt-4.8/qprogressbar.html
>
> Maybe we need a PluggableProgressBar. I understand that the ProgressBarMorph
> used to be used to show system progress. Nevertheless, such a widget can be
> valuable for any application.
>
> Best,
> Marcel
>
>
>
> --
> View this message in context: http://forum.world.st/The-Trunk-Morphic-kfr-1048-mcz-tp4862058p4862317.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1048.mcz

Karl Ramberg
ProgressMorph can by definition not be the standard widget since it is not used at all in the image.


Best,
Karl


On Fri, Nov 20, 2015 at 11:52 PM, Tobias Pape <[hidden email]> wrote:

On 20.11.2015, at 23:37, karl ramberg <[hidden email]> wrote:

> Maybe it should be moved to MorphicExtras-Widgets ?
>
> If it's in Morphic-Widgets it's seems like it's the standard progress widget, which it is not .

It depends on what 'standard progress widget' means.

If it is the one I can just use in my mophic application, without anythin fancy, won't that be the 'standard widget'?
And the one opened during system progress (using that Progress Notification thingy) be the system progress widget, hence, 'non-standard' (but special) widget?

just my 2ct

Best regards
        -Tobias


>
> Best,
> Karl
>
>
> On Fri, Nov 20, 2015 at 9:49 PM, marcel.taeumel <[hidden email]> wrote:
> Imagine a wizard that wants to indicate progress to the user. Or a
> questionnaire. :)
>
> Like this widget: http://doc.qt.io/qt-4.8/qprogressbar.html
>
> Maybe we need a PluggableProgressBar. I understand that the ProgressBarMorph
> used to be used to show system progress. Nevertheless, such a widget can be
> valuable for any application.
>
> Best,
> Marcel
>
>
>
> --
> View this message in context: http://forum.world.st/The-Trunk-Morphic-kfr-1048-mcz-tp4862058p4862317.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
>





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1048.mcz

Tobias Pape

On 21.11.2015, at 18:51, karl ramberg <[hidden email]> wrote:

> ProgressMorph can by definition not be the standard widget since it is not used at all in the image.
>

But we're talking about Applications that are not in the base image, aren't we?
It's like saying, "nobody in the Qt framework uses this widget, remove it", when
actually, the users cannot be expected _within_ the framework but rather as users of
the framework. Just because our bundled morphic tools/applications have no need
for such a progress bar, does not mean that non-base-image applications have neither.

Marcel made the case for a simple "questionnaire application" where you would want
to indicate progress throughout the questioning process. The system progress bar
would be unfit, as it is designed to be used modally (see examples of both progress morphs).

Don't get me wrong, I'm not making the case for keeping things (the ProgressMorph in this case)
just because, but to make sure we are not deprecating/obsoleting stuff that would
count as framework outlet point or "public widgets".


:)

Best regards
        -Tobias

PS: some other widgets that are unused in the base image
        JoysickMorph is only in Flaps
        MorphHierarchy (?)
        SelectedObjectThumbnail
        BackgroundMorph
        BasicButton
        (And others in the MorphicExtras-Widgets category)

>
> Best,
> Karl
>
>
> On Fri, Nov 20, 2015 at 11:52 PM, Tobias Pape <[hidden email]> wrote:
>
> On 20.11.2015, at 23:37, karl ramberg <[hidden email]> wrote:
>
> > Maybe it should be moved to MorphicExtras-Widgets ?
> >
> > If it's in Morphic-Widgets it's seems like it's the standard progress widget, which it is not .
>
> It depends on what 'standard progress widget' means.
>
> If it is the one I can just use in my mophic application, without anythin fancy, won't that be the 'standard widget'?
> And the one opened during system progress (using that Progress Notification thingy) be the system progress widget, hence, 'non-standard' (but special) widget?
>
> just my 2ct
>
> Best regards
>         -Tobias
>
>
> >
> > Best,
> > Karl
> >
> >
> > On Fri, Nov 20, 2015 at 9:49 PM, marcel.taeumel <[hidden email]> wrote:
> > Imagine a wizard that wants to indicate progress to the user. Or a
> > questionnaire. :)
> >
> > Like this widget: http://doc.qt.io/qt-4.8/qprogressbar.html
> >
> > Maybe we need a PluggableProgressBar. I understand that the ProgressBarMorph
> > used to be used to show system progress. Nevertheless, such a widget can be
> > valuable for any application.
> >
> > Best,
> > Marcel
> >
> >
> >
> > --
> > View this message in context: http://forum.world.st/The-Trunk-Morphic-kfr-1048-mcz-tp4862058p4862317.html
> > Sent from the Squeak - Dev mailing list archive at Nabble.com.
> >
> >
> >
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.1048.mcz

Karl Ramberg
I moved them to MorphicExtras-Widgets

Best,
Karl

On Sat, Nov 21, 2015 at 8:26 PM, Tobias Pape <[hidden email]> wrote:

On 21.11.2015, at 18:51, karl ramberg <[hidden email]> wrote:

> ProgressMorph can by definition not be the standard widget since it is not used at all in the image.
>

But we're talking about Applications that are not in the base image, aren't we?
It's like saying, "nobody in the Qt framework uses this widget, remove it", when
actually, the users cannot be expected _within_ the framework but rather as users of
the framework. Just because our bundled morphic tools/applications have no need
for such a progress bar, does not mean that non-base-image applications have neither.

Marcel made the case for a simple "questionnaire application" where you would want
to indicate progress throughout the questioning process. The system progress bar
would be unfit, as it is designed to be used modally (see examples of both progress morphs).

Don't get me wrong, I'm not making the case for keeping things (the ProgressMorph in this case)
just because, but to make sure we are not deprecating/obsoleting stuff that would
count as framework outlet point or "public widgets".


:)

Best regards
        -Tobias

PS: some other widgets that are unused in the base image
        JoysickMorph is only in Flaps
        MorphHierarchy (?)
        SelectedObjectThumbnail
        BackgroundMorph
        BasicButton
        (And others in the MorphicExtras-Widgets category)
>
> Best,
> Karl
>
>
> On Fri, Nov 20, 2015 at 11:52 PM, Tobias Pape <[hidden email]> wrote:
>
> On 20.11.2015, at 23:37, karl ramberg <[hidden email]> wrote:
>
> > Maybe it should be moved to MorphicExtras-Widgets ?
> >
> > If it's in Morphic-Widgets it's seems like it's the standard progress widget, which it is not .
>
> It depends on what 'standard progress widget' means.
>
> If it is the one I can just use in my mophic application, without anythin fancy, won't that be the 'standard widget'?
> And the one opened during system progress (using that Progress Notification thingy) be the system progress widget, hence, 'non-standard' (but special) widget?
>
> just my 2ct
>
> Best regards
>         -Tobias
>
>
> >
> > Best,
> > Karl
> >
> >
> > On Fri, Nov 20, 2015 at 9:49 PM, marcel.taeumel <[hidden email]> wrote:
> > Imagine a wizard that wants to indicate progress to the user. Or a
> > questionnaire. :)
> >
> > Like this widget: http://doc.qt.io/qt-4.8/qprogressbar.html
> >
> > Maybe we need a PluggableProgressBar. I understand that the ProgressBarMorph
> > used to be used to show system progress. Nevertheless, such a widget can be
> > valuable for any application.
> >
> > Best,
> > Marcel
> >
> >
> >
> > --
> > View this message in context: http://forum.world.st/The-Trunk-Morphic-kfr-1048-mcz-tp4862058p4862317.html
> > Sent from the Squeak - Dev mailing list archive at Nabble.com.
> >
> >
> >
>
>
>
>