From 401234367cf7d7ef4e3cf2784ae7a2c36aee0486 Mon Sep 17 00:00:00 2001 From: Eiichiro Ito Date: Mon, 26 Oct 2020 17:04:59 +0900 Subject: [PATCH] update FromScratch. change toolbar buttons to normal buttons of Stage title. --- .../instance/testAxisFont.st | 2 +- .../ScratchStepperMorphTest.class/README.md | 1 + .../instance/newMorph.st | 3 + .../instance/testDefaultStepTime.st | 3 + .../instance/testStepTime.st | 7 ++ .../properties.json | 11 +++ .../instance/newFont1.st | 2 +- .../instance/isStop.st | 2 +- .../STONObjStream.class}/README.md | 0 .../class/fileVersion.from..st | 11 +++ .../instance/readObjFrom..st | 5 ++ .../instance/readObjFrom.showProgress..st | 5 ++ .../instance/storeObj.on..st | 5 ++ .../STONObjStream.class/properties.json | 11 +++ .../instance/bitAnd.with..st | 3 + .../instance/bitOr.with..st | 3 + .../instance/bitShift.left..st | 3 + .../instance/bitShift.right..st | 3 + .../instance/bitXor.with..st | 3 + .../instance/bitAnd.with..st | 5 ++ .../ScratchCode.class/instance/bitOr.with..st | 5 ++ .../instance/bitShift.left..st | 5 ++ .../instance/bitShift.right..st | 5 ++ .../instance/bitXor.with..st | 5 ++ .../instance/subHatBlockNamed..st | 3 + .../instance/doReturn.st | 21 ++++++ .../ScratchStepperMorph.class/README.md | 0 .../instance/defaultStepTime.st | 3 + .../instance/step.st | 4 + .../instance/stepTime..st | 3 + .../instance/stepTime.st | 3 + .../instance/wantsSteps.st | 3 + .../instance/whenStepsDo..st | 3 + .../ScratchStepperMorph.class/properties.json | 14 ++++ .../instance/defaultFont.st | 2 +- .../instance/stepProcesses.st | 3 +- .../SpScratchLibrary.class/README.md | 0 .../class/defaultSpec.st | 9 +++ .../instance/defaultMainButtonName.st | 3 + .../instance/defaultOtherButtonName.st | 3 + .../instance/initializePresenters.st | 24 ++++++ .../instance/mainLabel.st | 3 + .../instance/otherLabel..st | 3 + .../instance/otherLabel.st | 3 + .../SpScratchLibrary.class/instance/reset.st | 4 + .../instance/selectButton..st | 4 + .../instance/whenAddButtonPressed..st | 3 + .../instance/whenDeleteButtonPressed..st | 3 + .../instance/whenMainButtonPressed..st | 3 + .../instance/whenOtherButtonPressed..st | 3 + .../instance/whenSelectButtonPressed..st | 3 + .../SpScratchLibrary.class/properties.json | 17 +++++ .../class/fontName.size..st | 3 - .../StrikeFont.extension/properties.json | 3 - .../instance/initialize.st | 2 +- .../instance/initFieldsFrom.version..st | 2 +- .../instance/setupBlockCategory.st | 2 +- .../SpGratchFrame.class/class/defaultSpec.st | 22 ++++-- .../class/titleButtonHeight.st | 2 +- .../instance/initializePresenters.st | 2 +- .../SpGratchTitle.class/class/defaultSpec.st | 14 +++- .../instance/buttonNamed..st | 3 - .../instance/clearEdgesAction..st | 2 +- .../instance/clearNodesAction..st | 2 +- .../instance/initializePresenters.st | 19 ++++- .../instance/setupButtons.st | 73 ++++++++----------- .../instance/startEventAction..st | 2 +- .../instance/startLoopAction..st | 2 +- .../instance/startLoopSlowAction..st | 2 +- .../instance/startSetupAction..st | 2 +- .../instance/stepLoopAction..st | 2 +- .../instance/stopAllAction..st | 2 +- .../SpGratchTitle.class/properties.json | 9 ++- .../SpGratchViewer.class/class/buttons.st | 6 -- .../instance/connectPresenters.st | 10 --- .../instance/setupButtons.st | 26 ------- .../SpGratchViewer.class/properties.json | 22 ------ 77 files changed, 348 insertions(+), 146 deletions(-) create mode 100644 filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/README.md create mode 100644 filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/newMorph.st create mode 100644 filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/testDefaultStepTime.st create mode 100644 filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/testStepTime.st create mode 100644 filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/properties.json rename filetree/{Gratch.package/SpGratchViewer.class => FromScratch.package/STONObjStream.class}/README.md (100%) create mode 100644 filetree/FromScratch.package/STONObjStream.class/class/fileVersion.from..st create mode 100644 filetree/FromScratch.package/STONObjStream.class/instance/readObjFrom..st create mode 100644 filetree/FromScratch.package/STONObjStream.class/instance/readObjFrom.showProgress..st create mode 100644 filetree/FromScratch.package/STONObjStream.class/instance/storeObj.on..st create mode 100644 filetree/FromScratch.package/STONObjStream.class/properties.json create mode 100644 filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitAnd.with..st create mode 100644 filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitOr.with..st create mode 100644 filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitShift.left..st create mode 100644 filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitShift.right..st create mode 100644 filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitXor.with..st create mode 100644 filetree/FromScratch.package/ScratchCode.class/instance/bitAnd.with..st create mode 100644 filetree/FromScratch.package/ScratchCode.class/instance/bitOr.with..st create mode 100644 filetree/FromScratch.package/ScratchCode.class/instance/bitShift.left..st create mode 100644 filetree/FromScratch.package/ScratchCode.class/instance/bitShift.right..st create mode 100644 filetree/FromScratch.package/ScratchCode.class/instance/bitXor.with..st create mode 100644 filetree/FromScratch.package/ScratchScript.class/instance/subHatBlockNamed..st create mode 100644 filetree/FromScratch.package/ScratchStackProcess.class/instance/doReturn.st create mode 100644 filetree/FromScratch.package/ScratchStepperMorph.class/README.md create mode 100644 filetree/FromScratch.package/ScratchStepperMorph.class/instance/defaultStepTime.st create mode 100644 filetree/FromScratch.package/ScratchStepperMorph.class/instance/step.st create mode 100644 filetree/FromScratch.package/ScratchStepperMorph.class/instance/stepTime..st create mode 100644 filetree/FromScratch.package/ScratchStepperMorph.class/instance/stepTime.st create mode 100644 filetree/FromScratch.package/ScratchStepperMorph.class/instance/wantsSteps.st create mode 100644 filetree/FromScratch.package/ScratchStepperMorph.class/instance/whenStepsDo..st create mode 100644 filetree/FromScratch.package/ScratchStepperMorph.class/properties.json create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/README.md create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/class/defaultSpec.st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/defaultMainButtonName.st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/defaultOtherButtonName.st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/initializePresenters.st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/mainLabel.st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/otherLabel..st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/otherLabel.st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/reset.st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/selectButton..st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/whenAddButtonPressed..st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/whenDeleteButtonPressed..st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/whenMainButtonPressed..st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/whenOtherButtonPressed..st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/instance/whenSelectButtonPressed..st create mode 100644 filetree/FromScratch.package/SpScratchLibrary.class/properties.json delete mode 100644 filetree/FromScratch.package/StrikeFont.extension/class/fontName.size..st delete mode 100644 filetree/FromScratch.package/StrikeFont.extension/properties.json delete mode 100644 filetree/Gratch.package/SpGratchTitle.class/instance/buttonNamed..st delete mode 100644 filetree/Gratch.package/SpGratchViewer.class/class/buttons.st delete mode 100644 filetree/Gratch.package/SpGratchViewer.class/instance/connectPresenters.st delete mode 100644 filetree/Gratch.package/SpGratchViewer.class/instance/setupButtons.st delete mode 100644 filetree/Gratch.package/SpGratchViewer.class/properties.json diff --git a/filetree/FromScratch-Tests.package/ScratchPlotterMorphTest.class/instance/testAxisFont.st b/filetree/FromScratch-Tests.package/ScratchPlotterMorphTest.class/instance/testAxisFont.st index 2a970df..ec8df9e 100644 --- a/filetree/FromScratch-Tests.package/ScratchPlotterMorphTest.class/instance/testAxisFont.st +++ b/filetree/FromScratch-Tests.package/ScratchPlotterMorphTest.class/instance/testAxisFont.st @@ -2,4 +2,4 @@ test testAxisFont | p | p := self newPlotter. - self assert: (p axisFont isKindOf: LogicalFont) \ No newline at end of file + self assert: (p axisFont isKindOf: AbstractFont) \ No newline at end of file diff --git a/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/README.md b/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/README.md new file mode 100644 index 0000000..8869ea5 --- /dev/null +++ b/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/README.md @@ -0,0 +1 @@ +An AlgoritStepperMorphTest is a test class for testing the behavior of AlgoritStepperMorph \ No newline at end of file diff --git a/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/newMorph.st b/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/newMorph.st new file mode 100644 index 0000000..f9414cb --- /dev/null +++ b/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/newMorph.st @@ -0,0 +1,3 @@ +private +newMorph + ^ ScratchStepperMorph new \ No newline at end of file diff --git a/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/testDefaultStepTime.st b/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/testDefaultStepTime.st new file mode 100644 index 0000000..e8e0838 --- /dev/null +++ b/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/testDefaultStepTime.st @@ -0,0 +1,3 @@ +test +testDefaultStepTime + self assert: self newMorph defaultStepTime equals: 100 \ No newline at end of file diff --git a/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/testStepTime.st b/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/testStepTime.st new file mode 100644 index 0000000..40eaba4 --- /dev/null +++ b/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/instance/testStepTime.st @@ -0,0 +1,7 @@ +test +testStepTime + | s | + s := self newMorph. + self assert: s stepTime equals: s defaultStepTime. + s stepTime: 123. + self assert: s stepTime equals: 123 \ No newline at end of file diff --git a/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/properties.json b/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/properties.json new file mode 100644 index 0000000..ceacd06 --- /dev/null +++ b/filetree/FromScratch-Tests.package/ScratchStepperMorphTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "FromScratch-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ScratchStepperMorphTest", + "type" : "normal" +} \ No newline at end of file diff --git a/filetree/FromScratch-Tests.package/ScratchTranslatorTest.class/instance/newFont1.st b/filetree/FromScratch-Tests.package/ScratchTranslatorTest.class/instance/newFont1.st index 6c7e9d9..5f4350e 100644 --- a/filetree/FromScratch-Tests.package/ScratchTranslatorTest.class/instance/newFont1.st +++ b/filetree/FromScratch-Tests.package/ScratchTranslatorTest.class/instance/newFont1.st @@ -1,3 +1,3 @@ private newFont1 - ^ StrikeFont fontName: 'Verdana' size: 10 \ No newline at end of file + ^ StrikeFont familyName: 'Verdana' size: 10 \ No newline at end of file diff --git a/filetree/FromScratch.package/CommandBlockMorph.class/instance/isStop.st b/filetree/FromScratch.package/CommandBlockMorph.class/instance/isStop.st index 8278a24..bd42d3c 100644 --- a/filetree/FromScratch.package/CommandBlockMorph.class/instance/isStop.st +++ b/filetree/FromScratch.package/CommandBlockMorph.class/instance/isStop.st @@ -1,3 +1,3 @@ testing isStop - ^ #(stopThread stopAll return: break continue) includes: selector \ No newline at end of file + ^ #(stopThread stopAll return: break continue doReturn) includes: selector \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchViewer.class/README.md b/filetree/FromScratch.package/STONObjStream.class/README.md similarity index 100% rename from filetree/Gratch.package/SpGratchViewer.class/README.md rename to filetree/FromScratch.package/STONObjStream.class/README.md diff --git a/filetree/FromScratch.package/STONObjStream.class/class/fileVersion.from..st b/filetree/FromScratch.package/STONObjStream.class/class/fileVersion.from..st new file mode 100644 index 0000000..030e9be --- /dev/null +++ b/filetree/FromScratch.package/STONObjStream.class/class/fileVersion.from..st @@ -0,0 +1,11 @@ +accessing +fileVersion: anAppClass from: aStream + "Answer the Scratch file version number from the given string. If the string is of the form: 'ScratchVxx', were xx is a two-digit integer, answer the value of xx. Otherwise, answer 0." + + | str | + str := (aStream next: anAppClass appVersionString size) asString. + (str beginsWith: anAppClass appVersionTag) + ifFalse: [ ^ 0 ]. + ^ (str + copyFrom: anAppClass appVersionTag size + 1 + to: str size) asNumberNoError \ No newline at end of file diff --git a/filetree/FromScratch.package/STONObjStream.class/instance/readObjFrom..st b/filetree/FromScratch.package/STONObjStream.class/instance/readObjFrom..st new file mode 100644 index 0000000..65e49a2 --- /dev/null +++ b/filetree/FromScratch.package/STONObjStream.class/instance/readObjFrom..st @@ -0,0 +1,5 @@ +entry points +readObjFrom: aStream + "Read the root object from the given binary stream." + + ^ self readObjFrom: aStream showProgress: false \ No newline at end of file diff --git a/filetree/FromScratch.package/STONObjStream.class/instance/readObjFrom.showProgress..st b/filetree/FromScratch.package/STONObjStream.class/instance/readObjFrom.showProgress..st new file mode 100644 index 0000000..74117d6 --- /dev/null +++ b/filetree/FromScratch.package/STONObjStream.class/instance/readObjFrom.showProgress..st @@ -0,0 +1,5 @@ +entry points +readObjFrom: aStream showProgress: aBoolean + | str | + str := aStream upToEnd asString. + ^ STON fromString: str \ No newline at end of file diff --git a/filetree/FromScratch.package/STONObjStream.class/instance/storeObj.on..st b/filetree/FromScratch.package/STONObjStream.class/instance/storeObj.on..st new file mode 100644 index 0000000..c5e08e7 --- /dev/null +++ b/filetree/FromScratch.package/STONObjStream.class/instance/storeObj.on..st @@ -0,0 +1,5 @@ +entry points +storeObj: anObject on: aStream + | str | + str := STON toString: anObject. + aStream nextPutAll: str asByteArray \ No newline at end of file diff --git a/filetree/FromScratch.package/STONObjStream.class/properties.json b/filetree/FromScratch.package/STONObjStream.class/properties.json new file mode 100644 index 0000000..40b31b1 --- /dev/null +++ b/filetree/FromScratch.package/STONObjStream.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "FromScratch-Project", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "STONObjStream", + "type" : "normal" +} \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitAnd.with..st b/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitAnd.with..st new file mode 100644 index 0000000..acf060d --- /dev/null +++ b/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitAnd.with..st @@ -0,0 +1,3 @@ +arithmetic ops +bitAnd: x with: y + ^ self binaryCommand: #bitAnd arg1: x arg2: y \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitOr.with..st b/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitOr.with..st new file mode 100644 index 0000000..a4821e4 --- /dev/null +++ b/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitOr.with..st @@ -0,0 +1,3 @@ +arithmetic ops +bitOr: x with: y + ^ self binaryCommand: #bitOr arg1: x arg2: y \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitShift.left..st b/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitShift.left..st new file mode 100644 index 0000000..7f9212f --- /dev/null +++ b/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitShift.left..st @@ -0,0 +1,3 @@ +arithmetic ops +bitShift: x left: y + ^ self binaryCommand: #bitShiftLeft arg1: x arg2: y \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitShift.right..st b/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitShift.right..st new file mode 100644 index 0000000..24abcd7 --- /dev/null +++ b/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitShift.right..st @@ -0,0 +1,3 @@ +arithmetic ops +bitShift: x right: y + ^ self binaryCommand: #bitShiftRight arg1: x arg2: y \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitXor.with..st b/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitXor.with..st new file mode 100644 index 0000000..2d24e65 --- /dev/null +++ b/filetree/FromScratch.package/ScratchBytecodeGenerator.class/instance/bitXor.with..st @@ -0,0 +1,3 @@ +arithmetic ops +bitXor: x with: y + ^ self binaryCommand: #bitXor arg1: x arg2: y \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchCode.class/instance/bitAnd.with..st b/filetree/FromScratch.package/ScratchCode.class/instance/bitAnd.with..st new file mode 100644 index 0000000..c0fb28d --- /dev/null +++ b/filetree/FromScratch.package/ScratchCode.class/instance/bitAnd.with..st @@ -0,0 +1,5 @@ +arithmetic ops +bitAnd: x with: y + ^ generator + bitAnd: [ x argString: parser ] + with: [ y argString: parser ] \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchCode.class/instance/bitOr.with..st b/filetree/FromScratch.package/ScratchCode.class/instance/bitOr.with..st new file mode 100644 index 0000000..496136b --- /dev/null +++ b/filetree/FromScratch.package/ScratchCode.class/instance/bitOr.with..st @@ -0,0 +1,5 @@ +arithmetic ops +bitOr: x with: y + ^ generator + bitOr: [ x argString: parser ] + with: [ y argString: parser ] \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchCode.class/instance/bitShift.left..st b/filetree/FromScratch.package/ScratchCode.class/instance/bitShift.left..st new file mode 100644 index 0000000..9976f3e --- /dev/null +++ b/filetree/FromScratch.package/ScratchCode.class/instance/bitShift.left..st @@ -0,0 +1,5 @@ +arithmetic ops +bitShift: x left: y + ^ generator + bitShift: [ x argString: parser ] + left: [ y argString: parser ] \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchCode.class/instance/bitShift.right..st b/filetree/FromScratch.package/ScratchCode.class/instance/bitShift.right..st new file mode 100644 index 0000000..730dac3 --- /dev/null +++ b/filetree/FromScratch.package/ScratchCode.class/instance/bitShift.right..st @@ -0,0 +1,5 @@ +arithmetic ops +bitShift: x right: y + ^ generator + bitShift: [ x argString: parser ] + right: [ y argString: parser ] \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchCode.class/instance/bitXor.with..st b/filetree/FromScratch.package/ScratchCode.class/instance/bitXor.with..st new file mode 100644 index 0000000..f889a0d --- /dev/null +++ b/filetree/FromScratch.package/ScratchCode.class/instance/bitXor.with..st @@ -0,0 +1,5 @@ +arithmetic ops +bitXor: x with: y + ^ generator + bitXor: [ x argString: parser ] + with: [ y argString: parser ] \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchScript.class/instance/subHatBlockNamed..st b/filetree/FromScratch.package/ScratchScript.class/instance/subHatBlockNamed..st new file mode 100644 index 0000000..81784ca --- /dev/null +++ b/filetree/FromScratch.package/ScratchScript.class/instance/subHatBlockNamed..st @@ -0,0 +1,3 @@ +accessing +subHatBlockNamed: aString + ^ self subBlocks detect: [ :each | each subName = aString ] ifNone: [ nil ] \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchStackProcess.class/instance/doReturn.st b/filetree/FromScratch.package/ScratchStackProcess.class/instance/doReturn.st new file mode 100644 index 0000000..f1685fe --- /dev/null +++ b/filetree/FromScratch.package/ScratchStackProcess.class/instance/doReturn.st @@ -0,0 +1,21 @@ +special ops +doReturn + "Evaluates its argument, and returns the value to the frame from which the current method was called." + + | value args | + args := stackFrame arguments. + + "Evaluate the argument, if necessary." + args size < stackFrame expression argumentCount + ifTrue: [ ^ self evaluateNextArgument ]. + + "Remember the return value." + value := args notEmpty + ifTrue: [ args first ] + ifFalse: [ nil ]. + + "Pop until we're out of frames to pop, or we hit a return marker." + [ stackFrame isNil ] whileFalse: [ self popStackFrame ]. + stackFrame + ifNotNil: [ self returnValueToParentFrame: value. + self popStackFrame ] \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchStepperMorph.class/README.md b/filetree/FromScratch.package/ScratchStepperMorph.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/filetree/FromScratch.package/ScratchStepperMorph.class/instance/defaultStepTime.st b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/defaultStepTime.st new file mode 100644 index 0000000..d610b40 --- /dev/null +++ b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/defaultStepTime.st @@ -0,0 +1,3 @@ +private +defaultStepTime + ^ 100 \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchStepperMorph.class/instance/step.st b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/step.st new file mode 100644 index 0000000..2cd2e03 --- /dev/null +++ b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/step.st @@ -0,0 +1,4 @@ +stepping and presenter +step + block ifNil: [ ^ self ]. + block value \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchStepperMorph.class/instance/stepTime..st b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/stepTime..st new file mode 100644 index 0000000..43d28a9 --- /dev/null +++ b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/stepTime..st @@ -0,0 +1,3 @@ +stepping +stepTime: anInteger + stepTime := anInteger \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchStepperMorph.class/instance/stepTime.st b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/stepTime.st new file mode 100644 index 0000000..df84934 --- /dev/null +++ b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/stepTime.st @@ -0,0 +1,3 @@ +stepping +stepTime + ^ stepTime ifNil: [ self defaultStepTime ] \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchStepperMorph.class/instance/wantsSteps.st b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/wantsSteps.st new file mode 100644 index 0000000..46d0055 --- /dev/null +++ b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/wantsSteps.st @@ -0,0 +1,3 @@ +stepping and presenter +wantsSteps + ^ true \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchStepperMorph.class/instance/whenStepsDo..st b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/whenStepsDo..st new file mode 100644 index 0000000..b161b2f --- /dev/null +++ b/filetree/FromScratch.package/ScratchStepperMorph.class/instance/whenStepsDo..st @@ -0,0 +1,3 @@ +accessing +whenStepsDo: aBlock + block := aBlock \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchStepperMorph.class/properties.json b/filetree/FromScratch.package/ScratchStepperMorph.class/properties.json new file mode 100644 index 0000000..da7dadc --- /dev/null +++ b/filetree/FromScratch.package/ScratchStepperMorph.class/properties.json @@ -0,0 +1,14 @@ +{ + "commentStamp" : "", + "super" : "Morph", + "category" : "FromScratch-Morphic", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "block", + "stepTime" + ], + "name" : "ScratchStepperMorph", + "type" : "normal" +} \ No newline at end of file diff --git a/filetree/FromScratch.package/ScratchTranslator.class/instance/defaultFont.st b/filetree/FromScratch.package/ScratchTranslator.class/instance/defaultFont.st index fb3ed59..71f7024 100644 --- a/filetree/FromScratch.package/ScratchTranslator.class/instance/defaultFont.st +++ b/filetree/FromScratch.package/ScratchTranslator.class/instance/defaultFont.st @@ -1,3 +1,3 @@ private defaultFont - ^ StrikeFont fontName: 'Verdana' size: 10 \ No newline at end of file + ^ StrikeFont familyName: 'Verdana' size: 10 \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchApp.class/instance/stepProcesses.st b/filetree/FromScratch.package/SpScratchApp.class/instance/stepProcesses.st index 495c53b..63d91f2 100644 --- a/filetree/FromScratch.package/SpScratchApp.class/instance/stepProcesses.st +++ b/filetree/FromScratch.package/SpScratchApp.class/instance/stepProcesses.st @@ -1,7 +1,6 @@ processes stepProcesses - process ifNil: [ ^ self ]. - process step. + process ifNotNil: [ process step ]. updateInfoCount := updateInfoCount + 1. updateInfoCount > self maxUpdateInfoCount ifTrue: [ updateInfoCount := 0. diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/README.md b/filetree/FromScratch.package/SpScratchLibrary.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/class/defaultSpec.st b/filetree/FromScratch.package/SpScratchLibrary.class/class/defaultSpec.st new file mode 100644 index 0000000..0540b33 --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/class/defaultSpec.st @@ -0,0 +1,9 @@ +specs +defaultSpec + ^ SpBoxLayout newHorizontal + add: #buttonMain; + add: #buttonOther; + add: #buttonAdd withConstraints: [ :c | c width: self buttonWidth ]; + add: #buttonSelect withConstraints: [ :c | c width: self buttonWidth ]; + add: #buttonDelete withConstraints: [ :c | c width: self buttonWidth ]; + yourself \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/defaultMainButtonName.st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/defaultMainButtonName.st new file mode 100644 index 0000000..a2bd77f --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/defaultMainButtonName.st @@ -0,0 +1,3 @@ +private +defaultMainButtonName + ^ 'main' \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/defaultOtherButtonName.st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/defaultOtherButtonName.st new file mode 100644 index 0000000..9dd90b1 --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/defaultOtherButtonName.st @@ -0,0 +1,3 @@ +private +defaultOtherButtonName + ^ '(none)' \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/initializePresenters.st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/initializePresenters.st new file mode 100644 index 0000000..4a7c48a --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/initializePresenters.st @@ -0,0 +1,24 @@ +initialization +initializePresenters + buttonMain := self newButton + label: self defaultMainButtonName; + icon: (self iconNamed: #page); + yourself. + buttonOther := self newButton + label: self defaultOtherButtonName; + icon: (self iconNamed: #page); + yourself. + buttonSelect := self newButton + icon: (self iconNamed: #book); + yourself. + buttonAdd := self newButton + icon: (self iconNamed: #add); + yourself. + buttonDelete := self newButton + icon: (self iconNamed: #delete); + yourself. + self focusOrder + add: buttonMain; + add: buttonSelect; + add: buttonAdd; + add: buttonDelete \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/mainLabel.st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/mainLabel.st new file mode 100644 index 0000000..72d2de8 --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/mainLabel.st @@ -0,0 +1,3 @@ +accessing +mainLabel + ^ buttonMain label asString \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/otherLabel..st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/otherLabel..st new file mode 100644 index 0000000..b9d7f53 --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/otherLabel..st @@ -0,0 +1,3 @@ +accessing +otherLabel: aString + buttonOther label: aString \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/otherLabel.st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/otherLabel.st new file mode 100644 index 0000000..56e6f06 --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/otherLabel.st @@ -0,0 +1,3 @@ +accessing +otherLabel + ^ buttonOther label asString \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/reset.st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/reset.st new file mode 100644 index 0000000..31c080d --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/reset.st @@ -0,0 +1,4 @@ +accessing +reset + self otherLabel: self defaultOtherButtonName. + self selectButton: self defaultMainButtonName \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/selectButton..st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/selectButton..st new file mode 100644 index 0000000..b5f35e0 --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/selectButton..st @@ -0,0 +1,4 @@ +accessing +selectButton: aString + buttonMain state: (self mainLabel = aString). + buttonOther state: (self otherLabel = aString) \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenAddButtonPressed..st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenAddButtonPressed..st new file mode 100644 index 0000000..13da15b --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenAddButtonPressed..st @@ -0,0 +1,3 @@ +accessing +whenAddButtonPressed: aBlock + buttonAdd action: aBlock \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenDeleteButtonPressed..st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenDeleteButtonPressed..st new file mode 100644 index 0000000..e9acdba --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenDeleteButtonPressed..st @@ -0,0 +1,3 @@ +accessing +whenDeleteButtonPressed: aBlock + buttonDelete action: aBlock \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenMainButtonPressed..st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenMainButtonPressed..st new file mode 100644 index 0000000..b8f048e --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenMainButtonPressed..st @@ -0,0 +1,3 @@ +accessing +whenMainButtonPressed: aBlock + buttonMain action: aBlock \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenOtherButtonPressed..st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenOtherButtonPressed..st new file mode 100644 index 0000000..4255423 --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenOtherButtonPressed..st @@ -0,0 +1,3 @@ +accessing +whenOtherButtonPressed: aBlock + buttonOther action: [ aBlock cull: self otherLabel ] \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenSelectButtonPressed..st b/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenSelectButtonPressed..st new file mode 100644 index 0000000..39851d0 --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/instance/whenSelectButtonPressed..st @@ -0,0 +1,3 @@ +accessing +whenSelectButtonPressed: aBlock + buttonSelect action: aBlock \ No newline at end of file diff --git a/filetree/FromScratch.package/SpScratchLibrary.class/properties.json b/filetree/FromScratch.package/SpScratchLibrary.class/properties.json new file mode 100644 index 0000000..dab1eb5 --- /dev/null +++ b/filetree/FromScratch.package/SpScratchLibrary.class/properties.json @@ -0,0 +1,17 @@ +{ + "commentStamp" : "", + "super" : "SpPresenter", + "category" : "FromScratch-Spec2", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "buttonMain", + "buttonSelect", + "buttonAdd", + "buttonDelete", + "buttonOther" + ], + "name" : "SpScratchLibrary", + "type" : "normal" +} \ No newline at end of file diff --git a/filetree/FromScratch.package/StrikeFont.extension/class/fontName.size..st b/filetree/FromScratch.package/StrikeFont.extension/class/fontName.size..st deleted file mode 100644 index 84bed1b..0000000 --- a/filetree/FromScratch.package/StrikeFont.extension/class/fontName.size..st +++ /dev/null @@ -1,3 +0,0 @@ -*FromScratch -fontName: arg1 size: arg2 - ^ self familyName: arg1 size: arg2 \ No newline at end of file diff --git a/filetree/FromScratch.package/StrikeFont.extension/properties.json b/filetree/FromScratch.package/StrikeFont.extension/properties.json deleted file mode 100644 index d2e6ff5..0000000 --- a/filetree/FromScratch.package/StrikeFont.extension/properties.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : "StrikeFont" -} \ No newline at end of file diff --git a/filetree/FromScratch.package/StringFieldMorph.class/instance/initialize.st b/filetree/FromScratch.package/StringFieldMorph.class/instance/initialize.st index 503f093..c510cee 100644 --- a/filetree/FromScratch.package/StringFieldMorph.class/instance/initialize.st +++ b/filetree/FromScratch.package/StringFieldMorph.class/instance/initialize.st @@ -5,7 +5,7 @@ initialize stringMorph := StringMorph new contents: ''; - font: (StrikeFont fontName: 'Verdana' size: 12). + font: (StrikeFont familyName: 'Verdana' size: 12). self addMorph: stringMorph. self color: Color red. diff --git a/filetree/FromScratch.package/StringMorph.extension/instance/initFieldsFrom.version..st b/filetree/FromScratch.package/StringMorph.extension/instance/initFieldsFrom.version..st index 45709dd..bbeafc3 100644 --- a/filetree/FromScratch.package/StringMorph.extension/instance/initFieldsFrom.version..st +++ b/filetree/FromScratch.package/StringMorph.extension/instance/initFieldsFrom.version..st @@ -5,7 +5,7 @@ initFieldsFrom: anObjStream version: classVersion super initFieldsFrom: anObjStream version: classVersion. fontSpec := anObjStream nextField. fontSpec ifNotNil: [ - font := StrikeFont fontName: fontSpec first size: fontSpec second]. + font := StrikeFont familyName: fontSpec first size: fontSpec second]. self initFieldsNamed: #( emphasis diff --git a/filetree/Gratch.package/GratchScript.class/instance/setupBlockCategory.st b/filetree/Gratch.package/GratchScript.class/instance/setupBlockCategory.st index d8adc21..33e3323 100644 --- a/filetree/Gratch.package/GratchScript.class/instance/setupBlockCategory.st +++ b/filetree/Gratch.package/GratchScript.class/instance/setupBlockCategory.st @@ -4,6 +4,6 @@ setupBlockCategory blockDef addCategory: 'basic' color: (Color h: 225 s: 0.65 v: 0.83); addCategory: 'color' color: (Color h: 264 s: 0.62 v: 0.89); - addCategory: 'misc' color: (Color h: 165 s: 1 v: 0.63); + "addCategory: 'misc' color: (Color h: 165 s: 1 v: 0.63);" addCategory: 'edges' color: (Color h: 165 s: 1 v: 0.63); addCategory: 'nodes' color: (Color h: 296 s: 0.66 v: 0.85) \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchFrame.class/class/defaultSpec.st b/filetree/Gratch.package/SpGratchFrame.class/class/defaultSpec.st index cd5c67f..93e7ee5 100644 --- a/filetree/Gratch.package/SpGratchFrame.class/class/defaultSpec.st +++ b/filetree/Gratch.package/SpGratchFrame.class/class/defaultSpec.st @@ -5,8 +5,10 @@ defaultSpec (SpBoxLayout newHorizontal spacing: 4; add: #logo withConstraints: [ :c | c width: 160 ]; - add: #buttonOpen withConstraints: [ :c | c width: self iconWidth ]; - add: #buttonSave withConstraints: [ :c | c width: self iconWidth ]; + add: #buttonOpen + withConstraints: [ :c | c width: self iconWidth ]; + add: #buttonSave + withConstraints: [ :c | c width: self iconWidth ]; add: #menu; yourself) withConstraints: [ :c | c height: self toolbarHeight ]; @@ -14,13 +16,17 @@ defaultSpec (SpBoxLayout newHorizontal add: #viewerPane withConstraints: [ :c | c width: self viewerPaneWidth ]; - add: #editorPane; add: - (SpBoxLayout newVertical - add: #titlePane withConstraints: [ :c | c height: self titleButtonHeight ]; - add: #stageFrame; - add: #libraryPane - withConstraints: [ :c | c height: self libraryPaneHeight ]; + (SpPanedLayout newHorizontal + add: #editorPane; + add: + (SpBoxLayout newVertical + add: #titlePane + withConstraints: [ :c | c height: self titleButtonHeight ]; + add: #stageFrame; + add: #libraryPane + withConstraints: [ :c | c height: self libraryPaneHeight ]; + yourself); yourself); yourself); yourself \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchFrame.class/class/titleButtonHeight.st b/filetree/Gratch.package/SpGratchFrame.class/class/titleButtonHeight.st index 4c31587..48b655d 100644 --- a/filetree/Gratch.package/SpGratchFrame.class/class/titleButtonHeight.st +++ b/filetree/Gratch.package/SpGratchFrame.class/class/titleButtonHeight.st @@ -1,3 +1,3 @@ private titleButtonHeight - ^ 50 \ No newline at end of file + ^ 80 \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchFrame.class/instance/initializePresenters.st b/filetree/Gratch.package/SpGratchFrame.class/instance/initializePresenters.st index 94dc297..2172775 100644 --- a/filetree/Gratch.package/SpGratchFrame.class/instance/initializePresenters.st +++ b/filetree/Gratch.package/SpGratchFrame.class/instance/initializePresenters.st @@ -4,7 +4,7 @@ initializePresenters buttonSave := self newButton. buttonOpen := self newButton. menu := self newMenuBar. - viewerPane := self instantiate: SpGratchViewer. + viewerPane := self instantiate: SpScratchListViewer. editorPane := self instantiate: SpScratchEditor. titlePane := self instantiate: SpGratchTitle. stageFrame := self instantiate: SpGratchStage. diff --git a/filetree/Gratch.package/SpGratchTitle.class/class/defaultSpec.st b/filetree/Gratch.package/SpGratchTitle.class/class/defaultSpec.st index bec3e21..fca40b0 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/class/defaultSpec.st +++ b/filetree/Gratch.package/SpGratchTitle.class/class/defaultSpec.st @@ -1,6 +1,16 @@ specs defaultSpec - ^ SpBoxLayout newHorizontal + ^ SpBoxLayout newVertical add: #labelName; - add: #toolBar; + add: + (SpBoxLayout newHorizontal + add: #buttonClearNodes; + add: #buttonClearEdges; + add: #buttonSetup; + add: #buttonStop; + add: #buttonLoop; + add: #buttonStep; + add: #buttonEvent; + add: #buttonLoopSlow; + yourself); yourself \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/buttonNamed..st b/filetree/Gratch.package/SpGratchTitle.class/instance/buttonNamed..st deleted file mode 100644 index de2562f..0000000 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/buttonNamed..st +++ /dev/null @@ -1,3 +0,0 @@ -private -buttonNamed: aString - ^ toolBar items detect: [ :each | each label = aString ] \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/clearEdgesAction..st b/filetree/Gratch.package/SpGratchTitle.class/instance/clearEdgesAction..st index c8930a5..316ab0d 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/clearEdgesAction..st +++ b/filetree/Gratch.package/SpGratchTitle.class/instance/clearEdgesAction..st @@ -1,3 +1,3 @@ accessing clearEdgesAction: aBlock - (self buttonNamed: 'ClearE') action: aBlock \ No newline at end of file + buttonClearEdges action: aBlock \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/clearNodesAction..st b/filetree/Gratch.package/SpGratchTitle.class/instance/clearNodesAction..st index 1683804..54e71b0 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/clearNodesAction..st +++ b/filetree/Gratch.package/SpGratchTitle.class/instance/clearNodesAction..st @@ -1,3 +1,3 @@ accessing clearNodesAction: aBlock - (self buttonNamed: 'ClearN') action: aBlock \ No newline at end of file + buttonClearNodes action: aBlock \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/initializePresenters.st b/filetree/Gratch.package/SpGratchTitle.class/instance/initializePresenters.st index f304cb4..b1e92c0 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/initializePresenters.st +++ b/filetree/Gratch.package/SpGratchTitle.class/instance/initializePresenters.st @@ -2,6 +2,21 @@ initialization initializePresenters labelName := self newLabel. labelName label: 'new project'. - toolBar := self newToolBar. + buttonClearEdges := self newButton. + buttonClearNodes := self newButton. + buttonEvent := self newButton. + buttonLoop := self newButton. + buttonSetup := self newButton. + buttonLoopSlow := self newButton. + buttonStop := self newButton. + buttonStep := self newButton. self setupButtons. - self focusOrder add: toolBar \ No newline at end of file + self focusOrder + add: buttonClearNodes; + add: buttonClearEdges; + add: buttonSetup; + add: buttonStop; + add: buttonLoop; + add: buttonLoopSlow; + add: buttonStep; + add: buttonEvent \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/setupButtons.st b/filetree/Gratch.package/SpGratchTitle.class/instance/setupButtons.st index 95dba9b..9e888d5 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/setupButtons.st +++ b/filetree/Gratch.package/SpGratchTitle.class/instance/setupButtons.st @@ -1,43 +1,34 @@ private setupButtons - toolBar - addItem: - (SpToolBarButton new - label: 'ClearN'; - icon: (ScratchTheme formAt: #clearNodesButtonGray); - help: 'Clear nodes' localized); - addItem: - (SpToolBarButton new - label: 'ClearE'; - icon: (ScratchTheme formAt: #clearEdgesButtonGray); - help: 'Clear edges' localized); - addItem: - (SpToolBarButton new - label: 'Setup'; - icon: (ScratchTheme formAt: #setupButtonGray); - help: 'Setup' localized); - addItem: - (SpToolBarButton new - label: 'Stop'; - icon: (ScratchTheme formAt: #stopButtonGray); - help: 'Stop' localized); - addItem: - (SpToolBarButton new - label: 'Step'; - icon: (ScratchTheme formAt: #stepButtonGray); - help: 'Step' localized); - addItem: - (SpToolBarButton new - label: 'Event'; - icon: (ScratchTheme formAt: #eventButtonGray); - help: 'Event' localized); - addItem: - (SpToolBarButton new - label: 'Slowly'; - icon: (ScratchTheme formAt: #loopSlowButtonGray); - help: 'Loop slowly' localized); - addItem: - (SpToolBarButton new - label: 'Loop'; - icon: (ScratchTheme formAt: #loopButtonGray); - help: 'Loop' localized) \ No newline at end of file + buttonClearNodes + label: 'ClearN'; + icon: (ScratchTheme formAt: #clearNodesButtonGray); + help: 'Clear nodes' localized. + buttonClearEdges + label: 'ClearE'; + icon: (ScratchTheme formAt: #clearEdgesButtonGray); + help: 'Clear edges' localized. + buttonSetup + label: 'Setup'; + icon: (ScratchTheme formAt: #setupButtonGray); + help: 'Setup' localized. + buttonStop + label: 'Stop'; + icon: (ScratchTheme formAt: #stopButtonGray); + help: 'Stop' localized. + buttonStep + label: 'Step'; + icon: (ScratchTheme formAt: #stepButtonGray); + help: 'Step' localized. + buttonEvent + label: 'Event'; + icon: (ScratchTheme formAt: #eventButtonGray); + help: 'Event' localized. + buttonLoopSlow + label: 'Slowly'; + icon: (ScratchTheme formAt: #loopSlowButtonGray); + help: 'Loop slowly' localized. + buttonLoop + label: 'Loop'; + icon: (ScratchTheme formAt: #loopButtonGray); + help: 'Loop' localized \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/startEventAction..st b/filetree/Gratch.package/SpGratchTitle.class/instance/startEventAction..st index bbd3720..e0edf6e 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/startEventAction..st +++ b/filetree/Gratch.package/SpGratchTitle.class/instance/startEventAction..st @@ -1,3 +1,3 @@ accessing startEventAction: aBlock - (self buttonNamed: 'Event') action: aBlock \ No newline at end of file + buttonEvent action: aBlock \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/startLoopAction..st b/filetree/Gratch.package/SpGratchTitle.class/instance/startLoopAction..st index 8e4e30d..5b72184 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/startLoopAction..st +++ b/filetree/Gratch.package/SpGratchTitle.class/instance/startLoopAction..st @@ -1,3 +1,3 @@ accessing startLoopAction: aBlock - (self buttonNamed: 'Loop') action: aBlock \ No newline at end of file + buttonLoop action: aBlock \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/startLoopSlowAction..st b/filetree/Gratch.package/SpGratchTitle.class/instance/startLoopSlowAction..st index c5897a9..4cf3303 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/startLoopSlowAction..st +++ b/filetree/Gratch.package/SpGratchTitle.class/instance/startLoopSlowAction..st @@ -1,3 +1,3 @@ accessing startLoopSlowAction: aBlock - (self buttonNamed: 'Slowly') action: aBlock \ No newline at end of file + buttonLoopSlow action: aBlock \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/startSetupAction..st b/filetree/Gratch.package/SpGratchTitle.class/instance/startSetupAction..st index aadc5e3..2a03ff6 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/startSetupAction..st +++ b/filetree/Gratch.package/SpGratchTitle.class/instance/startSetupAction..st @@ -1,3 +1,3 @@ accessing startSetupAction: aBlock - (self buttonNamed: 'Setup') action: aBlock \ No newline at end of file + buttonSetup action: aBlock \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/stepLoopAction..st b/filetree/Gratch.package/SpGratchTitle.class/instance/stepLoopAction..st index 0bd7280..7e56190 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/stepLoopAction..st +++ b/filetree/Gratch.package/SpGratchTitle.class/instance/stepLoopAction..st @@ -1,3 +1,3 @@ accessing stepLoopAction: aBlock - (self buttonNamed: 'Step') action: aBlock \ No newline at end of file + buttonStep action: aBlock \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/instance/stopAllAction..st b/filetree/Gratch.package/SpGratchTitle.class/instance/stopAllAction..st index 3d5014c..6c73359 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/instance/stopAllAction..st +++ b/filetree/Gratch.package/SpGratchTitle.class/instance/stopAllAction..st @@ -1,3 +1,3 @@ accessing stopAllAction: aBlock - (self buttonNamed: 'Stop') action: aBlock \ No newline at end of file + buttonStop action: aBlock \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchTitle.class/properties.json b/filetree/Gratch.package/SpGratchTitle.class/properties.json index 970ba82..09cc76f 100644 --- a/filetree/Gratch.package/SpGratchTitle.class/properties.json +++ b/filetree/Gratch.package/SpGratchTitle.class/properties.json @@ -7,7 +7,14 @@ "classvars" : [ ], "instvars" : [ "labelName", - "toolBar" + "buttonClearEdges", + "buttonClearNodes", + "buttonEvent", + "buttonLoop", + "buttonSetup", + "buttonLoopSlow", + "buttonStop", + "buttonStep" ], "name" : "SpGratchTitle", "type" : "normal" diff --git a/filetree/Gratch.package/SpGratchViewer.class/class/buttons.st b/filetree/Gratch.package/SpGratchViewer.class/class/buttons.st deleted file mode 100644 index 23b6209..0000000 --- a/filetree/Gratch.package/SpGratchViewer.class/class/buttons.st +++ /dev/null @@ -1,6 +0,0 @@ -accessing -buttons - ^ #(#(buttonBasic basic) #(buttonControl control) - #(buttonColor color) #(buttonSensing sensing) - #(buttonNodes nodes) #(buttonOperators operators) - #(buttonEdges edges) #(buttonVariables variables)) \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchViewer.class/instance/connectPresenters.st b/filetree/Gratch.package/SpGratchViewer.class/instance/connectPresenters.st deleted file mode 100644 index 8df37b1..0000000 --- a/filetree/Gratch.package/SpGratchViewer.class/instance/connectPresenters.st +++ /dev/null @@ -1,10 +0,0 @@ -initialization -connectPresenters - buttonBasic action: [ self currentCategory: #basic ]. - buttonNodes action: [ self currentCategory: #nodes ]. - buttonEdges action: [ self currentCategory: #edges ]. - buttonControl action: [ self currentCategory: #control ]. - buttonColor action: [ self currentCategory: #color ]. - buttonOperators action: [ self currentCategory: #operators ]. - buttonVariables action: [ self currentCategory: #variables ]. - buttonSensing action: [ self currentCategory: #sensing ] \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchViewer.class/instance/setupButtons.st b/filetree/Gratch.package/SpGratchViewer.class/instance/setupButtons.st deleted file mode 100644 index 89569a5..0000000 --- a/filetree/Gratch.package/SpGratchViewer.class/instance/setupButtons.st +++ /dev/null @@ -1,26 +0,0 @@ -initialization -setupButtons - buttonBasic := self newButton - label: 'Basic'; - yourself. - buttonNodes := self newButton - label: 'Nodes'; - yourself. - buttonEdges := self newButton - label: 'Edges'; - yourself. - buttonControl := self newButton - label: 'Control'; - yourself. - buttonColor := self newButton - label: 'Color'; - yourself. - buttonSensing := self newButton - label: 'Sensing'; - yourself. - buttonOperators := self newButton - label: 'Operators'; - yourself. - buttonVariables := self newButton - label: 'Variables'; - yourself \ No newline at end of file diff --git a/filetree/Gratch.package/SpGratchViewer.class/properties.json b/filetree/Gratch.package/SpGratchViewer.class/properties.json deleted file mode 100644 index 533cd07..0000000 --- a/filetree/Gratch.package/SpGratchViewer.class/properties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "commentStamp" : "", - "super" : "SpScratchViewer", - "category" : "Gratch-Spec2", - "classinstvars" : [ ], - "pools" : [ ], - "classvars" : [ ], - "instvars" : [ - "buttonBasic", - "buttonControl", - "buttonColor", - "buttonPatch", - "buttonOperators", - "buttonMisc", - "buttonVariables", - "buttonSensing", - "buttonNodes", - "buttonEdges" - ], - "name" : "SpGratchViewer", - "type" : "normal" -} \ No newline at end of file