-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
338 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CI | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build": | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-18.04] | ||
smalltalk: [ Squeak64-trunk ] | ||
name: ${{ matrix.smalltalk }} on ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: hpi-swa/setup-smalltalkCI@v1 | ||
with: | ||
smalltalk-version: ${{ matrix.smalltalk }} | ||
- run: smalltalkci -s ${{ matrix.smalltalk }} | ||
timeout-minutes: 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,5 @@ os: | |
- osx | ||
|
||
smalltalk: | ||
- Squeak-5.2 | ||
- Squeak-5.1 | ||
- Squeak64-trunk | ||
- Squeak64-5.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextDocument.class/class/initialBoldStructure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
initialBoldStructure | ||
|
||
^ TextStructure newWith: #bold withEmphasis: (self defaultStyles union: {#bold}) |
7 changes: 7 additions & 0 deletions
7
...ges/RichTextEditing-Core.package/RichTextDocument.class/class/initialFootnoteStructure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
constants | ||
initialFootnoteStructure | ||
|
||
^ (TextStructure | ||
newWith: #footnote | ||
withEmphasis: self defaultStyles) | ||
font: (StrikeFont createDejaVuDark: 9) |
7 changes: 7 additions & 0 deletions
7
...ges/RichTextEditing-Core.package/RichTextDocument.class/class/initialHeading1Structure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
constants | ||
initialHeading1Structure | ||
|
||
^ (TextStructure | ||
newWith: #heading1 | ||
withEmphasis: (self defaultStyles union: {#bold})) | ||
font: (StrikeFont createDejaVuDark: 20) |
7 changes: 7 additions & 0 deletions
7
...ges/RichTextEditing-Core.package/RichTextDocument.class/class/initialHeading2Structure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
constants | ||
initialHeading2Structure | ||
|
||
^ (TextStructure | ||
newWith: #heading2 | ||
withEmphasis: (self defaultStyles union: {#bold})) | ||
font: (StrikeFont createDejaVuDark: 17) |
7 changes: 7 additions & 0 deletions
7
...ges/RichTextEditing-Core.package/RichTextDocument.class/class/initialHeading3Structure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
constants | ||
initialHeading3Structure | ||
|
||
^ (TextStructure | ||
newWith: #heading3 | ||
withEmphasis: (self defaultStyles union: {#bold})) | ||
font: (StrikeFont createDejaVuDark: 14) |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextDocument.class/class/initialItalicStructure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
initialItalicStructure | ||
|
||
^ TextStructure newWith: #italic withEmphasis: (self defaultStyles union: {#italic}) |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextDocument.class/class/initialListStructure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
initialListStructure | ||
|
||
^ TextStructure newWith: #list withEmphasis: (self defaultStyles union: {#indented}) |
15 changes: 8 additions & 7 deletions
15
packages/RichTextEditing-Core.package/RichTextDocument.class/class/initialTextStructures.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
constants | ||
initialTextStructures | ||
|
||
^ {TextStructure newWith: #bold withEmphasis: (self defaultStyles union: {#bold}). | ||
TextStructure newWith: #italic withEmphasis: (self defaultStyles union: {#italic}). | ||
TextStructure newWith: #underlined withEmphasis: (self defaultStyles union: {#underlined}). | ||
TextStructure newWith: #footnote withEmphasis: self defaultStyles. | ||
TextStructure newWith: #heading1 withEmphasis: self defaultStyles. | ||
TextStructure newWith: #heading2 withEmphasis: self defaultStyles. | ||
TextStructure newWith: #heading3 withEmphasis: self defaultStyles} asOrderedCollection | ||
^ {self initialBoldStructure. | ||
self initialItalicStructure. | ||
self initialUnderlinedStructure. | ||
self initialFootnoteStructure. | ||
self initialHeading1Structure. | ||
self initialHeading2Structure. | ||
self initialHeading3Structure. | ||
self initialListStructure} asOrderedCollection |
6 changes: 6 additions & 0 deletions
6
...s/RichTextEditing-Core.package/RichTextDocument.class/class/initialUnderlinedStructure.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
constants | ||
initialUnderlinedStructure | ||
|
||
^ TextStructure | ||
newWith: #underlined | ||
withEmphasis: (self defaultStyles union: {#underlined}) |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/charcount.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
count | ||
charcount | ||
|
||
^ self charcountExcept: self emptyChars |
8 changes: 8 additions & 0 deletions
8
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/charcountExcept..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
count | ||
charcountExcept: aListOfBytecodes | ||
|
||
| byteString count| | ||
count := 0. | ||
byteString := self text string asByteArray. | ||
|
||
^ byteString count: [:each | (aListOfBytecodes includes: each) not] |
5 changes: 5 additions & 0 deletions
5
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/emptyChars.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
count | ||
emptyChars | ||
"9: Horizontal tab, 10: Line Feed, 13: Carriage return, 32: Space" | ||
|
||
^ #(9 10 13 32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/RichTextEditing-Core.package/RichTextDocument.class/instance/wordcount.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
count | ||
wordcount | ||
|
||
| prev bool byteString| | ||
byteString := self text string asByteArray. | ||
prev := self emptyChars first. | ||
^ (byteString count: [:each | bool := ((self emptyChars includes: each) not and: (self emptyChars includes: prev)). prev := each. bool ]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ges/RichTextEditing-Core.package/RichTextEditorModel.class/class/yellowButtonMenuItems.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
accessing | ||
yellowButtonMenuItems | ||
"Returns the standard yellow button menu items" | ||
^{ | ||
#-. | ||
{'find...(f)' translated. #find}. | ||
{'find again (g)' translated. #findAgain}. | ||
{'find and replace ...' translated. #findReplace}. | ||
{'do/replace again (j)' translated. #again}. | ||
#-. | ||
{'undo (z)' translated. #undo}. | ||
{'redo (Z)' translated. #redo}. | ||
#-. | ||
{'copy (c)' translated. #copySelection}. | ||
{'cut (x)' translated. #cut}. | ||
{'paste (v)' translated. #paste}. | ||
{'paste...' translated. #pasteRecent}. | ||
#-. | ||
{'save (s)' translated. #saveText}. | ||
{'save as' translated. #saveDocumentInSaverWithNamePrompt}. | ||
{'cancel (l)' translated. #cancel}. | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildFooterWith..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
toolbuilder | ||
buildFooterWith: aBuilder | ||
|
||
^ aBuilder pluggableTextSpec new | ||
name: 'footer'; | ||
model: self; | ||
frame: (0 @ 0.9 corner: 1 @ 1); | ||
readOnly: true; | ||
getText: #footerText; | ||
minimumHeight: 20; | ||
indicateUnacceptedChanges: false; | ||
yourself |
9 changes: 9 additions & 0 deletions
9
...s/RichTextEditing-Core.package/RichTextEditorModel.class/instance/buildInfoButtonWith..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
toolbuilder | ||
buildInfoButtonWith: aBuilder | ||
|
||
^ aBuilder pluggableButtonSpec new | ||
model: self; | ||
frame: (0.75 @ 0 corner: 0.875 @ 0.1); | ||
label: 'Info'; | ||
action: #showInfo; | ||
yourself |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/footer..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
footer: aFooter | ||
|
||
footer := aFooter |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/footer.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
footer | ||
|
||
^ footer |
7 changes: 7 additions & 0 deletions
7
packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/footerText.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
document information | ||
footerText | ||
|
||
| footerString| | ||
footerString := 'You are using SquidWord · '. | ||
footerString := (footerString, self bufferDocument wordcount), ' words'. | ||
^ footerString |
8 changes: 8 additions & 0 deletions
8
packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/showInfo.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
document information | ||
showInfo | ||
|
||
| window infoText| | ||
infoText := 'Word count: ', self bufferDocument wordcount. | ||
infoText := infoText , String crlf, 'Total characters: ', (self bufferDocument charcountExcept: #()). | ||
infoText := infoText, String crlf, 'Non-blank characters: ', self bufferDocument charcount. | ||
window := UserDialogBoxMorph inform: infoText title: self label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ textChanged | |
|
||
self changed: #text; | ||
unacceptedEdits; | ||
fitParagraphs | ||
fitParagraphs; | ||
updateFooter |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/updateFooter.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
document information | ||
updateFooter | ||
|
||
self footer ifNotNil: [self footer setText: self footerText] |
Oops, something went wrong.