-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from janvrany/pr/misc-improvements-08
Misc improvements 8
- Loading branch information
Showing
7 changed files
with
105 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Extension { #name : #TRCFG } | ||
|
||
{ #category : #'*Tinyrossa-Tools-Pharo' } | ||
TRCFG >> gtInspectorCFGIn: composite [ | ||
<gtInspectorPresentationOrder: -10> | ||
composite roassal3 title: 'CFG'; initializeCanvas: [ | ||
| canvas blocksG edges | | ||
|
||
canvas := RSCanvas new. | ||
blocksG := RSGroup new. | ||
self preorderDo:[:block | | ||
| box label node | | ||
|
||
label := RSLabel new text: block name. | ||
box := RSShapeFactory box | ||
border: (RSBorder new width: 2; color: Color black); | ||
cornerRadius: 5; | ||
color: (Color gray: 0.9); | ||
width: label encompassingRectangle width + 16; | ||
height: label encompassingRectangle height + 16. | ||
RSLocation new center; outer; stick: label on: box. | ||
node := (RSComposite new model: block; shapes: { box . label }) @ RSDraggable. | ||
|
||
blocksG add: node. | ||
canvas add: node | ||
]. | ||
|
||
edges := RSEdgeBuilder arrowedLine | ||
attachPoint: RSBorderAttachPoint new; | ||
yourself. | ||
|
||
edges | ||
canvas: canvas; "moveBehind;" width: 2; | ||
shapes: blocksG; connectToAll: #successors. | ||
|
||
RSVerticalLineLayout on: blocksG. | ||
canvas @ RSCanvasController | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Extension { #name : #TRILBlock } | ||
|
||
{ #category : #'*Tinyrossa-Tools-Pharo' } | ||
TRILBlock >> gtInspectorTRILIn: composite [ | ||
<gtInspectorPresentationOrder: 35> | ||
|
||
| printer builder | | ||
|
||
builder := [ :node | | ||
| printed | | ||
|
||
printed := printer hasPrinted: node. | ||
{ node. | ||
printer print: node. | ||
printed ifTrue:[ #() ] ifFalse: [ node children collect: builder ] } | ||
]. | ||
|
||
composite fastTreeTable | ||
title: 'TRIL'; | ||
rootsExpanded; | ||
display: [ :comp | printer := TRILNodePrinter new. treetops collect: builder ]; | ||
children: [ :item | item third ]; | ||
column: 'Node' evaluated: [ :item | item second ]; | ||
column: 'ID' evaluated: [ :item | printer printId: item first ]; | ||
column: 'Location' evaluated: [ :item | | ||
| node | | ||
|
||
node := item first. | ||
node location notNil ifTrue:[ | ||
node location gtDisplayString | ||
] ifFalse:[ | ||
'' | ||
]]; | ||
yourself. | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters