From 75c92bce12c5d64fa6fbe28b26dede4499d191e4 Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Thu, 24 Sep 2026 14:58:20 +0200 Subject: [PATCH 1/4] add a couple of examples --- .../SpAlexandriePresenter.extension.st | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/Spec2-Examples/SpAlexandriePresenter.extension.st diff --git a/src/Spec2-Examples/SpAlexandriePresenter.extension.st b/src/Spec2-Examples/SpAlexandriePresenter.extension.st new file mode 100644 index 00000000..227e2352 --- /dev/null +++ b/src/Spec2-Examples/SpAlexandriePresenter.extension.st @@ -0,0 +1,46 @@ +Extension { #name : 'SpAlexandriePresenter' } + +{ #category : '*Spec2-Examples' } +SpAlexandriePresenter class >> example [ + "Show an Alexandrie (vectorial graphics) component embedded into a Spec window presenter." + + | extent | + extent := 350 @ 300. + self new + surfaceExtent: extent; + drawBlock: [ :aContext :boundingBox | + | gradient | + gradient := AeCairoLinearGradientPattern + from: 0@0 + to: extent + addStopsFrom: { + (0 -> Color red). + (1 -> Color green) }. + aContext + sourcePattern: gradient; + roundedRectangleTo: extent radius: 16; + fill ]; + open +] + +{ #category : '*Spec2-Examples' } +SpAlexandriePresenter class >> exampleResizing [ + "Show an Alexandrie component that adapts to the available space. + Resize the window to see the figure follow the drawing area." + + self new + surfaceExtent: 350 @ 300; + drawBlock: [ :aContext :boundingBox | + | gradient center radius | + center := boundingBox center. + radius := (boundingBox width min: boundingBox height) / 2 - 10. + gradient := AeCairoRadialGradientPattern center: center innerRadius: 0 outerRadius: radius. + gradient addStopsFrom: { + (0 -> Color orange). + (1 -> Color blue) }. + aContext + sourcePattern: gradient; + circleCenter: center radius: radius; + fill ]; + open +] From e81f422e83c161d9da902e94b6bb78b34dcd4909 Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Tue, 29 Sep 2026 21:04:12 +0200 Subject: [PATCH 2/4] add refreshList: to old table/list (since it seems there are still some tools using it) --- .../SpAbstractMorphicListAdapter.class.st | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st b/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st index 940b5c6d..edabc79c 100644 --- a/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st +++ b/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st @@ -72,6 +72,18 @@ SpAbstractMorphicListAdapter >> itemFilter [ ^ self model itemFilter ] +{ #category : 'events' } +SpAbstractMorphicListAdapter >> refreshList [ + + self subclassResponsibility +] + +{ #category : 'events' } +SpAbstractMorphicListAdapter >> refreshList: anAnnouncement [ + + self refreshList +] + { #category : 'scrolling' } SpAbstractMorphicListAdapter >> scrollingChanged [ widget container updateAllRows. From da19feff0eab8466d9730306bde2bbfbcfc4955f Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Wed, 30 Sep 2026 09:17:42 +0200 Subject: [PATCH 3/4] remove duplicated methods --- src/Spec2-Adapters-Morphic/SpMorphicListAdapter.class.st | 8 -------- src/Spec2-Adapters-Morphic/SpMorphicTableAdapter.class.st | 6 ------ 2 files changed, 14 deletions(-) diff --git a/src/Spec2-Adapters-Morphic/SpMorphicListAdapter.class.st b/src/Spec2-Adapters-Morphic/SpMorphicListAdapter.class.st index a4b7e573..3e556fd8 100644 --- a/src/Spec2-Adapters-Morphic/SpMorphicListAdapter.class.st +++ b/src/Spec2-Adapters-Morphic/SpMorphicListAdapter.class.st @@ -157,14 +157,6 @@ SpMorphicListAdapter >> refreshList [ ^ self widget refresh ] -{ #category : 'widget API' } -SpMorphicListAdapter >> refreshList: anAnnouncement [ - "this can provide special handling of the kind of refresh, but for now just - letting it as is" - - self refreshList -] - { #category : 'widget API' } SpMorphicListAdapter >> refreshWidgetHeaderTitle [ diff --git a/src/Spec2-Adapters-Morphic/SpMorphicTableAdapter.class.st b/src/Spec2-Adapters-Morphic/SpMorphicTableAdapter.class.st index 440c98ab..e4ac1bfc 100644 --- a/src/Spec2-Adapters-Morphic/SpMorphicTableAdapter.class.st +++ b/src/Spec2-Adapters-Morphic/SpMorphicTableAdapter.class.st @@ -173,12 +173,6 @@ SpMorphicTableAdapter >> refreshList [ ^ self widget refresh ] -{ #category : 'widget API' } -SpMorphicTableAdapter >> refreshList: aValueChanged [ - - ^ self refreshList -] - { #category : 'refreshing' } SpMorphicTableAdapter >> refreshModel [ From 708d849e5bbcc042b09278a91365ffb4a2b3f655 Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Wed, 30 Sep 2026 10:37:35 +0200 Subject: [PATCH 4/4] clean up --- .../SpAbstractMorphicListAdapter.class.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st b/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st index edabc79c..2726dcb9 100644 --- a/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st +++ b/src/Spec2-Adapters-Morphic/SpAbstractMorphicListAdapter.class.st @@ -81,7 +81,7 @@ SpAbstractMorphicListAdapter >> refreshList [ { #category : 'events' } SpAbstractMorphicListAdapter >> refreshList: anAnnouncement [ - self refreshList + self refreshList ] { #category : 'scrolling' }