[escher] Clean Field and Input class hierarchy:

Class hierarchy:
- InputEventHandler
- TextInput
- EditableField derives from InputEventHandler
- LayoutField, TextField and ExpressioField derives from EditableField
- TextArea and TextField derives from TextInput
This commit is contained in:
Émilie Feral
2018-10-19 14:31:50 +02:00
parent c2adbe28c5
commit 01e433a9f2
36 changed files with 123 additions and 85 deletions

View File

@@ -109,14 +109,14 @@ bool App::handleEvent(Ion::Events::Event event) {
return false;
}
bool App::textInputDidReceiveEvent(TextInput * textInput, Ion::Events::Event event) {
bool App::textInputDidReceiveEvent(InputEventHandler * textInput, Ion::Events::Event event) {
const char * pythonText = Helpers::PythonTextForEvent(event);
if (pythonText != nullptr) {
textInput->handleEventWithText(pythonText);
return true;
}
if (event == Ion::Events::Var) {
m_variableBoxController.setTextInputCaller(textInput);
m_variableBoxController.setSender(textInput);
displayModalViewController(&m_variableBoxController, 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpLeftMargin, 0, Metric::PopUpRightMargin);
return true;
}