44 lines
1.3 KiB
Smalltalk
44 lines
1.3 KiB
Smalltalk
Class {
|
|
#name : #GrafoscopioEditingArea,
|
|
#superclass : #RubEditingArea,
|
|
#category : #'Grafoscopio-Rub'
|
|
}
|
|
|
|
{ #category : #private }
|
|
GrafoscopioEditingArea >> drawSubmorphsOn: aCanvas [
|
|
|
|
"Display submorphs back to front"
|
|
|
|
| drawBlock |
|
|
submorphs isEmpty ifTrue: [^self].
|
|
drawBlock := [:canvas | submorphs reverseDo: [:m | canvas fullDrawMorph: m]].
|
|
self clipSubmorphs
|
|
ifTrue: [aCanvas clipBy: (aCanvas clipRect intersect: self clippingBounds ifNone: [ ^ self ]) during: drawBlock]
|
|
ifFalse: [drawBlock value: aCanvas].
|
|
"Draw the focus here since we are using inset bounds
|
|
for the focus rectangle."
|
|
aCanvas gfcParagraph: self paragraph bounds: self drawingBounds color: self textColor.
|
|
(scrollPane isNil and: [ self readOnly not and: [ self hasKeyboardFocus or: [ self hasFindReplaceFocus ] ] ])
|
|
ifTrue: [self drawKeyboardFocusOn: aCanvas ]
|
|
]
|
|
|
|
{ #category : #private }
|
|
GrafoscopioEditingArea >> newParagraph [
|
|
| newParagraph |
|
|
newParagraph := self privateInstantiateParagraphObject.
|
|
newParagraph textArea: self.
|
|
newParagraph container: self compositionRectangle.
|
|
^ newParagraph
|
|
]
|
|
|
|
{ #category : #private }
|
|
GrafoscopioEditingArea >> privateInstantiateParagraphObject [
|
|
^ RubOpeningClosingDelimiterDecorator next: GrafoscopioParagraph new.
|
|
|
|
]
|
|
|
|
{ #category : #private }
|
|
GrafoscopioEditingArea >> wrapped [
|
|
^ true.
|
|
]
|