Skip to content

Commit 797e422

Browse files
committed
added missing class
1 parent 8f772b3 commit 797e422

File tree

2 files changed

+102
-88
lines changed

2 files changed

+102
-88
lines changed
Lines changed: 7 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,14 @@
11
"
2-
I am the default Roassal inspector presenter. I work with RSContextInteraction
2+
This class is deprecated please use SpRoassalInspectorPresenter
33
"
44
Class {
5-
#name : #SpRoassalInspectorPresenter,
6-
#superclass : #SpPresenter,
7-
#instVars : [
8-
'canvas',
9-
'roassalMorph',
10-
'toolBar'
11-
],
5+
#name : #SpRoassal3InspectorPresenter,
6+
#superclass : #SpRoassalInspectorPresenter,
127
#category : #'Roassal-Inspector-SP2'
138
}
149

15-
{ #category : #layout }
16-
SpRoassalInspectorPresenter class >> defaultLayout [
17-
^ SpBoxLayout newTopToBottom
18-
add: #roassalMorph;
19-
yourself
20-
]
21-
22-
{ #category : #ports }
23-
SpRoassalInspectorPresenter >> activateOnDoubleClick [
24-
]
25-
26-
{ #category : #ports }
27-
SpRoassalInspectorPresenter >> activateOnSingleClick [
28-
]
29-
30-
{ #category : #accessing }
31-
SpRoassalInspectorPresenter >> canvas [
32-
^ canvas
33-
]
34-
35-
{ #category : #accessing }
36-
SpRoassalInspectorPresenter >> canvas: aRSCanvas [
37-
canvas := aRSCanvas.
38-
roassalMorph morph: canvas createMorph
39-
]
40-
41-
{ #category : #enumerating }
42-
SpRoassalInspectorPresenter >> createToolbarIfNecessary [
43-
| context interactions |
44-
context := canvas inspectorContext.
45-
interactions := context inspectorInteractions.
46-
interactions ifEmpty: [ ^ self ].
47-
toolBar := SpBoxLayout newLeftToRight.
48-
interactions do: [ :cls | | i |
49-
i := cls new.
50-
i canvas: canvas.
51-
toolBar add: i newButton withConstraints: [ :constraints |
52-
constraints
53-
width: 20;
54-
height: 20 ] ].
55-
self layout: (SpBoxLayout newTopToBottom
56-
add: toolBar height: 25;
57-
add: #roassalMorph;
58-
yourself)
59-
]
60-
61-
{ #category : #ports }
62-
SpRoassalInspectorPresenter >> defaultOutputPort [
63-
64-
^ self outputSelectionPort
65-
]
66-
67-
{ #category : #initialization }
68-
SpRoassalInspectorPresenter >> initializePresenters [
69-
roassalMorph := self newMorph.
70-
toolBar := self newButton.
71-
toolBar label: 'fooo'
72-
]
73-
74-
{ #category : #ports }
75-
SpRoassalInspectorPresenter >> outputActivationPort [
76-
^ SpActivationPort newPresenter: self
77-
]
78-
79-
{ #category : #ports }
80-
SpRoassalInspectorPresenter >> outputSelectionPort [
81-
^ SpActivationPort newPresenter: self
82-
]
83-
84-
{ #category : #enumerating }
85-
SpRoassalInspectorPresenter >> whenActivatedDo: aBlock [
86-
| context |
87-
self createToolbarIfNecessary.
88-
context := canvas inspectorContext.
89-
context presentation: aBlock.
90-
canvas shapes @ context.
91-
canvas
92-
when: RSShapeAddedEvent
93-
do: [ :evt | evt shape @ context ]
94-
for: self
10+
{ #category : #testing }
11+
SpRoassal3InspectorPresenter class >> isDeprecated [
12+
"please use SpRoassalInspectorPresenter"
13+
^ true
9514
]
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
"
2+
I am the default Roassal inspector presenter. I work with RSContextInteraction
3+
"
4+
Class {
5+
#name : #SpRoassalInspectorPresenter,
6+
#superclass : #SpPresenter,
7+
#instVars : [
8+
'canvas',
9+
'roassalMorph',
10+
'toolBar'
11+
],
12+
#category : #'Roassal-Inspector-SP2'
13+
}
14+
15+
{ #category : #layout }
16+
SpRoassalInspectorPresenter class >> defaultLayout [
17+
^ SpBoxLayout newTopToBottom
18+
add: #roassalMorph;
19+
yourself
20+
]
21+
22+
{ #category : #ports }
23+
SpRoassalInspectorPresenter >> activateOnDoubleClick [
24+
]
25+
26+
{ #category : #ports }
27+
SpRoassalInspectorPresenter >> activateOnSingleClick [
28+
]
29+
30+
{ #category : #accessing }
31+
SpRoassalInspectorPresenter >> canvas [
32+
^ canvas
33+
]
34+
35+
{ #category : #accessing }
36+
SpRoassalInspectorPresenter >> canvas: aRSCanvas [
37+
canvas := aRSCanvas.
38+
roassalMorph morph: canvas createMorph
39+
]
40+
41+
{ #category : #enumerating }
42+
SpRoassalInspectorPresenter >> createToolbarIfNecessary [
43+
| context interactions |
44+
context := canvas inspectorContext.
45+
interactions := context inspectorInteractions.
46+
interactions ifEmpty: [ ^ self ].
47+
toolBar := SpBoxLayout newLeftToRight.
48+
interactions do: [ :cls | | i |
49+
i := cls new.
50+
i canvas: canvas.
51+
toolBar add: i newButton withConstraints: [ :constraints |
52+
constraints
53+
width: 20;
54+
height: 20 ] ].
55+
self layout: (SpBoxLayout newTopToBottom
56+
add: toolBar height: 25;
57+
add: #roassalMorph;
58+
yourself)
59+
]
60+
61+
{ #category : #ports }
62+
SpRoassalInspectorPresenter >> defaultOutputPort [
63+
64+
^ self outputSelectionPort
65+
]
66+
67+
{ #category : #initialization }
68+
SpRoassalInspectorPresenter >> initializePresenters [
69+
roassalMorph := self newMorph.
70+
toolBar := self newButton.
71+
toolBar label: 'fooo'
72+
]
73+
74+
{ #category : #ports }
75+
SpRoassalInspectorPresenter >> outputActivationPort [
76+
^ SpActivationPort newPresenter: self
77+
]
78+
79+
{ #category : #ports }
80+
SpRoassalInspectorPresenter >> outputSelectionPort [
81+
^ SpActivationPort newPresenter: self
82+
]
83+
84+
{ #category : #enumerating }
85+
SpRoassalInspectorPresenter >> whenActivatedDo: aBlock [
86+
| context |
87+
self createToolbarIfNecessary.
88+
context := canvas inspectorContext.
89+
context presentation: aBlock.
90+
canvas shapes @ context.
91+
canvas
92+
when: RSShapeAddedEvent
93+
do: [ :evt | evt shape @ context ]
94+
for: self
95+
]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy