-
Notifications
You must be signed in to change notification settings - Fork 40
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
7 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
12 changes: 7 additions & 5 deletions
12
src/Bloc-Examples.package/BlBasicExamples.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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
{ | ||
"classtraitcomposition" : "TBlExample classTrait", | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "BlBasicExamples", | ||
"commentStamp" : "AliakseiSyrel 1/24/2017 15:10", | ||
"super" : "Object", | ||
"category" : "Bloc-Examples-Basic", | ||
"traitcomposition" : "TBlExample", | ||
"type" : "normal", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "BlBasicExamples", | ||
"type" : "normal" | ||
"category" : "Bloc-Examples-Basic" | ||
} |
8 changes: 8 additions & 0 deletions
8
src/Bloc-Examples.package/BlTransformationExamples.class/class/rotated.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 @@ | ||
examples | ||
rotated | ||
<script: 'self rotated'> | ||
|
||
self | ||
openInWindow: self new rotate | ||
named: 'Rotated by 45 degrees' | ||
extent: 300@300 |
8 changes: 8 additions & 0 deletions
8
src/Bloc-Examples.package/BlTransformationExamples.class/class/scaled.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 @@ | ||
examples | ||
scaled | ||
<script: 'self scaled'> | ||
|
||
self | ||
openInWindow: self new scale | ||
named: 'Scaled by 2' | ||
extent: 300@300 |
12 changes: 7 additions & 5 deletions
12
src/Bloc-Examples.package/BlTransformationExamples.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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
{ | ||
"classtraitcomposition" : "TBlExample classTrait", | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "BlTransformationExamples", | ||
"commentStamp" : "AliakseiSyrel 11/2/2017 14:35", | ||
"super" : "Object", | ||
"category" : "Bloc-Examples-Basic", | ||
"traitcomposition" : "TBlExample", | ||
"type" : "normal", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "BlTransformationExamples", | ||
"type" : "normal" | ||
"category" : "Bloc-Examples-Basic" | ||
} |
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 @@ | ||
I contain useful helper methods that simplify creation of examples |
18 changes: 18 additions & 0 deletions
18
src/Bloc-Examples.package/TBlExample.trait/class/openInWindow.named.extent..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,18 @@ | ||
opening | ||
openInWindow: anElement named: aTitleString extent: aPoint | ||
"Open a given element in a window of a provided extent and specified title" | ||
| aSpace | | ||
aSpace := BlSpace new | ||
extent: aPoint; | ||
title: aTitleString. | ||
|
||
aSpace root | ||
addChild: anElement; | ||
yourself. | ||
|
||
aSpace root addEventHandler: | ||
(BlEventHandler | ||
on: BlDblClickEvent | ||
do: [ :evt | BlElementSelection on: evt target ]). | ||
|
||
aSpace show |
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 @@ | ||
{ | ||
"name" : "TBlExample", | ||
"commentStamp" : "AliakseiSyrel 11/10/2017 17:49", | ||
"category" : "Bloc-Examples" | ||
} |