[Pharo-project] TxTextMorph based on new text model
Hello. I upload new version of TxText with new TxTextMorph which can show TxTextModel (http://www.smalltalkhub.com/#!/~sig/TxText ). See class side examples. *Implementation details:* TxTextMorph has textLayout instance variable which contains full precomputed information to draw text on screen. TxTextLayout contains collection of TxTextLine. TxTextLine contains collection of span objects (from text model) and offset with extent required for drawing lines (with right align for example). There are TxTextLayoutStrategy hierarchy responsible for building specific text layout objects: - TxSimpleTextLayoutStrategy build layout with actual text lines which text model contains - TxWrapTextStrategy build layout with lines which satisfied preferredExtent (given from text morph bounds) When text morph accepts new text model It asks layoutStrategy to build new layout. Then align selector applyed to layout. So text can be placed left to right, centered or right to left. Morph drawing method very simple: TxTextMorph>>drawOn: aCanvas textLayout drawTextOn: aCanvas at: self position TxTextLayout>>drawTextOn: aCanvas at: aPoint | topOffset linePosition | topOffset := 0. lines do: [:eachLine | linePosition := aPoint x @ (aPoint y + topOffset). eachLine drawOn: aCanvas at: linePosition. topOffset := topOffset + eachLine height. ] TxTextLine>>drawOn: aCanvas at: aPoint spans do: [:each | each drawOn: aCanvas at: aPoint + offset ] At the end TxCharactersSpan draw contents on canvas: TxCharactersSpan >>drawOn: aCanvas at: aPoint aCanvas drawString: characters at: aPoint font: (self getAttribute: TxFontAttribute) color: (self getAttribute: TxColorAttribute) And with Athens api text attributes can be not hardcoded: TxCharactersSpan >>drawAthensOn: aCanvas at: aPoint attributes applyOn: aCanvas. aCanvas pathTransform translateX: aPoint x Y: aPoint y. aCanvas drawString: characters *Questions:* Now text alignment (like centering) is property of TxTextMorph. So it global property of full text layout. But how such attribute can be applied to specific line? TxModel is list of spans. And each span object contains characters with same text attributes like font or color. Text alignment can be such attribute too. Do you think it should be attribute of all spans from single line? Or it should be only attribute of TxLineSeparator span? What your idea? *Future:* Next plan: cursor navigation, text selection and editing features. And of course tests, sorry I not start with tests now. I wait your comments , ideas and questions. Maybe you don't like my approach. I want to know why. I really want clean and object solution for text stuff in pharo.
Wow.. this is a huge progress! Sorry i was busy with other stuff and had no time to look at your code. On 13 January 2013 20:54, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
I upload new version of TxText with new TxTextMorph which can show TxTextModel (http://www.smalltalkhub.com/#!/~sig/TxText ). See class side examples.
Implementation details:
TxTextMorph has textLayout instance variable which contains full precomputed information to draw text on screen. TxTextLayout contains collection of TxTextLine. TxTextLine contains collection of span objects (from text model) and offset with extent required for drawing lines (with right align for example). There are TxTextLayoutStrategy hierarchy responsible for building specific text layout objects:
TxSimpleTextLayoutStrategy build layout with actual text lines which text model contains TxWrapTextStrategy build layout with lines which satisfied preferredExtent (given from text morph bounds)
When text morph accepts new text model It asks layoutStrategy to build new layout. Then align selector applyed to layout. So text can be placed left to right, centered or right to left.
Morph drawing method very simple:
TxTextMorph>>drawOn: aCanvas textLayout drawTextOn: aCanvas at: self position
TxTextLayout>>drawTextOn: aCanvas at: aPoint | topOffset linePosition | topOffset := 0. lines do: [:eachLine | linePosition := aPoint x @ (aPoint y + topOffset). eachLine drawOn: aCanvas at: linePosition. topOffset := topOffset + eachLine height. ]
TxTextLine>>drawOn: aCanvas at: aPoint
spans do: [:each | each drawOn: aCanvas at: aPoint + offset ]
At the end TxCharactersSpan draw contents on canvas:
TxCharactersSpan >>drawOn: aCanvas at: aPoint aCanvas drawString: characters at: aPoint font: (self getAttribute: TxFontAttribute) color: (self getAttribute: TxColorAttribute)
And with Athens api text attributes can be not hardcoded:
TxCharactersSpan >>drawAthensOn: aCanvas at: aPoint attributes applyOn: aCanvas. aCanvas pathTransform translateX: aPoint x Y: aPoint y. aCanvas drawString: characters
Questions:
Now text alignment (like centering) is property of TxTextMorph. So it global property of full text layout. But how such attribute can be applied to specific line?
TxModel is list of spans. And each span object contains characters with same text attributes like font or color. Text alignment can be such attribute too. Do you think it should be attribute of all spans from single line? Or it should be only attribute of TxLineSeparator span? What your idea?
Well, there is two approaches: a per-line attribute can be a special span at the beginning at line, or it can be an attribute. Both has pros and cons, however. In case of span, it needs to be dealt properly with text editing/navigation. In case of attribute(s), this attribute is really per line (or better to say, per paragraph) and putting it into each span seems like superfluous. IMO, i would go for a simplest model: the capability like text alignment (left/center/right) per line, is kind of overkill for our little world. I mean, it would be nice to have, but look at our tools: where are they used? Nowhere. So i would not focus on it right now, and having a global attribute seems like a good solution right now.
Future:
Next plan: cursor navigation, text selection and editing features. And of course tests, sorry I not start with tests now.
don't forget about tests. We started writing a model by implementing tests first, because we didn't wanted an implementation to dictate how things should be used.
I wait your comments , ideas and questions. Maybe you don't like my approach. I want to know why. I really want clean and object solution for text stuff in pharo.
-- Best regards, Igor Stasenko.
Igor do not think that because our tools do not use anything, we do not need good text support. Moose is struggling with the limits of the current textmodel. We should offer solutions to people not just to edit methods. Stef On Jan 13, 2013, at 9:51 PM, Igor Stasenko wrote:
Wow.. this is a huge progress! Sorry i was busy with other stuff and had no time to look at your code.
On 13 January 2013 20:54, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
I upload new version of TxText with new TxTextMorph which can show TxTextModel (http://www.smalltalkhub.com/#!/~sig/TxText ). See class side examples.
Implementation details:
TxTextMorph has textLayout instance variable which contains full precomputed information to draw text on screen. TxTextLayout contains collection of TxTextLine. TxTextLine contains collection of span objects (from text model) and offset with extent required for drawing lines (with right align for example). There are TxTextLayoutStrategy hierarchy responsible for building specific text layout objects:
TxSimpleTextLayoutStrategy build layout with actual text lines which text model contains TxWrapTextStrategy build layout with lines which satisfied preferredExtent (given from text morph bounds)
When text morph accepts new text model It asks layoutStrategy to build new layout. Then align selector applyed to layout. So text can be placed left to right, centered or right to left.
Morph drawing method very simple:
TxTextMorph>>drawOn: aCanvas textLayout drawTextOn: aCanvas at: self position
TxTextLayout>>drawTextOn: aCanvas at: aPoint | topOffset linePosition | topOffset := 0. lines do: [:eachLine | linePosition := aPoint x @ (aPoint y + topOffset). eachLine drawOn: aCanvas at: linePosition. topOffset := topOffset + eachLine height. ]
TxTextLine>>drawOn: aCanvas at: aPoint
spans do: [:each | each drawOn: aCanvas at: aPoint + offset ]
At the end TxCharactersSpan draw contents on canvas:
TxCharactersSpan >>drawOn: aCanvas at: aPoint aCanvas drawString: characters at: aPoint font: (self getAttribute: TxFontAttribute) color: (self getAttribute: TxColorAttribute)
And with Athens api text attributes can be not hardcoded:
TxCharactersSpan >>drawAthensOn: aCanvas at: aPoint attributes applyOn: aCanvas. aCanvas pathTransform translateX: aPoint x Y: aPoint y. aCanvas drawString: characters
Questions:
Now text alignment (like centering) is property of TxTextMorph. So it global property of full text layout. But how such attribute can be applied to specific line?
TxModel is list of spans. And each span object contains characters with same text attributes like font or color. Text alignment can be such attribute too. Do you think it should be attribute of all spans from single line? Or it should be only attribute of TxLineSeparator span? What your idea?
Well, there is two approaches: a per-line attribute can be a special span at the beginning at line, or it can be an attribute. Both has pros and cons, however. In case of span, it needs to be dealt properly with text editing/navigation. In case of attribute(s), this attribute is really per line (or better to say, per paragraph) and putting it into each span seems like superfluous.
IMO, i would go for a simplest model: the capability like text alignment (left/center/right) per line, is kind of overkill for our little world. I mean, it would be nice to have, but look at our tools: where are they used? Nowhere. So i would not focus on it right now, and having a global attribute seems like a good solution right now.
Future:
Next plan: cursor navigation, text selection and editing features. And of course tests, sorry I not start with tests now.
don't forget about tests. We started writing a model by implementing tests first, because we didn't wanted an implementation to dictate how things should be used.
I wait your comments , ideas and questions. Maybe you don't like my approach. I want to know why. I really want clean and object solution for text stuff in pharo.
-- Best regards, Igor Stasenko.
thanks denis for pushing that!!!! Stef
Hello.
I upload new version of TxText with new TxTextMorph which can show TxTextModel (http://www.smalltalkhub.com/#!/~sig/TxText ). See class side examples.
Implementation details:
TxTextMorph has textLayout instance variable which contains full precomputed information to draw text on screen. TxTextLayout contains collection of TxTextLine. TxTextLine contains collection of span objects (from text model) and offset with extent required for drawing lines (with right align for example). There are TxTextLayoutStrategy hierarchy responsible for building specific text layout objects: ⢠TxSimpleTextLayoutStrategy build layout with actual text lines which text model contains ⢠TxWrapTextStrategy build layout with lines which satisfied preferredExtent (given from text morph bounds) When text morph accepts new text model It asks layoutStrategy to build new layout. Then align selector applyed to layout. So text can be placed left to right, centered or right to left.
Morph drawing method very simple:
TxTextMorph>>drawOn: aCanvas textLayout drawTextOn: aCanvas at: self position
TxTextLayout>>drawTextOn: aCanvas at: aPoint | topOffset linePosition | topOffset := 0. lines do: [:eachLine | linePosition := aPoint x @ (aPoint y + topOffset). eachLine drawOn: aCanvas at: linePosition. topOffset := topOffset + eachLine height. ]
TxTextLine>>drawOn: aCanvas at: aPoint
spans do: [:each | each drawOn: aCanvas at: aPoint + offset ]
At the end TxCharactersSpan draw contents on canvas:
TxCharactersSpan >>drawOn: aCanvas at: aPoint aCanvas drawString: characters at: aPoint font: (self getAttribute: TxFontAttribute) color: (self getAttribute: TxColorAttribute)
And with Athens api text attributes can be not hardcoded:
TxCharactersSpan >>drawAthensOn: aCanvas at: aPoint attributes applyOn: aCanvas. aCanvas pathTransform translateX: aPoint x Y: aPoint y. aCanvas drawString: characters
Questions:
Now text alignment (like centering) is property of TxTextMorph. So it global property of full text layout. But how such attribute can be applied to specific line?
TxModel is list of spans. And each span object contains characters with same text attributes like font or color. Text alignment can be such attribute too. Do you think it should be attribute of all spans from single line? Or it should be only attribute of TxLineSeparator span? What your idea?
Future:
Next plan: cursor navigation, text selection and editing features. And of course tests, sorry I not start with tests now.
I wait your comments , ideas and questions. Maybe you don't like my approach. I want to know why. I really want clean and object solution for text stuff in pharo.
I added a new jenkins job: https://ci.inria.fr/rmod/job/TxText/ currently inactive/broken, we will dive into it tomorrow ;) On 2013-01-13, at 22:26, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
thanks denis for pushing that!!!!
Stef
Hello.
I upload new version of TxText with new TxTextMorph which can show TxTextModel (http://www.smalltalkhub.com/#!/~sig/TxText ). See class side examples.
Implementation details:
TxTextMorph has textLayout instance variable which contains full precomputed information to draw text on screen. TxTextLayout contains collection of TxTextLine. TxTextLine contains collection of span objects (from text model) and offset with extent required for drawing lines (with right align for example). There are TxTextLayoutStrategy hierarchy responsible for building specific text layout objects: ⢠TxSimpleTextLayoutStrategy build layout with actual text lines which text model contains ⢠TxWrapTextStrategy build layout with lines which satisfied preferredExtent (given from text morph bounds) When text morph accepts new text model It asks layoutStrategy to build new layout. Then align selector applyed to layout. So text can be placed left to right, centered or right to left.
Morph drawing method very simple:
TxTextMorph>>drawOn: aCanvas textLayout drawTextOn: aCanvas at: self position
TxTextLayout>>drawTextOn: aCanvas at: aPoint | topOffset linePosition | topOffset := 0. lines do: [:eachLine | linePosition := aPoint x @ (aPoint y + topOffset). eachLine drawOn: aCanvas at: linePosition. topOffset := topOffset + eachLine height. ]
TxTextLine>>drawOn: aCanvas at: aPoint
spans do: [:each | each drawOn: aCanvas at: aPoint + offset ]
At the end TxCharactersSpan draw contents on canvas:
TxCharactersSpan >>drawOn: aCanvas at: aPoint aCanvas drawString: characters at: aPoint font: (self getAttribute: TxFontAttribute) color: (self getAttribute: TxColorAttribute)
And with Athens api text attributes can be not hardcoded:
TxCharactersSpan >>drawAthensOn: aCanvas at: aPoint attributes applyOn: aCanvas. aCanvas pathTransform translateX: aPoint x Y: aPoint y. aCanvas drawString: characters
Questions:
Now text alignment (like centering) is property of TxTextMorph. So it global property of full text layout. But how such attribute can be applied to specific line?
TxModel is list of spans. And each span object contains characters with same text attributes like font or color. Text alignment can be such attribute too. Do you think it should be attribute of all spans from single line? Or it should be only attribute of TxLineSeparator span? What your idea?
Future:
Next plan: cursor navigation, text selection and editing features. And of course tests, sorry I not start with tests now.
I wait your comments , ideas and questions. Maybe you don't like my approach. I want to know why. I really want clean and object solution for text stuff in pharo.
Denis, could you create a ConfigurationOfTxText? That would greatly simplify the creation of a build job on jenkins! On 2013-01-13, at 22:39, Camillo Bruni <camillobruni@gmail.com> wrote:
I added a new jenkins job:
https://ci.inria.fr/rmod/job/TxText/
currently inactive/broken, we will dive into it tomorrow ;)
On 2013-01-13, at 22:26, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
thanks denis for pushing that!!!!
Stef
Hello.
I upload new version of TxText with new TxTextMorph which can show TxTextModel (http://www.smalltalkhub.com/#!/~sig/TxText ). See class side examples.
Implementation details:
TxTextMorph has textLayout instance variable which contains full precomputed information to draw text on screen. TxTextLayout contains collection of TxTextLine. TxTextLine contains collection of span objects (from text model) and offset with extent required for drawing lines (with right align for example). There are TxTextLayoutStrategy hierarchy responsible for building specific text layout objects: ⢠TxSimpleTextLayoutStrategy build layout with actual text lines which text model contains ⢠TxWrapTextStrategy build layout with lines which satisfied preferredExtent (given from text morph bounds) When text morph accepts new text model It asks layoutStrategy to build new layout. Then align selector applyed to layout. So text can be placed left to right, centered or right to left.
Morph drawing method very simple:
TxTextMorph>>drawOn: aCanvas textLayout drawTextOn: aCanvas at: self position
TxTextLayout>>drawTextOn: aCanvas at: aPoint | topOffset linePosition | topOffset := 0. lines do: [:eachLine | linePosition := aPoint x @ (aPoint y + topOffset). eachLine drawOn: aCanvas at: linePosition. topOffset := topOffset + eachLine height. ]
TxTextLine>>drawOn: aCanvas at: aPoint
spans do: [:each | each drawOn: aCanvas at: aPoint + offset ]
At the end TxCharactersSpan draw contents on canvas:
TxCharactersSpan >>drawOn: aCanvas at: aPoint aCanvas drawString: characters at: aPoint font: (self getAttribute: TxFontAttribute) color: (self getAttribute: TxColorAttribute)
And with Athens api text attributes can be not hardcoded:
TxCharactersSpan >>drawAthensOn: aCanvas at: aPoint attributes applyOn: aCanvas. aCanvas pathTransform translateX: aPoint x Y: aPoint y. aCanvas drawString: characters
Questions:
Now text alignment (like centering) is property of TxTextMorph. So it global property of full text layout. But how such attribute can be applied to specific line?
TxModel is list of spans. And each span object contains characters with same text attributes like font or color. Text alignment can be such attribute too. Do you think it should be attribute of all spans from single line? Or it should be only attribute of TxLineSeparator span? What your idea?
Future:
Next plan: cursor navigation, text selection and editing features. And of course tests, sorry I not start with tests now.
I wait your comments , ideas and questions. Maybe you don't like my approach. I want to know why. I really want clean and object solution for text stuff in pharo.
Yes. I want to do it. But today I busy. Tomorrow I hope I can make it. I actually want to split package to TxText-Model, TxText-Layout, TxText-UI, TxTextTests-Model, TxTextTests-Layout 2013/1/15 Camillo Bruni <camillobruni@gmail.com>
Denis, could you create a ConfigurationOfTxText? That would greatly simplify the creation of a build job on jenkins!
On 2013-01-13, at 22:39, Camillo Bruni <camillobruni@gmail.com> wrote:
I added a new jenkins job:
https://ci.inria.fr/rmod/job/TxText/
currently inactive/broken, we will dive into it tomorrow ;)
On 2013-01-13, at 22:26, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
thanks denis for pushing that!!!!
Stef
Hello.
I upload new version of TxText with new TxTextMorph which can show TxTextModel (http://www.smalltalkhub.com/#!/~sig/TxText ). See class side examples.
Implementation details:
TxTextMorph has textLayout instance variable which contains full precomputed information to draw text on screen. TxTextLayout contains collection of TxTextLine. TxTextLine contains collection of span objects (from text model) and offset with extent required for drawing lines (with right align for example). There are TxTextLayoutStrategy hierarchy responsible for building specific text layout objects: ⢠TxSimpleTextLayoutStrategy build layout with actual text lines which text model contains ⢠TxWrapTextStrategy build layout with lines which satisfied preferredExtent (given from text morph bounds) When text morph accepts new text model It asks layoutStrategy to build new layout. Then align selector applyed to layout. So text can be placed left to right, centered or right to left.
Morph drawing method very simple:
TxTextMorph>>drawOn: aCanvas textLayout drawTextOn: aCanvas at: self position
TxTextLayout>>drawTextOn: aCanvas at: aPoint | topOffset linePosition | topOffset := 0. lines do: [:eachLine | linePosition := aPoint x @ (aPoint y + topOffset). eachLine drawOn: aCanvas at: linePosition. topOffset := topOffset + eachLine height. ]
TxTextLine>>drawOn: aCanvas at: aPoint
spans do: [:each | each drawOn: aCanvas at: aPoint + offset ]
At the end TxCharactersSpan draw contents on canvas:
TxCharactersSpan >>drawOn: aCanvas at: aPoint aCanvas drawString: characters at: aPoint font: (self getAttribute: TxFontAttribute) color: (self getAttribute: TxColorAttribute)
And with Athens api text attributes can be not hardcoded:
TxCharactersSpan >>drawAthensOn: aCanvas at: aPoint attributes applyOn: aCanvas. aCanvas pathTransform translateX: aPoint x Y: aPoint y. aCanvas drawString: characters
Questions:
Now text alignment (like centering) is property of TxTextMorph. So it global property of full text layout. But how such attribute can be applied to specific line?
TxModel is list of spans. And each span object contains characters with same text attributes like font or color. Text alignment can be such attribute too. Do you think it should be attribute of all spans from single line? Or it should be only attribute of TxLineSeparator span? What your idea?
Future:
Next plan: cursor navigation, text selection and editing features. And of course tests, sorry I not start with tests now.
I wait your comments , ideas and questions. Maybe you don't like my approach. I want to know why. I really want clean and object solution for text stuff in pharo.
On 2013-01-15, at 12:44, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Yes. I want to do it. But today I busy. Tomorrow I hope I can make it.
no hurry :) I set up the jenkins build, it will trigger as soon as you push the configuration :)
I actually want to split package to TxText-Model, TxText-Layout, TxText-UI, TxTextTests-Model, TxTextTests-Layout
nice!
Hello. I publish configuration at TxText repository based on proposed repackaging. 2013/1/15 Camillo Bruni <camillobruni@gmail.com>
On 2013-01-15, at 12:44, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Yes. I want to do it. But today I busy. Tomorrow I hope I can make it.
no hurry :) I set up the jenkins build, it will trigger as soon as you push the configuration :)
I actually want to split package to TxText-Model, TxText-Layout, TxText-UI, TxTextTests-Model, TxTextTests-Layout
nice!
This is really nice. Tristan started to look at what you are doing because we proposed him to enhance textModel as part of an internship with us. Stef On Jan 18, 2013, at 9:30 PM, Denis Kudriashov wrote:
Hello.
I publish configuration at TxText repository based on proposed repackaging.
2013/1/15 Camillo Bruni <camillobruni@gmail.com>
On 2013-01-15, at 12:44, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Yes. I want to do it. But today I busy. Tomorrow I hope I can make it.
no hurry :) I set up the jenkins build, it will trigger as soon as you push the configuration :)
I actually want to split package to TxText-Model, TxText-Layout, TxText-UI, TxTextTests-Model, TxTextTests-Layout
nice!
I uploaded new version with refactored layout code and new tests. TxText tests now uses Mocketry framework. I very hope you will enjoy it. Mock objects to me is main tool to design and implement flexible object systems. And Mocketry simplifies mock objects technique very much. See announcement about new version of Mocketry. Best regards Denis 2013/1/19 Stéphane Ducasse <stephane.ducasse@inria.fr>
This is really nice. Tristan started to look at what you are doing because we proposed him to enhance textModel as part of an internship with us.
Stef
On Jan 18, 2013, at 9:30 PM, Denis Kudriashov wrote:
Hello.
I publish configuration at TxText repository based on proposed repackaging.
2013/1/15 Camillo Bruni <camillobruni@gmail.com>
On 2013-01-15, at 12:44, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Yes. I want to do it. But today I busy. Tomorrow I hope I can make it.
no hurry :) I set up the jenkins build, it will trigger as soon as you push the configuration :)
I actually want to split package to TxText-Model, TxText-Layout, TxText-UI, TxTextTests-Model, TxTextTests-Layout
nice!
Denis Kudriashov wrote
I upload new version of TxText with new TxTextMorph
Denis, thank you for taking this on! This is /so/ important. There are many times in my experiments with reinventing the tools when I've gotten confused and frustrated by the way text / editors work and chosen to revert to a more standard way of doing things. Two things: 1. Have you read about the experiments from VPRI? There is even an active essay where you can see each rule being applied individually 2. Have you considered growth as text is typed in? The current "hold the width and grow down" approach is very poor in certain applications. There was a "growable" version that increased to a maximum length, but it was very hacky due to the complexity of hooking into the existing objects. My point is, it would be great to be able to plugin different strategies here. Thanks for tackling this urgent and complicated topic! Sean -- View this message in context: http://forum.world.st/TxTextMorph-based-on-new-text-model-tp4663219p4664903.... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Hello 2013/1/23 Sean P. DeNigris <sean@clipperadams.com>
Denis Kudriashov wrote
I upload new version of TxText with new TxTextMorph
Denis, thank you for taking this on! This is /so/ important. There are many times in my experiments with reinventing the tools when I've gotten confused and frustrated by the way text / editors work and chosen to revert to a more standard way of doing things.
Same for me :)
Two things: 1. Have you read about the experiments from VPRI? There is even an active essay where you can see each rule being applied individually
I don't. Do you have link?
2. Have you considered growth as text is typed in? The current "hold the width and grow down" approach is very poor in certain applications. There was a "growable" version that increased to a maximum length, but it was very hacky due to the complexity of hooking into the existing objects. My point is, it would be great to be able to plugin different strategies here.
I really want it too. And I think it is already exists.There are two layout strateges: TxNativeTextLayoutStrategy (renamed from Simple) and TxWrapTextStrategy. First gives text autosize behaviour. TxTextMorph increases width accordingly to text line growth. Second strategy restricts visible text line by morph width. So morph can increase only height and text lines are wrapped by given restriction. It is easy to implement strategy which will wrap text by max line characters count. But now all stuff is just about text displaying. No editing, no selection and no cursor navigation yet. I will try make it real step by step. Be free to join me :)
Thanks for tackling this urgent and complicated topic! Sean
And thank's Igor and Camillo. They start this project.
-- View this message in context: http://forum.world.st/TxTextMorph-based-on-new-text-model-tp4663219p4664903.... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (5)
-
Camillo Bruni -
Denis Kudriashov -
Igor Stasenko -
Sean P. DeNigris -
Stéphane Ducasse