109 lines
2.5 KiB
Smalltalk
109 lines
2.5 KiB
Smalltalk
Class {
|
|
#name : #GrafoscopioFlatAttributeVisitor,
|
|
#superclass : #Object,
|
|
#instVars : [
|
|
'attributes',
|
|
'level',
|
|
'listLevel',
|
|
'index'
|
|
],
|
|
#category : #'Grafoscopio-Pillar'
|
|
}
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> attributes [
|
|
^ attributes
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> index: anIndex [
|
|
index := anIndex
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> initialize [
|
|
super initialize.
|
|
level := 0
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitCommentedLine: aPRCommentedLine [
|
|
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitDocument: aPRDocument [
|
|
attributes := OrderedCollection new.
|
|
listLevel := 0
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitExternalLink: aPRExternalLink [
|
|
attributes
|
|
add: (TextColor new color: (Color fromHexString: '03A9F4'));
|
|
add: TextEmphasis underlined;
|
|
add:
|
|
(TextAction new
|
|
actOnClickBlock: [ self inform: 'Should be going to ' , aPRExternalLink reference ])
|
|
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitFigure: aPRFigure [
|
|
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitHeader: aPRHeader [
|
|
level := level + 1.
|
|
attributes
|
|
add:
|
|
(TextFontReference
|
|
toFont:
|
|
(LogicalFont
|
|
familyName: 'Source Code Pro'
|
|
pointSize: ((20 - (level * 5)) max: 10)))
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitInternalLink: aPRInternalLink [
|
|
self visitExternalLink: aPRInternalLink
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitLineBreak: aPRLineBreak [
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitListItem: aPRListItem [
|
|
aPRListItem textStart = index
|
|
ifTrue: [
|
|
attributes
|
|
add: (TextIndent tabs: 2);
|
|
add:
|
|
(TextAnchor new
|
|
anchoredMorph: (self iconNamed: #menuPin);
|
|
yourself) ]
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitParagraph: aPRParagraph [
|
|
"attributes
|
|
add:
|
|
(TextFontReference
|
|
toFont:
|
|
(LogicalFont
|
|
familyName: 'Source Code Pro'
|
|
pointSize: 10))"
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitText: aPRText [
|
|
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioFlatAttributeVisitor >> visitUnorderedList: aPRUnorderedList [
|
|
listLevel := listLevel + 1 .
|
|
]
|