Moved Text Controller & Markup Processor to sub-folders Change-Id: If5a17c1c568584840ec7f07ebe24cd72bc6a0356
Add text selection popup style Change-Id: I8d9a34784d485a70fb244b1eaecca0e299a4b90b 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
Merge "Extending Style - Adding Strikethrough" into devel/master
Add ENABLE_FONT_SIZE_SCALE property to text components for current, FONT_SIZE_SCALE is applied to all text. Add ENABLE_FONT_SIZE_SCALE to selectively apply FONT_SIZE_SCALE from SystemSettings. Change-Id: If8d2574fcdeaa98ff4645ff03eec78e1bc265c3e Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
Extending Style - Adding Strikethrough *********************************************************** Description: Adding the strikethrough for the text-editor and the text-label. The sample code below can be used to test the strikethrough using the property maps. The following can be used in the property map: enable and color. *********************************************************** 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, "Hello"); // new label code TextLabel label = TextLabel::New(); label.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER); label.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER); label.SetProperty(Actor::Property::POSITION, Vector3(0.f, 0.0f, 0.f)); label.SetProperty(Actor::Property::SIZE, Vector2(200.f, 100.0f)); label.SetBackgroundColor(Vector4(0.04f, 0.345f, 0.392f, 1.0f)); label.SetProperty(TextEditor::Property::TEXT, "Hello"); //editor property map // Property::Map strikethruMapSet; // strikethruMapSet.Insert("enable", true); // strikethruMapSet.Insert("color", Color::RED); // mEditor.SetProperty(TextEditor::Property::STRIKETHROUGH, strikethruMapSet); Property::Map strikethruMapSet; strikethruMapSet.Insert("enable",true); strikethruMapSet.Insert("color",Vector4(0.75f, 0.96f, 1.f, 1.f)); label.SetProperty(TextLabel::Property::STRIKETHROUGH, strikethruMapSet); window.Add(label); //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: I8de5088c1de0c042573c925a92a4829b67e00624
[ATSPI] Implementation of Hypertext and Hyperlink in text controls This patch exposes on dbus ATSPI Hypertext interface for the following text controls: TextEditor, TextField and TextLabel. Also it brings new class TextAnchor inheriting from Control which marks the geometry of an anchor inside the text controls mentioned above and which exposes on dbus ATSPI Hyperlink interface. Change-Id: Ic46bcf7a3ddfe49b1723ebf8025fba6779fda05d
[AT-SPI] Support for hidden text added - Modified AT-SPI API to not disclose the hidden text in returned values. - Values returned instead are either empty string or replacement characters. Change-Id: I6736a30ad70a45b77b0b4ac4b54c2a2c0072df25
Refactored text field/editor property getters/setters Change-Id: Iab27acf2f198af060d3eee398b9874116ff7e562