Skip to content

Commit

Permalink
Update for PR pharo-project/pharo#7163
Browse files Browse the repository at this point in the history
  • Loading branch information
akevalion committed Aug 27, 2020
1 parent 90c0087 commit 8a9eaa6
Show file tree
Hide file tree
Showing 24 changed files with 86 additions and 68 deletions.
1 change: 1 addition & 0 deletions src/Roassal3-Animation-Tests/RSAnimationTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ RSAnimationTest >> runAnimation: animation threshold: threshold [

{ #category : #running }
RSAnimationTest >> setUp [
super setUp.
canvas := RSCanvas new.
]
2 changes: 1 addition & 1 deletion src/Roassal3-Chart-Tests/RSAbstractChartTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RSAbstractChartTest >> classToTest [
self subclassResponsibility
]

{ #category : #tests }
{ #category : #running }
RSAbstractChartTest >> setUp [
super setUp.
chart := RSChart new.
Expand Down
1 change: 0 additions & 1 deletion src/Roassal3-Chart/RSLabelGenerator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ RSLabelGenerator >> flooredMod: a n: num [
{ #category : #initialization }
RSLabelGenerator >> initialize [
super initialize.
nice := nil.
loose := false.
w := #(0.25 0.2 0.5 0.05).
self nice: RSNiceStepSizeGenerator new.
Expand Down
5 changes: 2 additions & 3 deletions src/Roassal3-Global-Tests/RSDependencyTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ RSDependencyTest >> testDependencies [

"Chart uses RSLocation from Layouts"
self assertPackage: 'Roassal3-Chart' dependOn: 'Roassal3-Layouts'.
"not a core package then we can not depent on this package"
(self hasPackage: 'Roassal3-Spec-Examples') ifFalse: [ ^ self ].
self assertPackage: 'Roassal3-Spec-Examples' dependOn: 'Roassal3-Menu'.

self assertPackage: 'Roassal3' dependOn: 'Announcements-Core'.
]
1 change: 1 addition & 0 deletions src/Roassal3-Global-Tests/RSForceBasedLayoutTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Class {

{ #category : #running }
RSForceBasedLayoutTest >> setUp [
super setUp.
canvas := RSCanvas new.
classes := Collection withAllSubclasses collect:[:cls |
RSBox new model: cls; size: 10; yourself].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Class {

{ #category : #running }
RSDraggableCanvasTest >> setUp [
super setUp.
canvas := RSCanvas new.
canvas add: (RSEllipse new width: 40; height: 20; yourself).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Class {

{ #category : #running }
RSSearchInCanvasTest >> setUp [
super setUp.
c := RSCanvas new.
shapes := (1 to: 10) * 100
collect: [ :n |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Class {

{ #category : #running }
RSTransformableTest >> setUp [
super setUp.
canvas := RSCanvas new.
shapes := (1 to: 5)
collect: [ :i | RSBox new size: 10; position: 10@10 * i]
Expand Down
7 changes: 0 additions & 7 deletions src/Roassal3-Layouts/RSEdgeDrivenLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,6 @@ RSEdgeDrivenLayout >> fromPositions: anArray [
fromPositions := anArray
]

{ #category : #'initialize-release' }
RSEdgeDrivenLayout >> initialize [
"Initialization"
super initialize.
edges := nil.
]

{ #category : #testing }
RSEdgeDrivenLayout >> isEdgeDrivenLayout [
^ true
Expand Down
12 changes: 10 additions & 2 deletions src/Roassal3-Menu/RSWorldMenu.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RSWorldMenu class >> menu01ReportABugOn: aBuilder [
order: 1;
label: 'Report a Bug';
icon: (self iconNamed: 'smallDebug');
help: 'Will open the github page to report an issue';
action: [ WebBrowser openOn: 'https://github.com/ObjectProfile/Roassal3/issues/new' ]
]

Expand All @@ -50,6 +51,7 @@ RSWorldMenu class >> menu02GithubOn: aBuilder [
parent: #Roassal3;
order: 2;
label: 'Github';
help: 'Open Roassal3 git hubpage';
icon: (self iconNamed: 'github');
action: [ WebBrowser openOn: 'https://github.com/ObjectProfile/Roassal3/' ]
]
Expand All @@ -61,17 +63,20 @@ RSWorldMenu class >> menu03DiscordOn: aBuilder [
parent: #Roassal3;
order: 3;
label: 'Chat with us';
help: 'Will open discord web to chat with us in Pharo server';
icon: self discord;
action: [ WebBrowser openOn: 'https://discord.gg/YTEaAu6' ]
]

{ #category : #menu }
RSWorldMenu class >> menu04DocumentationOn: aBuilder [
<worldMenu>

(aBuilder item: #Roassal3Documentation)
parent: #Roassal3;
order: 4;
label: 'Online documentation';
help: 'Will open the webpage http://AgileVisualization.com';
icon: (self iconNamed: #smallHelp);
action: [ WebBrowser openOn: 'http://AgileVisualization.com' ]
]
Expand All @@ -83,19 +88,21 @@ RSWorldMenu class >> menu05ExamplesOn: aBuilder [
parent: #Roassal3;
order: 5;
label: 'Examples';
help: 'Browse examples packages for Roassal3';
icon: self roassalIcon;
action: [ (RPackageOrganizer default packageNamed: 'Roassal3-Examples') browse ]
]

{ #category : #menu }
RSWorldMenu class >> menu06PluginsOn: aBuilder [
<worldMenu>
"<worldMenu>
(aBuilder item: #Roassal3Plugins)
parent: #Roassal3;
order: 6;
label: 'Plugins';
help: 'TODO';
icon: self roassalIcon;
action: [ self inform: 'TODO' ]
action: [ self inform: 'TODO' ]"
]

{ #category : #menu }
Expand All @@ -105,6 +112,7 @@ RSWorldMenu class >> menu11SelfOn: aBuilder [
parent: #Roassal3;
order: 11;
label: 'This menu';
help: 'Open RSWorldMenu';
icon: (self iconNamed: 'smallExport');
action: [ self browse ]
]
Expand Down
1 change: 1 addition & 0 deletions src/Roassal3-Shapes-Tests/RSBoundingTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Class {

{ #category : #running }
RSBoundingTest >> setUp [
super setUp.
canvas := RSCanvas new
]

Expand Down
2 changes: 1 addition & 1 deletion src/Roassal3-Shapes-Tests/RSEdgeBuilderTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ RSEdgeBuilderTest >> testFromObjectsToElements [

{ #category : #tests }
RSEdgeBuilderTest >> testHasEdges [
| e s1 s2 |
| s1 s2 |
s1 := canvas nodes first.
s2 := canvas nodes second.
self deny: s1 hasEdges.
Expand Down
1 change: 1 addition & 0 deletions src/Roassal3-Shapes-Tests/RSLabelTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Class {

{ #category : #running }
RSLabelTest >> setUp [
super setUp.
canvas := RSCanvas new
]

Expand Down
1 change: 1 addition & 0 deletions src/Roassal3-Shapes-Tests/RSLinesTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Class {

{ #category : #running }
RSLinesTest >> setUp [
super setUp.
canvas := RSCanvas new
]

Expand Down
4 changes: 2 additions & 2 deletions src/Roassal3-Shapes/RSArrowedLine.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RSArrowedLine >> border: aRSBorder [
self markersDo: [ :m | m shape border: aRSBorder ].
]

{ #category : #initialization }
{ #category : #copying }
RSArrowedLine >> copy [
| copy head |
copy := super copy.
Expand All @@ -66,7 +66,7 @@ RSArrowedLine >> initialize [
self markerEnd: self defaultHead.
]

{ #category : #initialization }
{ #category : #copying }
RSArrowedLine >> postCopy [
super postCopy.
markers := nil.
Expand Down
1 change: 0 additions & 1 deletion src/Roassal3-Shapes/RSBorder.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ RSBorder >> initialize [
super initialize.
paint := Color black.
width := 1.
style := nil
]

{ #category : #'style-join' }
Expand Down
13 changes: 0 additions & 13 deletions src/Roassal3-Shapes/RSBoundingShape.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -339,19 +339,6 @@ RSBoundingShape >> transform: aPoint [
^ matrix transform: aPoint
]

{ #category : #actions }
RSBoundingShape >> translateTo: aPoint [
| oldPosition |
oldPosition := self position.
oldPosition = aPoint ifTrue: [ ^ self ].
self position: aPoint.
self announce: [RSPositionChangedEvent new
shape: self;
oldPosition: oldPosition;
newPosition: aPoint ].

]

{ #category : #edges }
RSBoundingShape >> updateConnectedEdges [
self shouldUpdateEdges
Expand Down
12 changes: 11 additions & 1 deletion src/Roassal3-Shapes/RSComposite.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ RSComposite >> hasChildren [
{ #category : #initialization }
RSComposite >> initialize [
super initialize.
paint := nil.
self paint: nil.
self resetPath.

]
Expand Down Expand Up @@ -278,6 +278,16 @@ RSComposite >> privateNodes: aRSGroup [
nodes := aRSGroup
]

{ #category : #private }
RSComposite >> privateShapes [
^ children
]

{ #category : #private }
RSComposite >> privateShapes: aCollection [
children := aCollection
]

{ #category : #actions }
RSComposite >> pushBack: aShape [
children
Expand Down
32 changes: 32 additions & 0 deletions src/Roassal3-Spec-Examples/RSSpecMenu.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"
I all some menus in 'Tools-Roassal3' for these examples
"
Class {
#name : #RSSpecMenu,
#superclass : #RSObject,
#category : #'Roassal3-Spec-Examples'
}

{ #category : #'*Roassal3-Spec-Examples' }
RSSpecMenu class >> menu07PalettesOn: aBuilder [
<worldMenu>
(aBuilder item: #Roassal3Palettes)
parent: #Roassal3;
order: 7;
label: 'Color palettes';
help: 'Open a color palette chooser';
icon: (self iconNamed: 'paint');
action: [ RSColorPaletteChooser new openWithSpec ]
]

{ #category : #'*Roassal3-Spec-Examples' }
RSSpecMenu class >> menu12PalettesOn: aBuilder [
<worldMenu>
(aBuilder item: #Roassal3Palettes)
parent: #Roassal3;
order: 7.1;
label: 'Easel';
help: 'Open a basic window to edit a roassal3 script';
icon: (self iconNamed: 'haloPaint');
action: [ RSEasel new openWithSpec ]
]
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
Extension { #name : #RSWorldMenu }
Extension { #name : #RSSpecMenu }

{ #category : #'*Roassal3-Spec-Examples' }
RSWorldMenu class >> menu07PalettesOn: aBuilder [
RSSpecMenu class >> menu07PalettesOn: aBuilder [
<worldMenu>
(aBuilder item: #Roassal3Palettes)
parent: #Roassal3;
order: 7;
label: 'Color palettes';
help: 'Open a color palette chooser';
icon: (self iconNamed: 'paint');
action: [ RSColorPaletteChooser new openWithSpec ]
]

{ #category : #'*Roassal3-Spec-Examples' }
RSWorldMenu class >> menu12PalettesOn: aBuilder [
RSSpecMenu class >> menu12PalettesOn: aBuilder [
<worldMenu>
(aBuilder item: #Roassal3Palettes)
parent: #Roassal3;
order: 12;
order: 7.1;
label: 'Easel';
help: 'Open a basic window to edit a roassal3 script';
icon: (self iconNamed: 'haloPaint');
action: [ RSEasel new openWithSpec ]
]
2 changes: 1 addition & 1 deletion src/Roassal3-UML/RSUMLCalypsoSettings.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RSUMLCalypsoSettings class >> lightThemeUMLClassColor: aColor [

{ #category : #accessing }
RSUMLCalypsoSettings class >> methodsLimitUML [
^ methodsLimitUML ifNil: [ methodsLimitUML := 20 ].
^ methodsLimitUML ifNil: [ methodsLimitUML := 30 ].
]

{ #category : #accessing }
Expand Down
13 changes: 0 additions & 13 deletions src/Roassal3/RSCamera.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,6 @@ RSCamera >> scale: aNumber [
newScale: aNumber ]
]

{ #category : #actions }
RSCamera >> translateTo: aPoint [
| oldPosition |
oldPosition := self position.
oldPosition = aPoint ifTrue: [ ^ self ].
self position: aPoint.
self announce: [RSPositionChangedEvent new
shape: self;
oldPosition: oldPosition;
newPosition: aPoint ].

]

{ #category : #zoom }
RSCamera >> zoomToFit [
self zoomToFit: canvas extent * 0.9
Expand Down
28 changes: 10 additions & 18 deletions src/Roassal3/RSCanvas.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,6 @@ RSCanvas >> createMorph [
^ morph
]

{ #category : #accessing }
RSCanvas >> edges [
"Return all the lines contained in the canvas."
^ self privateEdges
ifNil: [ | res |
self privateEdges: (res := RSGroup new).
res ]
]

{ #category : #'accessing - computed' }
RSCanvas >> encompassingRectangle [
^ self encompassingRectangleOf: shapes
Expand Down Expand Up @@ -281,15 +272,6 @@ RSCanvas >> morph: aMorph [
morph := aMorph
]

{ #category : #accessing }
RSCanvas >> nodes [
"Return all the shapes except lines contained in the canvas."
^ self privateNodes
ifNil: [ | res |
self privateNodes: (res := RSGroup new).
res ]
]

{ #category : #animations }
RSCanvas >> numberOfAnimations [
"Return the number of animations contained in the canvas"
Expand Down Expand Up @@ -371,6 +353,16 @@ RSCanvas >> privateNodes: aTSGroup [
nodes := aTSGroup
]

{ #category : #private }
RSCanvas >> privateShapes [
^ shapes
]

{ #category : #private }
RSCanvas >> privateShapes: aCollection [
shapes := aCollection
]

{ #category : #'shapes controling' }
RSCanvas >> pushBack: aShape [
"Shapes are ordered in the same order they are inserted. The order can be changed using #pushFront: and #pushBack.
Expand Down
Loading

0 comments on commit 8a9eaa6

Please sign in to comment.