-
Notifications
You must be signed in to change notification settings - Fork 52
Home
Alexandre Bergel edited this page Apr 4, 2019
·
23 revisions
Welcome to the Roassal3 wiki!
- Acronym namespace differs. In Roassal2, Roassal classes begins with
RT
, in Roassal3 classes begins withRS
. In Roassal2, Trachel classes begins withTR
, in Roassal3 they begins withTS
. -
RTBox new
should be replaced withRSShapeBuilder box
-
RTLine edgeFrom: el1 to: el2
should be replaced withRSEdgeBuilder line from: el1; el2; edge.
For example, in Roassal2, if you wish to have some draggable boxes in a view, you could write:
"Example in Roassal2"
v := RTView new.
shape := RTBox new color: Color gray trans; size: #yourself.
elements := shape elementsOn: (30 to: 80 by: 10).
elements @ RTDraggable.
v add: elements.
RTGridLayout new gapSize: 10; on: elements.
elements @ (RTLabeled new color: Color blue).
v
Which displays:
Using Roassal3, you need to do:
"Example in Roassal3"
v := RSView new.
boxShape := RSShapeBuilder box
color: Color gray trans;
size: #yourself.
boxAndLabelShape := RSShapeBuilder composite
interactionDo: #draggable;
interactionDo: #popup;
shapes: [ :aNumber |
| group |
group := TSGroup new.
group add: (RSShapeBuilder label color: Color blue; elementOn: aNumber).
group add: (boxShape elementOn: aNumber).
RSVerticalLineLayout new gapSize: 0; center; on: group.
group
].
elements := boxAndLabelShape elementsOn: (30 to: 80 by: 10).
v addAll: elements.
RSGridLayout on: elements.
v @ RSControlsView.
v open
At that current state, Roassal3 is more verbose. However, it is significantly more expressive. In particular composite shapes are properly handled