|
1 | 1 | "
|
2 |
| -I am the default Roassal inspector presenter. I work with RSContextInteraction |
| 2 | +This class is deprecated please use SpRoassalInspectorPresenter |
3 | 3 | "
|
4 | 4 | Class {
|
5 |
| - #name : #SpRoassalInspectorPresenter, |
6 |
| - #superclass : #SpPresenter, |
7 |
| - #instVars : [ |
8 |
| - 'canvas', |
9 |
| - 'roassalMorph', |
10 |
| - 'toolBar' |
11 |
| - ], |
| 5 | + #name : #SpRoassal3InspectorPresenter, |
| 6 | + #superclass : #SpRoassalInspectorPresenter, |
12 | 7 | #category : #'Roassal-Inspector-SP2'
|
13 | 8 | }
|
14 | 9 |
|
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 |
95 | 14 | ]
|
0 commit comments