-
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 #79 from hpi-swa-teaching/master
PowerSqueak v.1.0
- Loading branch information
Showing
547 changed files
with
2,314 additions
and
1,371 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
A PSContentContainer is a container for a single morph put on a slide. | ||
It manages resizing and the context menu for its morph. | ||
Resizing is done with "handles", small rectangles, which can be dragged to resize the child morph. | ||
|
||
Instance Variables | ||
content: <Morph> | ||
hasHandles: <Boolean> | ||
resizeHandles: <Dictionary> | ||
|
||
content | ||
- The morph the container contains | ||
|
||
hasHandles | ||
- Shows whether the container's handles exist | ||
|
||
resizeHandles | ||
- Dictionary containing the resizeHandles at the container's corners |
2 changes: 1 addition & 1 deletion
2
packages/Presenter-Core.package/PSContentContainer.class/instance/actionForCorner..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 @@ | ||
resizing | ||
actionForCorner: aSymbol | ||
|
||
^ ('drag', aSymbol capitalized, 'Event:fromHandle:') asSymbol | ||
^ ('drag', aSymbol capitalized, 'Event:') asSymbol |
6 changes: 6 additions & 0 deletions
6
packages/Presenter-Core.package/PSContentContainer.class/instance/addContentMenuItemsTo..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 @@ | ||
context menu | ||
addContentMenuItemsTo: aMenu | ||
|
||
aMenu defaultTarget: self content. | ||
(self content hasProperty: #wantsCustomContextMenu) | ||
ifTrue: [aMenu addList: self content customContextMenuContent] |
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: 0 additions & 4 deletions
4
packages/Presenter-Core.package/PSContentContainer.class/instance/child..st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/Presenter-Core.package/PSContentContainer.class/instance/child.st
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSContentContainer.class/instance/content..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 | ||
content: aMorph | ||
|
||
content := aMorph |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSContentContainer.class/instance/content.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 | ||
content | ||
|
||
^ content |
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
3 changes: 1 addition & 2 deletions
3
...ges/Presenter-Core.package/PSContentContainer.class/instance/defaultContextMenuContent.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,8 +1,7 @@ | ||
accessing | ||
defaultContextMenuContent | ||
|
||
^ #( | ||
('grab' grabChild) | ||
^ #(('grab' grabChild) | ||
- | ||
('delete' abandon) | ||
- | ||
|
2 changes: 1 addition & 1 deletion
2
...stance/dragBottomLeftEvent.fromHandle..st → ...er.class/instance/dragBottomLeftEvent..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 @@ | ||
resizing | ||
dragBottomLeftEvent: evt fromHandle: handle | ||
dragBottomLeftEvent: evt | ||
|
||
self extentBottomLeft: (self resizeFractionsOf: evt) |
2 changes: 1 addition & 1 deletion
2
...tance/dragBottomRightEvent.fromHandle..st → ...r.class/instance/dragBottomRightEvent..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 @@ | ||
resizing | ||
dragBottomRightEvent: evt fromHandle: handle | ||
dragBottomRightEvent: evt | ||
|
||
self extentBottomRight: (self resizeFractionsOf: evt) |
7 changes: 0 additions & 7 deletions
7
.../Presenter-Core.package/PSContentContainer.class/instance/dragCorner.event.fromHandle..st
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
.../instance/dragTopLeftEvent.fromHandle..st → ...ainer.class/instance/dragTopLeftEvent..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 @@ | ||
resizing | ||
dragTopLeftEvent: evt fromHandle: handle | ||
dragTopLeftEvent: evt | ||
|
||
self extentTopLeft: (self resizeFractionsOf: evt) |
2 changes: 1 addition & 1 deletion
2
...instance/dragTopRightEvent.fromHandle..st → ...iner.class/instance/dragTopRightEvent..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 @@ | ||
resizing | ||
dragTopRightEvent: evt fromHandle: handle | ||
dragTopRightEvent: evt | ||
|
||
self extentTopRight: (self resizeFractionsOf: evt) |
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
4 changes: 2 additions & 2 deletions
4
packages/Presenter-Core.package/PSContentContainer.class/instance/grabChild.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,5 +1,5 @@ | ||
context menu | ||
grabChild | ||
|
||
self child center: ActiveHand position. | ||
ActiveHand grabMorph: self child | ||
self content center: self world activeHand position. | ||
self world activeHand grabMorph: self content |
4 changes: 4 additions & 0 deletions
4
packages/Presenter-Core.package/PSContentContainer.class/instance/handleColor.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 | ||
handleColor | ||
|
||
^ Color black |
9 changes: 9 additions & 0 deletions
9
packages/Presenter-Core.package/PSContentContainer.class/instance/invokeContextMenu.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,9 @@ | ||
context menu | ||
invokeContextMenu | ||
|
||
| menu | | ||
menu := self createContextMenu. | ||
self | ||
addContentMenuItemsTo: menu; | ||
openMenu: menu. | ||
^ menu "just for testing reasons" |
4 changes: 4 additions & 0 deletions
4
...ges/Presenter-Core.package/PSContentContainer.class/instance/magnetizeLayoutFractions..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 @@ | ||
magnetic raster | ||
magnetizeLayoutFractions: aPoint | ||
|
||
^ aPoint roundTo: self rasterResolution |
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: 2 additions & 2 deletions
4
packages/Presenter-Core.package/PSContentContainer.class/instance/notifySlideRescale..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,5 +1,5 @@ | ||
scaling | ||
notifySlideRescale: newExtent | ||
|
||
(self child hasProperty: #acceptRescale) | ||
ifTrue: [self child rescale: newExtent] | ||
(self content hasProperty: #acceptRescale) | ||
ifTrue: [self content rescale: newExtent] |
6 changes: 6 additions & 0 deletions
6
packages/Presenter-Core.package/PSContentContainer.class/instance/openMenu..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 @@ | ||
context menu | ||
openMenu: aMenu | ||
|
||
aMenu | ||
setInvokingView: self; | ||
popUpEvent: self activeHand lastEvent in: self world |
2 changes: 1 addition & 1 deletion
2
packages/Presenter-Core.package/PSContentContainer.class/instance/rasterResolution.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 @@ | ||
magnetic raster | ||
rasterResolution | ||
|
||
^ (0.04@0.03) | ||
^ 0.04 @ 0.03 |
Oops, something went wrong.