mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 17:50:04 +01:00
33 lines
1.0 KiB
C++
33 lines
1.0 KiB
C++
#ifndef SHARED_TEXT_FIELD_DELEGATE_APP_H
|
|
#define SHARED_TEXT_FIELD_DELEGATE_APP_H
|
|
|
|
#include <poincare/context.h>
|
|
#include <escher.h>
|
|
#include "../i18n.h"
|
|
|
|
class AppsContainer;
|
|
|
|
namespace Shared {
|
|
|
|
class TextFieldDelegateApp : public ::App, public TextFieldDelegate {
|
|
public:
|
|
virtual ~TextFieldDelegateApp() = default;
|
|
virtual Poincare::Context * localContext();
|
|
AppsContainer * container();
|
|
virtual char XNT();
|
|
bool textFieldShouldFinishEditing(TextField * textField, Ion::Events::Event event) override;
|
|
virtual bool textFieldDidReceiveEvent(TextField * textField, Ion::Events::Event event) override;
|
|
Toolbox * toolboxForTextInput(TextInput * textInput) override;
|
|
protected:
|
|
TextFieldDelegateApp(Container * container, Snapshot * snapshot, ViewController * rootViewController);
|
|
protected:
|
|
bool fieldDidReceiveEvent(Field * field, Responder * responder, Ion::Events::Event event);
|
|
void forceEdition(Field * field);
|
|
bool isFinishingEvent(Ion::Events::Event event);
|
|
bool unparsableText(const char * text, Responder * responder);
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|