const Size CONTROL_SIZE(300.f, 60.f);
-std::string gClipboardText;
-void ContentSelectedCallback(TextClipboardEventNotifier& notifier)
-{
- gClipboardText = notifier.GetContent();
-}
-
// Generate a KeyEvent to send to Core.
Dali::KeyEvent GenerateKey(const std::string& keyName,
const std::string& keyString,
controller->GetText(text);
DALI_TEST_CHECK(text.empty());
- TextClipboardEventNotifier clipboardEventNotifier = TextClipboardEventNotifier::Get();
- clipboardEventNotifier.ContentSelectedSignal().Connect(&ContentSelectedCallback);
-
// Paste the text.
button = PushButton::DownCast(textPopup.FindChildByName(OPTION_PASTE));
DALI_TEST_CHECK(button);
// Call relayout to process the input events.
controller->Relayout(CONTROL_SIZE);
+ controller->GetText(text);
- DALI_TEST_EQUALS("Hello world", gClipboardText, TEST_LOCATION);
+ DALI_TEST_EQUALS("Hello world", text.c_str(), TEST_LOCATION);
// Show the clipboard.
button = PushButton::DownCast(textPopup.FindChildByName(OPTION_CLIPBOARD));