More view for Markdown document trees.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-04-05 19:03:26 -05:00
parent cf08d18fb2
commit b7a82ab374
5 changed files with 94 additions and 1 deletions

View File

@ -48,5 +48,5 @@ PPCMDocument >> viewChildrenFor: aView [
items: [ { self } ]; items: [ { self } ];
children: #children; children: #children;
column: 'Name' text: #viewBody; column: 'Name' text: #viewBody;
expandUpTo: 6 expandUpTo: 7
] ]

View File

@ -35,3 +35,26 @@ PPCMLine >> text [
children do: [ :child | stream nextPutAll: child text ]. children do: [ :child | stream nextPutAll: child text ].
^ stream contents ^ stream contents
] ]
{ #category : #accessing }
PPCMLine >> viewBody [
| aText |
aText := (self className ,' ', self text) asRopedText.
self children do: [ :child |
aText append: ' ' asRopedText.
aText append: (child text asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append: ('= "' asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append: (child text asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append:
('"' asRopedText foreground:
BrGlamorousColors disabledButtonTextColor)
].
^ aText
]

View File

@ -43,3 +43,27 @@ PPCMLink >> title [
PPCMLink >> title: anObject [ PPCMLink >> title: anObject [
title := anObject title := anObject
] ]
{ #category : #accessing }
PPCMLink >> viewBody [
| aText |
aText := (self className ,' ',
self label children first text, ' -> ', self destination) asRopedText.
self children do: [ :child |
aText append: ' ' asRopedText.
aText append: (child destination asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append: ('= "' asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append: (child destination asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append:
('"' asRopedText foreground:
BrGlamorousColors disabledButtonTextColor)
].
^ aText
]

View File

@ -8,3 +8,26 @@ Class {
PPCMSoftBreak >> accept: visitor [ PPCMSoftBreak >> accept: visitor [
^ visitor visitSoftBreak: self ^ visitor visitSoftBreak: self
] ]
{ #category : #accessing }
PPCMSoftBreak >> viewBody [
| aText |
aText := (self className ,' ', self text) asRopedText.
self children do: [ :child |
aText append: ' ' asRopedText.
aText append: (child text asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append: ('= "' asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append: (child text asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append:
('"' asRopedText foreground:
BrGlamorousColors disabledButtonTextColor)
].
^ aText
]

View File

@ -53,3 +53,26 @@ PPCMText >> text [
PPCMText >> text: anObject [ PPCMText >> text: anObject [
text := anObject text := anObject
] ]
{ #category : #accessing }
PPCMText >> viewBody [
| aText |
aText := (self className ,' ', self text) asRopedText.
self children do: [ :child |
aText append: ' ' asRopedText.
aText append: (child text asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append: ('= "' asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append: (child text asRopedText foreground:
BrGlamorousColors disabledButtonTextColor).
aText append:
('"' asRopedText foreground:
BrGlamorousColors disabledButtonTextColor)
].
^ aText
]