uint32_t expectedNumberOfUnderlinedGlyphs = 5u;
Toolkit::Internal::TextEditor& textEditorImpl = GetImpl( textEditor );
- const Text::Length numberOfUnderlineRuns = textEditorImpl.getController()->GetTextModel()->GetNumberOfUnderlineRuns();
+ const Text::Length numberOfUnderlineRuns = textEditorImpl.GetTextController()->GetTextModel()->GetNumberOfUnderlineRuns();
DALI_TEST_EQUALS( numberOfUnderlineRuns, expectedNumberOfUnderlinedGlyphs, TEST_LOCATION );
Vector<GlyphRun> underlineRuns;
underlineRuns.Resize(numberOfUnderlineRuns);
- textEditorImpl.getController()->GetTextModel()->GetUnderlineRuns(underlineRuns.Begin(), 0u, numberOfUnderlineRuns);
+ textEditorImpl.GetTextController()->GetTextModel()->GetUnderlineRuns(underlineRuns.Begin(), 0u, numberOfUnderlineRuns);
//ABC are underlined
DALI_TEST_EQUALS( underlineRuns[0u].glyphIndex, 0u, TEST_LOCATION);
application.Render();
Toolkit::Internal::TextEditor& editorImpl = GetImpl( editor );
- const ColorIndex* const backgroundColorIndicesBuffer = editorImpl.getController()->GetTextModel()->GetBackgroundColorIndices();
+ const ColorIndex* const backgroundColorIndicesBuffer = editorImpl.GetTextController()->GetTextModel()->GetBackgroundColorIndices();
DALI_TEST_CHECK( backgroundColorIndicesBuffer );
DALI_TEST_GREATER(spanSize.width, originalSize.width, TEST_LOCATION);
Toolkit::Internal::TextEditor& editorImpl = GetImpl( editor );
- const ColorIndex* const colorIndicesBuffer1 = editorImpl.getController()->GetTextModel()->GetColorIndices();
+ const ColorIndex* const colorIndicesBuffer1 = editorImpl.GetTextController()->GetTextModel()->GetColorIndices();
DALI_TEST_CHECK( colorIndicesBuffer1 );
application.SendNotification();
application.Render();
- const ColorIndex* const colorIndicesBuffer2 = editorImpl.getController()->GetTextModel()->GetColorIndices();
+ const ColorIndex* const colorIndicesBuffer2 = editorImpl.GetTextController()->GetTextModel()->GetColorIndices();
DALI_TEST_CHECK( colorIndicesBuffer2 );
DALI_TEST_EQUALS( colorIndicesBuffer2[7], 0u, TEST_LOCATION);
END_TEST;
-}
\ No newline at end of file
+}
+
+int UtcDaliTextEditorControlBackgroundColor(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliTextEditorControlBackgroundColor\n");
+
+ TextEditor editor = TextEditor::New();
+ DALI_TEST_CHECK(editor);
+
+ Vector4 backgroundColor;
+
+ editor.SetProperty(TextEditor::Property::TEXT, "Background Color");
+ application.GetScene().Add(editor);
+ application.SendNotification();
+ application.Render();
+
+ Toolkit::Internal::TextEditor& editorImpl = GetImpl(editor);
+ ControllerPtr controller = editorImpl.GetTextController();
+ Controller::Impl& controllerImpl = Controller::Impl::GetImplementation(*controller.Get());
+
+ // Default color is transparent
+ controllerImpl.mEditableControlInterface->GetControlBackgroundColor(backgroundColor);
+ DALI_TEST_EQUALS(backgroundColor, Color::TRANSPARENT, TEST_LOCATION);
+
+ // Set background color to red
+ editor.SetBackgroundColor(Color::RED);
+ application.SendNotification();
+ application.Render();
+
+ // Should be red
+ controllerImpl.mEditableControlInterface->GetControlBackgroundColor(backgroundColor);
+ DALI_TEST_EQUALS(backgroundColor, Color::RED, TEST_LOCATION);
+
+ END_TEST;
+}