-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from hpi-swa-teaching/master
PowerSqueak Version 0.5
- Loading branch information
Showing
116 changed files
with
597 additions
and
157 deletions.
There are no files selected for viewing
Empty file.
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSMiniature.class/class/forSlide..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,4 @@ | ||
as yet unclassified | ||
forSlide: aPSSlide | ||
|
||
^ self new setSlide: aPSSlide |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSMiniature.class/instance/defaultSize.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,4 @@ | ||
accessing | ||
defaultSize | ||
|
||
^ 80 @ 60 |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSMiniature.class/instance/handlesMouseDown..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,4 @@ | ||
as yet unclassified | ||
handlesMouseDown: evt | ||
|
||
^ true |
5 changes: 5 additions & 0 deletions
5
packages/Presenter-Core.package/PSMiniature.class/instance/highlight.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,5 @@ | ||
as yet unclassified | ||
highlight | ||
|
||
self borderColor: self highlightBorderColor. | ||
self updateImage |
6 changes: 6 additions & 0 deletions
6
packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderColor.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,6 @@ | ||
accessing | ||
highlightBorderColor | ||
|
||
^ Color r: 247/255 g: 159/255 b: 0 | ||
|
||
|
6 changes: 6 additions & 0 deletions
6
packages/Presenter-Core.package/PSMiniature.class/instance/highlightBorderWidth.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,6 @@ | ||
accessing | ||
highlightBorderWidth | ||
|
||
^ 5 | ||
|
||
|
6 changes: 6 additions & 0 deletions
6
packages/Presenter-Core.package/PSMiniature.class/instance/initialize.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,6 @@ | ||
as yet unclassified | ||
initialize | ||
|
||
super initialize. | ||
self borderWidth: self highlightBorderWidth. | ||
self borderColor: Color transparent |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSMiniature.class/instance/isHighlighted.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,4 @@ | ||
as yet unclassified | ||
isHighlighted | ||
|
||
^ self borderColor = self highlightBorderColor |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSMiniature.class/instance/model..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,4 @@ | ||
accessing | ||
model: aModel | ||
|
||
model := aModel |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSMiniature.class/instance/model.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,4 @@ | ||
accessing | ||
model | ||
|
||
^ model |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSMiniature.class/instance/mouseDown..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,4 @@ | ||
as yet unclassified | ||
mouseDown: evt | ||
|
||
self model selectSlide: self slide |
5 changes: 5 additions & 0 deletions
5
packages/Presenter-Core.package/PSMiniature.class/instance/setSlide..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,5 @@ | ||
as yet unclassified | ||
setSlide: aPSSlide | ||
|
||
self slide: aPSSlide. | ||
self updateImage |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSMiniature.class/instance/slide..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,4 @@ | ||
accessing | ||
slide: aPSSlide | ||
|
||
slide := aPSSlide |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSMiniature.class/instance/slide.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,4 @@ | ||
accessing | ||
slide | ||
|
||
^ slide |
5 changes: 5 additions & 0 deletions
5
packages/Presenter-Core.package/PSMiniature.class/instance/unHighlight.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,5 @@ | ||
as yet unclassified | ||
unHighlight | ||
|
||
self borderColor: Color transparent. | ||
self updateImage |
5 changes: 5 additions & 0 deletions
5
packages/Presenter-Core.package/PSMiniature.class/instance/updateImage.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,5 @@ | ||
as yet unclassified | ||
updateImage | ||
|
||
self newForm: (self slide imageForm scaledToSize: self defaultSize). | ||
self borderWidth: self borderWidth |
19 changes: 19 additions & 0 deletions
19
packages/Presenter-Core.package/PSMiniature.class/methodProperties.json
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,19 @@ | ||
{ | ||
"class" : { | ||
"forSlide:" : "LB 6/29/2018 17:11" }, | ||
"instance" : { | ||
"defaultSize" : "WoC 6/29/2018 15:29", | ||
"handlesMouseDown:" : "WoC 6/29/2018 15:33", | ||
"highlight" : "LB 7/3/2018 16:57", | ||
"highlightBorderColor" : "LB 6/29/2018 17:48", | ||
"highlightBorderWidth" : "LB 6/29/2018 17:16", | ||
"initialize" : "LB 7/3/2018 16:57", | ||
"isHighlighted" : "LB 6/29/2018 19:05", | ||
"model" : "LB 6/29/2018 15:52", | ||
"model:" : "LB 6/29/2018 15:52", | ||
"mouseDown:" : "LB 7/3/2018 17:00", | ||
"setSlide:" : "WoC 6/29/2018 15:26", | ||
"slide" : "WoC 6/29/2018 15:19", | ||
"slide:" : "LB 6/29/2018 17:00", | ||
"unHighlight" : "LB 7/3/2018 16:56", | ||
"updateImage" : "LB 7/3/2018 17:04" } } |
15 changes: 15 additions & 0 deletions
15
packages/Presenter-Core.package/PSMiniature.class/properties.json
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,15 @@ | ||
{ | ||
"category" : "Presenter-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"slide", | ||
"model" ], | ||
"name" : "PSMiniature", | ||
"pools" : [ | ||
], | ||
"super" : "ImageMorph", | ||
"type" : "normal" } |
7 changes: 5 additions & 2 deletions
7
packages/Presenter-Core.package/PSPresentationTool.class/instance/buildWith..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
8 changes: 5 additions & 3 deletions
8
packages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectory..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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
as yet unclassified | ||
checkSlideDirectory: aDirectoryName | ||
presentation loading | ||
checkSlideDirectory: aDirectory | ||
|
||
^ aDirectoryName matchesRegex: 'slide[0-9]+' | ||
^ (self checkSlideDirectoryName: aDirectory localName) | ||
and: [aDirectory fileNames allSatisfy: [:each | | ||
each matchesRegex: '[0-9]+.morph']] |
4 changes: 4 additions & 0 deletions
4
...ages/Presenter-Core.package/PSPresentationTool.class/instance/checkSlideDirectoryName..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,4 @@ | ||
presentation loading | ||
checkSlideDirectoryName: aDirectoryName | ||
|
||
^ aDirectoryName matchesRegex: 'slide[0-9]+' |
14 changes: 14 additions & 0 deletions
14
...ages/Presenter-Core.package/PSPresentationTool.class/instance/createMiniatureViewSpec..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,14 @@ | ||
toolbuilder | ||
createMiniatureViewSpec: aBuilder | ||
| panelSpec | | ||
panelSpec := aBuilder pluggableScrollPaneSpec new. | ||
panelSpec | ||
model: self; | ||
frame: self miniatureViewLayoutFrame; | ||
name: #MiniatureView; | ||
vScrollBarPolicy: #always; | ||
horizontalResizing: #spaceFill; | ||
layout: #vertical; | ||
wantsResizeHandles: false; | ||
children: #slideMiniatures. | ||
^ panelSpec |
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
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSPresentationTool.class/instance/currentMiniature.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,4 @@ | ||
slide miniatures | ||
currentMiniature | ||
|
||
^ self miniatureOf: self currentSlide |
2 changes: 1 addition & 1 deletion
2
packages/Presenter-Core.package/PSPresentationTool.class/instance/currentSlide.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
accessing | ||
currentSlide | ||
|
||
(self currentSlideNumber <= self slides size and: [self currentSlideNumber > 0]) | ||
(self currentSlideNumber between: 1 and: self slides size) | ||
ifFalse: [ self error: 'No slide available']. | ||
^ self slides at: self currentSlideNumber |
6 changes: 6 additions & 0 deletions
6
packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteAllSlides.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,6 @@ | ||
slide management | ||
deleteAllSlides | ||
|
||
[self slideCount > self minimumSlideCount] | ||
whileTrue: [self deleteSlide]. | ||
self deleteSlide |
10 changes: 6 additions & 4 deletions
10
packages/Presenter-Core.package/PSPresentationTool.class/instance/deleteSlide..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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
slide management | ||
deleteSlide: anIndex | ||
|
||
| deletedSlide | | ||
self slideCount = self minimumSlideCount | ||
ifTrue: [ self createSlide ]. "There should never be zero slides" | ||
|
||
(self slideAt: anIndex) abandon. | ||
self slides removeAt: anIndex. | ||
deletedSlide := self slides removeAt: anIndex. | ||
deletedSlide abandon. | ||
self currentSlideNumber >= anIndex ifTrue: | ||
[self selectSlide: (self currentSlideNumber - 1 max: self minimumSlideCount)]. | ||
[self selectSlideNumber: (self currentSlideNumber - 1 max: self minimumSlideCount)]. | ||
|
||
self miniatures removeKey: deletedSlide ifAbsent: []. | ||
self updateSlideMiniatures | ||
"self updateSlideNumbers " | ||
|
8 changes: 5 additions & 3 deletions
8
packages/Presenter-Core.package/PSPresentationTool.class/instance/exportAsPNGs..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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
do not touch | ||
exportAsPNGs: name | ||
|
||
(FileDirectory default / 'PSSlidePNGs' / name) assureExistence. | ||
| directory | | ||
directory := FileDirectory default / 'PSSlidePNGs' / name. | ||
directory assureExistence. | ||
self enablePresentationMode. | ||
self slideContainer enableNonInteractiveMode. | ||
self slides withIndexDo: [:each :index | | ||
self selectSlide: index. | ||
self selectSlideNumber: index. | ||
World doOneCycle. | ||
each exportAsPNGNamed: 'PSSlidePNGs\', name, '\slide',index,'.png']. | ||
each exportAsPNGNamed: (directory / ('slide', index, '.png')) fullName]. | ||
self disablePresentationMode |
5 changes: 5 additions & 0 deletions
5
...ges/Presenter-Core.package/PSPresentationTool.class/instance/highlightCurrentMiniature.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,5 @@ | ||
slide miniatures | ||
highlightCurrentMiniature | ||
|
||
self miniatures do: [:each | each unHighlight]. | ||
self currentMiniature highlight |
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
19 changes: 7 additions & 12 deletions
19
packages/Presenter-Core.package/PSPresentationTool.class/instance/loadSlideFromDirectory..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 |
---|---|---|
@@ -1,15 +1,10 @@ | ||
presentation loading | ||
loadSlideFromDirectory: aDirectory | ||
|
||
| slide corruptedMorphs | | ||
corruptedMorphs := 0. | ||
slide := PSSlide new. | ||
slide setModel: self. | ||
aDirectory fileNames do: [:each | | ||
| morph | | ||
morph := self loadMorphFromFile: aDirectory / each. | ||
morph | ||
ifNil: [corruptedMorphs := corruptedMorphs + 1] | ||
ifNotNil: [slide addMorph: morph]]. | ||
self slides addLast: slide. | ||
^ corruptedMorphs | ||
| slide sortedMorphFiles | | ||
slide := self createSlide. | ||
sortedMorphFiles := self sortedMorphFiles: aDirectory fileNames. | ||
sortedMorphFiles do: [:each | | ||
(self loadMorphFromFile: aDirectory / each) | ||
ifNotNil: [:morph | slide addMorphBack: morph]]. | ||
^ slide |
6 changes: 6 additions & 0 deletions
6
packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureOf..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,6 @@ | ||
slide miniatures | ||
miniatureOf: aPSSlide | ||
|
||
^ self miniatures at: aPSSlide ifAbsentPut: [(PSMiniature forSlide: aPSSlide) | ||
model: self; | ||
yourself] |
8 changes: 8 additions & 0 deletions
8
...ages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureViewLayoutFrame.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,8 @@ | ||
toolbuilder | ||
miniatureViewLayoutFrame | ||
|
||
^ LayoutFrame new | ||
leftFraction: 0 offset: 0; | ||
topFraction: 0 offset: 2 * self buttonHeight; | ||
rightFraction: self miniatureViewWidth offset: 0; | ||
bottomFraction: 1 offset: 0 |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatureViewWidth.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,4 @@ | ||
toolbuilder | ||
miniatureViewWidth | ||
|
||
^ 0.2 |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatures..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,4 @@ | ||
accessing | ||
miniatures: aDictionary | ||
|
||
miniatures := aDictionary |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSPresentationTool.class/instance/miniatures.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,4 @@ | ||
accessing | ||
miniatures | ||
|
||
^ miniatures |
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
2 changes: 1 addition & 1 deletion
2
packages/Presenter-Core.package/PSPresentationTool.class/instance/nextSlide.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
slide management | ||
nextSlide | ||
|
||
self selectSlide: self currentSlideNumber + 1 | ||
self selectSlideNumber: self currentSlideNumber + 1 |
Oops, something went wrong.