Add AnchorColor Property AnchorColor(or AnchorClickedColor) property is used as the default color of the markup anchor tag. If there is a color attribute in the markup anchor tag, the markup attribute takes precedence. Change-Id: Idc938495036319f74764b9ddadc2441d46eed159 Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Fix more compile error/warnings for gcc-13 Change-Id: Iee4002a0e2007daf281400ec07a3ffc776e46468 Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
Apply font size scale to markup text Change-Id: I1c6467a1ebb42b4604497db12b12052fc7deba80 Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
fix white space issue in hidden input The calculated text size is used in atlas renderer. When the text is all white space, partial render issue occurs because the width is 0. To avoid issue, do not remove the white space size in hidden input mode. Change-Id: Id92becdb0103fa6dee20c5cd272ee3d4314121c6 Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Moved Text Controller & Markup Processor to sub-folders Change-Id: If5a17c1c568584840ec7f07ebe24cd72bc6a0356
Fix text AutoScroll ellipsis issue Text should ellipsis while AutoScroll is running when text length is bigger than MaxTextureSize. this issue occurs as a side effect of another patch. 74f7af1b08ce65dde5959d22b2d533cbc64b9d2e the height comparison condition is for another AutoScroll ellipsis issue and this should not be removed. Change-Id: I18a4011bec882e483bc0c184417403661a9fa635 Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Support character-spacing tag in markup How to apply it in TextEditor: textEditor.SetProperty(Dali::Toolkit::TextEditor::Property::TEXT, "Hello <char-spacing value='-3.0f'>Hello </char-spacing>" "<char-spacing value='3.0f'>Hello </char-spacing>" "<char-spacing value='-6.0f'>Hello </char-spacing>" "<char-spacing value='6.0f'>Hello </char-spacing>" "<char-spacing value='0.0f'>Hello </char-spacing>"); textEditor.SetProperty(Dali::Toolkit::TextEditor::Property::ENABLE_MARKUP, true); Change-Id: Ic24b6cd7e0b88fba175fdc008345956a8fa7980f
Support paragraph tag <p> in markup Paragraph tag is used as block of text start & end with new-line (implicitly). The paragraph tag is nedded to support styles on paragraph level in markup. They are attributes for paragraph tag like: Align, Direction (LTR, RTL), Wrap, etc. Example: Text: "Before paragraph <p>first paragraph</p><p>second paragraph</p><p>new line \n third paragraph</p>After paragraph" Output: ============================ | Before paragraph | | first paragraph | | second paragraph | | new line | | third paragraph | | After paragraph | ============================ How to apply it in TextEditor: textEditor.SetProperty(TextEditor::Property::ENABLE_MARKUP, true); textEditor.SetProperty(TextEditor::Property::TEXT, "text one <p>Paragraph two</p> text three <p>Paragraph four</p> text five"); How to apply it in TextLabel: textLabel.SetProperty(TextLabel::Property::MULTI_LINE, true); textLabel.SetProperty(TextLabel::Property::ENABLE_MARKUP, true); textLabel.SetProperty(TextLabel::Property::TEXT, "text one <p>Paragraph two</p> text three <p>Paragraph four</p> text five"); Change-Id: Icee044db488d82646758ccc59a23ce896a3e28c7
Adding Character Spacing *********************************************************** Description: Adding the CHARACTER_SPACING for text-editor, text-field and text-label. CHARACTER_SPACING determines the spaces between characters. A positive value will make the characters far apart (expanded) and a negative value will bring them closer (condensed). The sample code below can be used to test the CHARACTER_SPACING. *********************************************************** using namespace Dali; using namespace Dali::Toolkit; class SimpleApp : public ConnectionTracker { public: SimpleApp(Application &application) : mApplication(application) { mApplication.InitSignal().Connect(this, &SimpleApp::Create); } void Create(Application &application) { Window window = application.GetWindow(); window.SetBackgroundColor(Vector4(0.04f, 0.345f, 0.392f, 1.0f)); mEditor = TextEditor::New(); mEditor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); mEditor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER); mEditor.SetProperty(Actor::Property::POSITION, Vector3(0.f, 0.0f, 0.f)); mEditor.SetProperty(Actor::Property::SIZE, Vector2(200.f, 100.0f)); mEditor.SetBackgroundColor(Vector4(0.04f, 0.345f, 0.392f, 1.0f)); mEditor.SetProperty(TextEditor::Property::TEXT, "A long text that exceeds the editor's width."); mEditor.SetProperty(DevelTextEditor::Property::CHARACTER_SPACING, 15.0f); // mLabel = TextLabel::New(); // mLabel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); // mLabel.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER); // mLabel.SetProperty(Actor::Property::POSITION, Vector3(0.f, 0.0f, 0.f)); // mLabel.SetProperty(Actor::Property::SIZE, Vector2(400.f, 200.0f)); // mLabel.SetProperty(TextLabel::Property::TEXT_COLOR, Color::BLACK); // mLabel.SetProperty(TextLabel::Property::TEXT, "A long text text text that exceeds the label's width."); // mLabel.SetProperty(DevelTextLabel::Property::CHARACTER_SPACING, 10.0f); // mLabel.SetProperty(TextLabel::Property::ELLIPSIS, false); // mField = TextField::New(); // mField.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); // mField.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER); // mField.SetProperty(Actor::Property::POSITION, Vector3(0.f, 0.0f, 0.f)); // mField.SetProperty(Actor::Property::SIZE, Vector2(200.f, 100.0f)); // mField.SetProperty(TextField::Property::TEXT, "A long text text text that exceeds the field's width."); // mField.SetProperty(DevelTextField::Property::CHARACTER_SPACING, 10.0f); // mField.SetProperty(TextField::Property::ELLIPSIS, false); //window.Add(mLabel); window.Add(mEditor); //window.Add(mField); } bool OnButtonClicked(Button button) { if (button == mButton) { Vector3 originalSize = mEditor.GetNaturalSize(); } return true; } private: Application &mApplication; TextEditor mEditor; PushButton mButton; TextField mField; TextLabel mLabel; }; int DALI_EXPORT_API main(int argc, char **argv) { Application application = Application::New(&argc, &argv); SimpleApp test(application); application.MainLoop(); return 0; } Change-Id: Ibd89f1398e391dc56e3a230c7a136cfe07edc37a
support strikethrough markup tag using namespace Dali; using namespace Dali::Toolkit; class SimpleApp : public ConnectionTracker { public: SimpleApp(Application& application) : mApplication(application) { mApplication.InitSignal().Connect(this, &SimpleApp::Create); } void Create(Application& application) { Window window = application.GetWindow(); window.SetBackgroundColor(Vector4(0.04f, 0.345f, 0.392f, 1.0f)); mEditor = TextEditor::New(); mEditor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); mEditor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER); mEditor.SetProperty(Actor::Property::POSITION, Vector3(0.f, 0.0f, 0.f)); mEditor.SetProperty(Actor::Property::SIZE, Vector2(200.f, 100.0f)); mEditor.SetProperty(TextEditor::Property::TEXT_COLOR, Vector4(0.00f, 0.0f, 1.0f, 1.0f)); mEditor.SetBackgroundColor(Vector4(0.04f, 0.345f, 0.392f, 1.0f)); mEditor.SetProperty(TextEditor::Property::ENABLE_MARKUP, true); mEditor.SetProperty(TextEditor::Property::TEXT, "H<s>el</s>lo <s>World</s>"); window.Add(mEditor); } private: Application& mApplication; TextEditor mEditor; }; int DALI_EXPORT_API main(int argc, char** argv) { Application application = Application::New(&argc, &argv); SimpleApp test(application); application.MainLoop(); return 0; } Change-Id: I4ad7c2ea2f65bc54765ffcc2b2aa177ea84138df
Fixing Bug: Caret is too big with LineSpacing *********************************************************** Description When using LineSpacing or MinLineSize the caret size is too big and does not look good. The primary cursor height was obtaining its height from the line height (which includes the line spacing). I've modified it to obtain the height from the default font height. Please use the code below to test the issue and its fix. *********************************************************** using namespace Dali; using namespace Dali::Toolkit; class SimpleApp : public ConnectionTracker { public: SimpleApp(Application& application) : mApplication(application) { mApplication.InitSignal().Connect(this, &SimpleApp::Create); } void Create(Application& application) { Window window = application.GetWindow(); window.SetBackgroundColor(Vector4(0.04f, 0.345f, 0.392f, 1.0f)); mEditor = TextEditor::New(); mEditor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); mEditor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER); mEditor.SetProperty(Actor::Property::POSITION, Vector3(0.f, 0.0f, 0.f)); mEditor.SetProperty(Actor::Property::SIZE, Vector2(200.f, 100.0f)); mEditor.SetProperty(TextEditor::Property::TEXT, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n"); mEditor.SetProperty(TextEditor::Property::ENABLE_MARKUP, true); mEditor.SetProperty(TextEditor::Property::POINT_SIZE, 40.0f); mEditor.SetBackgroundColor(Color::WHITE); mEditor.SetProperty( DevelTextEditor::Property::MIN_LINE_SIZE, 50.f ); window.Add(mEditor); } bool OnButtonClicked(Button button) { if(button == mButton) { Vector3 originalSize = mEditor.GetNaturalSize(); } return true; } private: Application &mApplication; TextEditor mEditor; PushButton mButton; TextField mField; }; int DALI_EXPORT_API main(int argc, char** argv) { Application application = Application::New(&argc, &argv); SimpleApp test(application); application.MainLoop(); return 0; } Change-Id: I8d8accbef03b69ba4e77f4f891bae08e37f93a00
Support Emoji sequences This is a common solution that handles emoji sequences: :: text presentation sequence and selector :: emoji presentation sequence and selector :: emoji modifier sequence like skin tone :: emoji keycap sequence :: emoji flag sequence :: emoji tag sequence like England flag :: more cases in emoji zwj sequence like Rainbow Flag This patch handle display cases. The editing cases will be handled in another patch. This patch depends on the dali-adaptor patch: https://review.tizen.org/gerrit/c/platform/core/uifw/dali-adaptor/+/266046 Change-Id: I1bc7aed8a73b1d396019b2ef0a7fab5ea187d39f
Support Ellipsis Position Property Added new property Ellipsis to TextEditor Added new property Ellipsis_Position to TextLabel, TextField and TextEditor Example: textLabel.SetProperty(DevelTextLabel::Property::ELLIPSIS_POSITION, DevelText::EllipsisPosition::START); Handled Ellipsis location for below cases: Positions: END, START and MIDDLE TextController: TextLabel, TextField and TextEditor SingleLine and Muilt-lines with differnat LineWrap modes Text direction LTR and RTL END algorithm already exits START and MIDDLE algorithms added according to END one Change-Id: If059878f7128141169e95cf237b690ce900c70b3
Makes the LTR/RTL alignment of text follow the system language by default. The MATCH_SYSTEM_LANGUAGE_DIRECTION property defaults to true. When the layout direction of TextLabel, TextField, or TextEditor is changed, LTR/RTL alignment of text follows the layout direction of each control. If you set MATCH_SYSTEM_LANGUAGE_DIRECTION to false As before, LTR/RTL is determined according to the language of the text. Change-Id: Ie97654a2309ffd4c30bec2c1b95d6337d8f4c674
Merge "Change MatchSystemLanguageDirection is true." into devel/master
add support for background markup tag using namespace Dali; using namespace Dali::Toolkit; class SimpleApp : public ConnectionTracker { public: SimpleApp(Application& application) : mApplication(application) { mApplication.InitSignal().Connect(this, &SimpleApp::Create); } void Create(Application& application) { Window window = mApplication.GetWindow(); mEditor = TextEditor::New(); mEditor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); mEditor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER); mEditor.SetProperty(Actor::Property::POSITION, Vector3(0.f, 0.0f, 0.f)); mEditor.SetProperty(Actor::Property::SIZE, Vector2(300, 300.0f)); window.SetBackgroundColor(Vector4(0.04f, 0.345f, 0.392f, 1.0f)); mEditor.SetProperty(TextEditor::Property::POINT_SIZE, 26.f); mEditor.SetProperty(TextEditor::Property::ENABLE_MARKUP, true); mEditor.SetProperty(TextEditor::Property::TEXT, "<background color='red'>W</background><background color='blue'>oo</background>d"); window.Add(mEditor); } private: Application& mApplication; TextEditor mEditor; }; int DALI_EXPORT_API main(int argc, char** argv) { Application application = Application::New(&argc, &argv); SimpleApp test(application); application.MainLoop(); return 0; } Change-Id: Ib3259932cb1bf0efc3f8690e7bdcdd8ca37423fd
Change MatchSystemLanguageDirection is true. Default text LTR/RTL direction follows the system language direction. And check DALI_MATCH_SYSTEM_LANGUAGE_DIRECTION environment. If you set export DALI_MATCH_SYSTEM_LANGUAGE_DIRECTION=0 then MatchSystemLanguageDirection is false. Change-Id: Ic9c1516a8cdcf45a5ec187097509e7d996d374ff
Add text wrapping hyphen mode support related to https://review.tizen.org/gerrit/c/platform/core/uifw/dali-adaptor/+/254278 using namespace Dali; using namespace Dali::Toolkit; class SimpleApp : public ConnectionTracker { public: SimpleApp(Application& application) : mApplication(application) { mApplication.InitSignal().Connect(this, &SimpleApp::Create); } void Create(Application& application) { Window window = mApplication.GetWindow(); mEditor = TextEditor::New(); mEditor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); mEditor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER); mEditor.SetProperty(Actor::Property::POSITION, Vector3(0.f, 0.0f, 0.f)); mEditor.SetProperty(Actor::Property::SIZE, Vector2(150, 300.0f)); window.SetBackgroundColor(Vector4(0.04f, 0.345f, 0.392f, 1.0f)); mEditor.SetProperty(TextEditor::Property::POINT_SIZE, 26.f); mEditor.SetProperty(TextEditor::Property::TEXT, "Experimental!!!!"); mEditor.SetProperty(TextEditor::Property::LINE_WRAP_MODE, Text::LineWrap::HYPHENATION); window.Add(mEditor); } private: Application& mApplication; TextEditor mEditor; }; int DALI_EXPORT_API main(int argc, char** argv) { Application application = Application::New(&argc, &argv); SimpleApp test(application); application.MainLoop(); return 0; } Change-Id: I736a8d251d1f7fb364b7bfb26520767dfd019ccb
Support Underline to Markup using underlined-character-run Change-Id: I21e5639a75a815204060e5d56c342794e23941ff
Support anchor to TextLabel, TextField, TextEditor example: <a href='https://wwww.tizen.org'>TIZEN</a> using AnchorClickedSignal(), users can get the anchor's href when clicking on the anchor. Change-Id: I1c61c285c95295aea3c27de2bedd586211a0f036 Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>