[ion] Update the Event model

Change-Id: I41a53caeb7dd8a15e7934f49675f6a53be8fe7be
This commit is contained in:
Romain Goyet
2016-11-09 17:31:26 +01:00
committed by Émilie Feral
parent b220ed5dd8
commit b87f06e3a2
34 changed files with 862 additions and 565 deletions

View File

@@ -49,18 +49,17 @@ bool InputViewController::handleEvent(Ion::Events::Event event) {
if (!isDisplayingModal()) {
return false;
}
switch (event) {
case Ion::Events::Event::ENTER:
m_successAction.perform(this);
dismissModalViewController();
return true;
case Ion::Events::Event::ESC:
m_failureAction.perform(this);
dismissModalViewController();
return true;
default:
return false;
if (event == Ion::Events::OK) {
m_successAction.perform(this);
dismissModalViewController();
return true;
}
if (event == Ion::Events::Back) {
m_failureAction.perform(this);
dismissModalViewController();
return true;
}
return false;
}
void InputViewController::edit(Responder * caller, const char * initialContent, void * context, Invocation::Action successAction, Invocation::Action failureAction) {