Sorry about the unclear post, I should have edited that to:
Add 2 new arg to TextEditor::setMultiLine()
void setMultiLine (bool shouldBeMultiLine,
bool shouldWordWrap = true
bool breakWord = false
const float lineSpacing = 0.f);
At the present, the arg 2
shouldWordWrap decides wheather a paragraph places in a single-line (never break up in muilti-line) or not. Its effect depends on arg 1
shouldBeMultiLine = true. That’s OK and necessary.
The arg 3 ‘breakWord’ is absent in JUCE::TextEditor. The reason I think perhaps Jules doesn’t know CJK characters/text/writing and composing style well (seems a lot of non-CJK programer also doesn’t), and that’s why a lot of Chinese C++ programers (many of them are my best friends) refuse to use JUCE, they always say: JUCE doesn’t support our language (unicode, etc.)… TBH, that’s not fully true.
In English for example, there’s alway a space between 2 words (except ‘-’), and there’s no need to have a indent for every paragraph which normally are 4 spaces on computer field. Because of this, JUCE::TextEditor never breaks the word which at the last of a line when in multi-line mode (the real situation is more complex we can see in TextEditor::Iterator::next()). That’s fine for all Latin writing system, but for CJK? it’s a disaster. Even worse, Chinese for example, it at least has 2 writing system (maybe more): the Simplified Chinese (no any space between 2 words) and the Traditional Chinese (some has space between 2 words, some hasn’t. I don’t know well about this system even I’m a Chinese).
The arg 4
lineSpacing will make the TextEditor more readable, especially for some certain font. You could imagine if the webs and CSS language hasn’t any line-spacing setting…
English isn’t my mother-tongue, I can’t express a lot of things well, so… sorry about my terrible words and thanks for reading it.