[escher] Add toolbox event handling in responder [apps] Correct the text

field delegate app accordingly

Change-Id: I180fe53aaa1e0929b357d3985f584937fba2ecca
This commit is contained in:
Émilie Feral
2017-02-15 17:53:13 +01:00
parent 5b73eed76a
commit c584d1fb4e
22 changed files with 175 additions and 136 deletions

View File

@@ -3,6 +3,8 @@
#include "../apps_container.h"
#include <assert.h>
using namespace Shared;
namespace Calculation {
EditExpressionController::ContentView::ContentView(Responder * parentResponder, TableView * subview, TextFieldDelegate * textFieldDelegate) :
@@ -75,11 +77,6 @@ void EditExpressionController::didBecomeFirstResponder() {
app()->setFirstResponder(m_contentView.textField());
}
bool EditExpressionController::textFieldDidReceiveEvent(::TextField * textField, Ion::Events::Event event) {
App * myApp = (App *)app();
return myApp->textFieldDidReceiveEvent(textField, event);
}
bool EditExpressionController::textFieldDidFinishEditing(::TextField * textField, const char * text) {
App * calculationApp = (App *)app();
m_calculationStore->push(textBody(), calculationApp->localContext());
@@ -89,4 +86,8 @@ bool EditExpressionController::textFieldDidFinishEditing(::TextField * textField
return true;
}
TextFieldDelegateApp * EditExpressionController::textFieldDelegateApp() {
return (App *)app();
}
}