Update expected value of UtcDaliGetMirroredText The text direction determination logic has been changed, https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-adaptor/+/298855/ so the result of GetMirroredText() may different from the previous one, especially when dealing with mixed LTR + RTL text. (and particulary when brackets are involved) Update the TC with the coreect values. Change-Id: I678211880250035caea4d6142e69fd427268b1ff Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
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
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 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
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
Layout fixes. * Fixes some alignment issues with RTL text. * Reorders the RTL lines while the text is laid-out. It might happen that the length of the text changes after the reordering. In that case if the lines are reordered outside the layout engine update the lenght at that step is too late. Change-Id: If7b3bf488bde75c538a646aa48b7dfe3083597b8 Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
Text cleaning. * Refactor the Layout::Parameters struct * Remove unnecesary code. Change-Id: I1ebd7a01b3d7fe33917d51c481b536118c5c9bae Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
Add bidirectional text tct. Add bidirectional text tct. For this, made CreateTextModel() can support markup text. Change-Id: I13ad4025635ba257611875284563bce09d8c6192 Signed-off-by: minho.sun <minho.sun@samsung.com>
Adding debug methods for Control internals Enables writing the Actor hierarchy, including control internals, as a JSON file. Extremely useful for validating test cases. Change-Id: I50559f3361c839ac7996581a0ba3ba902b3d2f81
ModelView implementation. * Creates an interface to access the text's model from the text rendering modules. * In the case the text is elided, it stores a copy of the elided text, the ellipsis glyph and the modified layout. * It creates a basic Text::RenderingController class which stores the pointer to the text's model. Change-Id: Ied29583a0e1648dab9d78575dcbc042353c949dc Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
Multi-line text. Cursor hit and cursor's position. Change-Id: I28f664ea7d1dfed61fcd4e69a3de8ec850b4df58 Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
TextModel - Layout a given range of characters inside a text. Change-Id: Ie854d18af10553f2a4381ab6e60fc91f68c21ef0 Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
TextModel - Create the bidirectional info for a given range of characters inside a text. Change-Id: I00d0c68d9d354d30e6fe3ad67de8d99f7c0651d4 Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>