/
GLMHighlighterTextRubEditingMode.class.st
60 lines (46 loc) · 1.43 KB
/
GLMHighlighterTextRubEditingMode.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"
This is a framework class that can be used by clients that create custom browsers containing text presentations with custom highlighters.
Usage example:
GLMRubricHighlightedTextPresentation new
editingMode: [
GLMHighlighterTextRubEditingMode withStylerDecorator:
GLMHighlighterTextStylerDecorator new ].
"
Class {
#name : #GLMHighlighterTextRubEditingMode,
#superclass : #RubEditingMode,
#instVars : [
'stylerDecorator'
],
#category : #'Glamour-Rubric-Presentations'
}
{ #category : #'instance creation' }
GLMHighlighterTextRubEditingMode class >> withStylerDecorator: aDecorator [
^ self new stylerDecorator: aDecorator
]
{ #category : #accessing }
GLMHighlighterTextRubEditingMode >> stylerDecorator [
^ stylerDecorator
]
{ #category : #accessing }
GLMHighlighterTextRubEditingMode >> stylerDecorator: anObject [
stylerDecorator := anObject
]
{ #category : #initialization }
GLMHighlighterTextRubEditingMode >> updateTextAreaWhenPlugged [
self withStyler.
super updateTextAreaWhenPlugged
]
{ #category : #initialization }
GLMHighlighterTextRubEditingMode >> updateTextAreaWhenUnplugged [
self withoutStyler.
super updateTextAreaWhenUnplugged
]
{ #category : #initialization }
GLMHighlighterTextRubEditingMode >> withStyler [
self textArea withDecorator: self stylerDecorator
]
{ #category : #'initialize-release' }
GLMHighlighterTextRubEditingMode >> withoutStyler [
self textArea withoutDecorator: self stylerDecorator
]