-
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
75 changed files
with
217 additions
and
188 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/RichTextEditing-Core.package/RichTextDocument.class/class/defaultStyles.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,4 +1,4 @@ | ||
constants | ||
defaultStyles | ||
|
||
^ {#extendable} asSet | ||
^ {TextStructure extendableStyle} asSet |
4 changes: 3 additions & 1 deletion
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
constants | ||
initialBoldStructure | ||
|
||
^ TextStructure newWith: #bold withEmphasis: (self defaultStyles union: {#bold}) | ||
^ TextStructure | ||
newWith: #bold | ||
withStyles: (self defaultStyles union: {TextStructure boldStyle}) |
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
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: 3 additions & 1 deletion
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
constants | ||
initialItalicStructure | ||
|
||
^ TextStructure newWith: #italic withEmphasis: (self defaultStyles union: {#italic}) | ||
^ TextStructure | ||
newWith: #italic | ||
withStyles: (self defaultStyles union: {TextStructure italicStyle}) |
4 changes: 3 additions & 1 deletion
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
constants | ||
initialListStructure | ||
|
||
^ TextStructure newWith: #list withEmphasis: (self defaultStyles union: {#indented}) | ||
^ TextStructure | ||
newWith: #list | ||
withStyles: (self defaultStyles union: {TextStructure indentedStyle}) |
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
2 changes: 1 addition & 1 deletion
2
...Editing-Core.package/RichTextDocument.class/instance/initializeStructure.withEmphasis..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,4 +1,4 @@ | ||
text structures | ||
initializeStructure: aSymbol withEmphasis: aSet | ||
|
||
self textStructures add: (TextStructure newWith: aSymbol withEmphasis: aSet) | ||
self textStructures add: (TextStructure newWith: aSymbol withStyles: aSet) |
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/RichTextEditor.class/instance/isSpecialCharacter..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 @@ | ||
input events | ||
isSpecialCharacter: aCharacter | ||
|
||
^ aCharacter isSpecial or: [self specialCharacters includes: aCharacter] |
6 changes: 6 additions & 0 deletions
6
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isStructureShortcut..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 @@ | ||
input events | ||
isStructureShortcut: aKeyboardEvent | ||
|
||
^aKeyboardEvent controlKeyPressed and: [ | ||
aKeyboardEvent shiftPressed] and: [ | ||
self class structureKeymap includes: aKeyboardEvent keyCharacter] |
6 changes: 6 additions & 0 deletions
6
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/isValidCharacter..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 @@ | ||
input events | ||
isValidCharacter: aCharacter | ||
|
||
^ aCharacter isAlphaNumeric | ||
or: [self isSpecialCharacter: aCharacter] | ||
or: [Character separators includes: aCharacter] |
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: 0 additions & 4 deletions
4
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/returnValue.st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/spaceValue.st
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/specialCharacters.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 | ||
specialCharacters | ||
|
||
^ '.$#^()_{}[]"`~:;''@%' |
2 changes: 1 addition & 1 deletion
2
...RichTextEditing-Core.package/RichTextEditor.class/instance/toggleStructureSelectionAt..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,4 +1,4 @@ | ||
as yet unclassified | ||
input events | ||
toggleStructureSelectionAt: aKeyboardEvent | ||
|
||
| keyCode | | ||
|
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: 1 addition & 6 deletions
7
packages/RichTextEditing-Core.package/RichTextStructureEditor.class/class/textStyles.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,5 @@ | ||
constants | ||
textStyles | ||
|
||
^ {#bold . | ||
#italic . | ||
#underlined . | ||
#struckOut . | ||
#extendable . | ||
#indented} asOrderedCollection | ||
^ TextStructure availableStyles asOrderedCollection | ||
|
2 changes: 1 addition & 1 deletion
2
...chTextEditing-Core.package/RichTextStructureEditor.class/instance/newNullTextStructure.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,4 +1,4 @@ | ||
initialize-release | ||
newNullTextStructure | ||
|
||
^ NullTextStructure newWith: #null withEmphasis: Set new | ||
^ NullTextStructure newWith: #null withStyles: Set new |
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
10 changes: 4 additions & 6 deletions
10
packages/RichTextEditing-Core.package/TextStructure.class/README.md
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,14 +1,12 @@ | ||
I am a TextStructure. You can add me to a text just like every other TextAttribute (e.g. Text>>addAttribute:). | ||
You can set my instance variables bold, italic, struckOut and underlined as true to have the text be rendered accordingly. You can set my instance variable color to color the text, analogously you can set my font. | ||
If you set extendable to true and continue writing, the text will keep the current structure. I am using a null object (NullTextStructure) so you do not have to check for nil values. | ||
You find all available Styles in my classes TextStructure>>availableStyles method. | ||
The stylesActivated dictionary contains the information on which styles are active on me. | ||
|
||
My instance variables are: | ||
structureIdentifier - aSymbol | ||
bold - aBoolean | ||
italic - aBoolean | ||
underlined - aBoolean | ||
struckOut - aBoolean | ||
extendable - aBoolean | ||
color - aColor | ||
font - aFont (e.g. StrikeFont) | ||
styleSet - aSet | ||
styleSet - aSet | ||
stylesActived - aSet |
5 changes: 5 additions & 0 deletions
5
packages/RichTextEditing-Core.package/TextStructure.class/class/availableStyles.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 @@ | ||
constants | ||
availableStyles | ||
|
||
^ {self boldStyle .self italicStyle . self underlinedStyle . | ||
self struckOutStyle . self extendableStyle . self indentedStyle} |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/TextStructure.class/class/boldStyle.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 | ||
boldStyle | ||
|
||
^ #bold |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/TextStructure.class/class/extendableStyle.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 | ||
extendableStyle | ||
|
||
^ #extendable |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/TextStructure.class/class/indentedStyle.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 | ||
indentedStyle | ||
|
||
^ #indented |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/TextStructure.class/class/italicStyle.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 | ||
italicStyle | ||
|
||
^ #italic |
2 changes: 1 addition & 1 deletion
2
...ture.class/class/newWith.withEmphasis..st → ...ucture.class/class/newWith.withStyles..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
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/TextStructure.class/class/struckOutStyle.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 | ||
struckOutStyle | ||
|
||
^ #struckOut |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/TextStructure.class/class/underlinedStyle.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 | ||
underlinedStyle | ||
|
||
^ #underlined |
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
5 changes: 5 additions & 0 deletions
5
packages/RichTextEditing-Core.package/TextStructure.class/instance/initializeStyles.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 @@ | ||
initialize-release | ||
initializeStyles | ||
|
||
self stylesActivated: Dictionary new. | ||
self class availableStyles do: [:style | self stylesActivated at: style put: false] |
2 changes: 1 addition & 1 deletion
2
packages/RichTextEditing-Core.package/TextStructure.class/instance/isBold.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,4 +1,4 @@ | ||
testing | ||
isBold | ||
|
||
^ bold | ||
^ self stylesActivated at: self class boldStyle |
2 changes: 1 addition & 1 deletion
2
packages/RichTextEditing-Core.package/TextStructure.class/instance/isExtendable.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,4 +1,4 @@ | ||
testing | ||
isExtendable | ||
|
||
^ extendable | ||
^ self stylesActivated at: self class extendableStyle |
2 changes: 1 addition & 1 deletion
2
packages/RichTextEditing-Core.package/TextStructure.class/instance/isIndented.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,4 +1,4 @@ | ||
testing | ||
isIndented | ||
|
||
^ indented | ||
^ self stylesActivated at: self class indentedStyle |
2 changes: 1 addition & 1 deletion
2
packages/RichTextEditing-Core.package/TextStructure.class/instance/isItalic.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,4 +1,4 @@ | ||
testing | ||
isItalic | ||
|
||
^ italic | ||
^ self stylesActivated at: self class italicStyle |
2 changes: 1 addition & 1 deletion
2
packages/RichTextEditing-Core.package/TextStructure.class/instance/isStruckOut.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,4 +1,4 @@ | ||
testing | ||
isStruckOut | ||
|
||
^ struckOut | ||
^ self stylesActivated at: self class struckOutStyle |
2 changes: 1 addition & 1 deletion
2
packages/RichTextEditing-Core.package/TextStructure.class/instance/isTextIndent.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,4 +1,4 @@ | ||
testing | ||
isTextIndent | ||
|
||
^ indented | ||
^ self isIndented |
2 changes: 1 addition & 1 deletion
2
packages/RichTextEditing-Core.package/TextStructure.class/instance/isUnderlined.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,4 +1,4 @@ | ||
testing | ||
isUnderlined | ||
|
||
^ underlined | ||
^ self stylesActivated at: self class underlinedStyle |
Oops, something went wrong.