mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/eschr] Rename textFieldDidHandleEvent parameter textSizeDidChange
This commit is contained in:
@@ -373,7 +373,7 @@ bool MenuController::textFieldDidAbortEditing(TextField * textField) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MenuController::textFieldDidHandleEvent(TextField * textField, bool returnValue, bool textHasChanged) {
|
||||
bool MenuController::textFieldDidHandleEvent(TextField * textField, bool returnValue, bool textSizeDidChange) {
|
||||
int scriptExtensionLength = 1 + strlen(ScriptStore::k_scriptExtension);
|
||||
if (textField->isEditing() && textField->cursorLocation() > textField->draftTextLength() - scriptExtensionLength) {
|
||||
textField->setCursorLocation(textField->draftTextLength() - scriptExtensionLength);
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
bool textFieldDidReceiveEvent(TextField * textField, Ion::Events::Event event) override;
|
||||
bool textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) override;
|
||||
bool textFieldDidAbortEditing(TextField * textField) override;
|
||||
bool textFieldDidHandleEvent(TextField * textField, bool returnValue, bool textHasChanged) override;
|
||||
bool textFieldDidHandleEvent(TextField * textField, bool returnValue, bool textSizeDidChange) override;
|
||||
|
||||
/* ButtonRowDelegate */
|
||||
int numberOfButtons(ButtonRowController::Position position) const override { return 1; }
|
||||
|
||||
@@ -187,8 +187,8 @@ void CalculationController::willDisplayCellAtLocation(HighlightCell * cell, int
|
||||
}
|
||||
}
|
||||
|
||||
bool CalculationController::textFieldDidHandleEvent(::TextField * textField, bool returnValue, bool textHasChanged) {
|
||||
if (returnValue && textHasChanged) {
|
||||
bool CalculationController::textFieldDidHandleEvent(::TextField * textField, bool returnValue, bool textSizeDidChange) {
|
||||
if (returnValue && textSizeDidChange) {
|
||||
/* We do not reload the responder because the first responder might be the
|
||||
* toolbox (or the variable box) and reloading the responder would corrupt
|
||||
* the first responder. */
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
void willDisplayCellAtLocation(HighlightCell * cell, int i, int j) override;
|
||||
|
||||
/* TextField delegate */
|
||||
bool textFieldDidHandleEvent(TextField * textField, bool returnValue, bool textHasChanged) override;
|
||||
bool textFieldDidHandleEvent(TextField * textField, bool returnValue, bool textSizeDidChange) override;
|
||||
bool textFieldShouldFinishEditing(TextField * textField, Ion::Events::Event event) override;
|
||||
bool textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) override;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public:
|
||||
virtual bool textFieldDidReceiveEvent(TextField * textField, Ion::Events::Event event) = 0;
|
||||
virtual bool textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) { return false; };
|
||||
virtual bool textFieldDidAbortEditing(TextField * textField) {return false;};
|
||||
virtual bool textFieldDidHandleEvent(TextField * textField, bool returnValue, bool textHasChanged) { return returnValue; };
|
||||
virtual bool textFieldDidHandleEvent(TextField * textField, bool returnValue, bool textSizeDidChange) { return returnValue; };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -419,7 +419,7 @@ bool TextField::handleEventWithText(const char * eventText, bool indentation, bo
|
||||
|
||||
if (eventTextLength == 0) {
|
||||
setCursorLocation(0);
|
||||
return m_delegate->textFieldDidHandleEvent(this, true, true);
|
||||
return m_delegate->textFieldDidHandleEvent(this, true, previousTextLength != 0);
|
||||
}
|
||||
|
||||
size_t eventTextSize = min(eventTextLength + 1, TextField::maxBufferSize());
|
||||
|
||||
Reference in New Issue
Block a user