Grafoscopio/repository/Grafoscopio/PRText.extension.st

52 lines
949 B
Smalltalk

Extension { #name : #PRText }
{ #category : #'*Grafoscopio' }
PRText >> formattedText [
^ self formats
inject: self text
into: [ :acc :f | f applyOn: acc from: self textStart to: self textStop ]
]
{ #category : #'*Grafoscopio' }
PRText >> isTextOrLineBreak [
^ true
]
{ #category : #'*Grafoscopio' }
PRText >> leftFormatSize [
^ self formats
inject: 0
into: [ :acc :f | acc + f leftSize ]
]
{ #category : #'*Grafoscopio' }
PRText >> next [
^ self propertyAt: #next ifAbsent: [ nil ]
]
{ #category : #'*Grafoscopio' }
PRText >> next: aText [
self propertyAt: #next put: aText.
]
{ #category : #'*Grafoscopio' }
PRText >> rightFormatSize [
^ self formats
inject: 0
into: [ :acc :f | acc + f rightSize ]
]
{ #category : #'*Grafoscopio' }
PRText >> textStart: aValue [
^ self
propertyAt: #textStart
put: aValue
]
{ #category : #'*Grafoscopio' }
PRText >> textStop: aValue [
^ self
propertyAt: #textStop
put: aValue
]