48 lines
1.1 KiB
Smalltalk
48 lines
1.1 KiB
Smalltalk
Extension { #name : #PRDocumentItem }
|
|
|
|
{ #category : #'*Grafoscopio' }
|
|
PRDocumentItem >> formats [
|
|
| ancestors |
|
|
ancestors := (self parent ifNil: [ {} ] ifNotNil: [ self parent formats ]).
|
|
^ ancestors , (self propertyAt: #gfpFormat ifAbsent: [ Array empty ])
|
|
]
|
|
|
|
{ #category : #'*Grafoscopio' }
|
|
PRDocumentItem >> installFormat: aFormat [
|
|
(self propertyAt: #gfpFormat ifAbsentPut: [ OrderedCollection new ]) add: aFormat.
|
|
]
|
|
|
|
{ #category : #'*Grafoscopio' }
|
|
PRDocumentItem >> isLineBreak [
|
|
^ false
|
|
]
|
|
|
|
{ #category : #'*Grafoscopio' }
|
|
PRDocumentItem >> isTextOrLineBreak [
|
|
^ false
|
|
]
|
|
|
|
{ #category : #'*Grafoscopio' }
|
|
PRDocumentItem >> parent [
|
|
^ self propertyAt: #parent ifAbsent: [ nil ]
|
|
]
|
|
|
|
{ #category : #'*Grafoscopio' }
|
|
PRDocumentItem >> parent: aParent [
|
|
self propertyAt: #parent put: aParent
|
|
]
|
|
|
|
{ #category : #'*Grafoscopio' }
|
|
PRDocumentItem >> textSize [
|
|
^ self textStop - self textStart
|
|
]
|
|
|
|
{ #category : #'*Grafoscopio' }
|
|
PRDocumentItem >> textStop [
|
|
^ self
|
|
propertyAt: #textStop
|
|
ifAbsent: [ self hasChildren
|
|
ifTrue: [ self children last textStop ]
|
|
ifFalse: [ 0 ] ]
|
|
]
|