-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,421 changed files
with
25,100 additions
and
15,746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Package { #name : #BaselineOfSpec2 } | ||
Package { #name : 'BaselineOfSpec2' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Package { #name : #BaselineOfSpecCore } | ||
Package { #name : 'BaselineOfSpecCore' } |
43 changes: 43 additions & 0 deletions
43
src/Spec2-Adapters-Morphic-Alexandrie/SpAlexandrieMorph.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Class { | ||
#name : #SpAlexandrieMorph, | ||
#superclass : #Morph, | ||
#instVars : [ | ||
'surface', | ||
'drawBlock', | ||
'lastExtent' | ||
], | ||
#category : #'Spec2-Adapters-Morphic-Alexandrie-Base' | ||
} | ||
|
||
{ #category : #accessing } | ||
SpAlexandrieMorph >> drawBlock: aBlock [ | ||
|
||
drawBlock := aBlock | ||
] | ||
|
||
{ #category : #drawing } | ||
SpAlexandrieMorph >> drawOn: aMorphicCanvas [ | ||
|
||
self redraw. | ||
self surface | ||
displayOnMorphicCanvas: aMorphicCanvas | ||
at: bounds origin | ||
] | ||
|
||
{ #category : #drawing } | ||
SpAlexandrieMorph >> redraw [ | ||
|
||
self surface drawDuring: [ :canvas | | ||
drawBlock | ||
cull: canvas | ||
cull: (0@0 extent: self extent) ] | ||
] | ||
|
||
{ #category : #accessing } | ||
SpAlexandrieMorph >> surface [ | ||
|
||
lastExtent = self extent ifFalse: [ surface := nil ]. | ||
^ surface ifNil: [ | ||
lastExtent := self extent. | ||
surface := AthensCairoSurface extent: self extent ] | ||
] |
34 changes: 34 additions & 0 deletions
34
src/Spec2-Adapters-Morphic-Alexandrie/SpMorphicAlexandrieAdapter.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Class { | ||
#name : #SpMorphicAlexandrieAdapter, | ||
#superclass : #SpAbstractMorphicAdapter, | ||
#category : #'Spec2-Adapters-Morphic-Alexandrie-Base' | ||
} | ||
|
||
{ #category : #factory } | ||
SpMorphicAlexandrieAdapter >> buildWidget [ | ||
|
||
| instance | | ||
instance := SpAthensMorph new. | ||
self presenter whenDrawBlockChangedDo: [ :newBlock | | ||
instance drawBlock: newBlock ]. | ||
self presenter whenExtentChangedDo: [ :newExtent | | ||
instance extent: newExtent ]. | ||
instance extent: self presenter surfaceExtent. | ||
instance drawBlock: self presenter drawBlock. | ||
instance setBalloonText: self model help. | ||
self presenter whenHelpChangedDo: [ | ||
instance setBalloonText: self model help ]. | ||
^ instance | ||
] | ||
|
||
{ #category : #drawing } | ||
SpMorphicAlexandrieAdapter >> redraw [ | ||
|
||
widget redraw | ||
] | ||
|
||
{ #category : #accessing } | ||
SpMorphicAlexandrieAdapter >> surface [ | ||
|
||
^ widget surface | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Package { #name : #'Spec2-Adapters-Morphic-Alexandrie' } |
52 changes: 52 additions & 0 deletions
52
src/Spec2-Adapters-Morphic-ListView/SpMorphicListViewAdapter.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
" | ||
A morphic adapter for `SpListViewPresenter` | ||
" | ||
Class { | ||
#name : 'SpMorphicListViewAdapter', | ||
#superclass : 'SpMorphicListAdapter', | ||
#category : 'Spec2-Adapters-Morphic-ListView', | ||
#package : 'Spec2-Adapters-Morphic-ListView' | ||
} | ||
|
||
{ #category : 'factory' } | ||
SpMorphicListViewAdapter >> buildWidget [ | ||
| datasource | | ||
|
||
datasource := self newDataSource. | ||
datasource model: self model. | ||
widget := self newTableWith: datasource. | ||
|
||
self presenter whenModelChangedDo: [ widget refresh ]. | ||
self presenter whenSelectionChangedDo: [ self refreshWidgetSelection ]. | ||
self presenter selection whenChangedDo: [ self refreshWidgetSelection ]. | ||
|
||
self refreshWidgetSelection. | ||
self configureScrolling. | ||
|
||
^ widget | ||
] | ||
|
||
{ #category : 'factory' } | ||
SpMorphicListViewAdapter >> newDataSource [ | ||
|
||
^ SpMorphicListViewDataSource new | ||
] | ||
|
||
{ #category : 'factory' } | ||
SpMorphicListViewAdapter >> newTableWith: datasource [ | ||
|
||
^ SpFTTableMorph new | ||
disableFunction; | ||
dataSource: datasource; | ||
hideColumnHeaders; | ||
beResizable; | ||
setMultipleSelection: self model isMultipleSelection; | ||
dragEnabled: self dragEnabled; | ||
dropEnabled: self dropEnabled; | ||
setBalloonText: self help; | ||
hResizing: #spaceFill; | ||
vResizing: #spaceFill; | ||
onAnnouncement: FTSelectionChanged send: #selectionChanged: to: self; | ||
onAnnouncement: FTStrongSelectionChanged send: #strongSelectionChanged: to: self; | ||
yourself | ||
] |
Oops, something went wrong.