mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps] Access *DelegateApp() through app()
This commit is contained in:
committed by
EmilieNumworks
parent
2888eddd06
commit
4111927bae
@@ -69,7 +69,7 @@ bool EditExpressionController::textFieldDidReceiveEvent(::TextField * textField,
|
||||
if (inputViewDidReceiveEvent(event, shouldDuplicateLastCalculation)) {
|
||||
return true;
|
||||
}
|
||||
return textFieldDelegateApp()->textFieldDidReceiveEvent(textField, event);
|
||||
return app()->textFieldDidReceiveEvent(textField, event);
|
||||
}
|
||||
|
||||
bool EditExpressionController::textFieldDidFinishEditing(::TextField * textField, const char * text, Ion::Events::Event event) {
|
||||
@@ -85,7 +85,7 @@ bool EditExpressionController::layoutFieldDidReceiveEvent(::LayoutField * layout
|
||||
if (inputViewDidReceiveEvent(event, shouldDuplicateLastCalculation)) {
|
||||
return true;
|
||||
}
|
||||
return expressionFieldDelegateApp()->layoutFieldDidReceiveEvent(layoutField, event);
|
||||
return app()->layoutFieldDidReceiveEvent(layoutField, event);
|
||||
}
|
||||
|
||||
bool EditExpressionController::layoutFieldDidFinishEditing(::LayoutField * layoutField, Layout layoutR, Ion::Events::Event event) {
|
||||
|
||||
@@ -33,18 +33,18 @@ void TangentGraphController::viewWillAppear() {
|
||||
void TangentGraphController::didBecomeFirstResponder() {
|
||||
if (curveView()->isMainViewSelected()) {
|
||||
m_bannerView->abscissaValue()->setParentResponder(this);
|
||||
m_bannerView->abscissaValue()->setDelegates(textFieldDelegateApp(), this);
|
||||
m_bannerView->abscissaValue()->setDelegates(app(), this);
|
||||
app()->setFirstResponder(m_bannerView->abscissaValue());
|
||||
}
|
||||
}
|
||||
|
||||
bool TangentGraphController::textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) {
|
||||
double floatBody;
|
||||
if (textFieldDelegateApp()->hasUndefinedValue(text, floatBody)) {
|
||||
if (app()->hasUndefinedValue(text, floatBody)) {
|
||||
return false;
|
||||
}
|
||||
ExpiringPointer<CartesianFunction> function = app()->functionStore()->modelForRecord(m_record);
|
||||
double y = function->evaluateAtAbscissa(floatBody, textFieldDelegateApp()->localContext());
|
||||
double y = function->evaluateAtAbscissa(floatBody, app()->localContext());
|
||||
m_cursor->moveTo(floatBody, y);
|
||||
interactiveCurveViewRange()->panToMakePointVisible(m_cursor->x(), m_cursor->y(), cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio);
|
||||
reloadBannerView();
|
||||
|
||||
@@ -211,7 +211,7 @@ bool CalculationController::textFieldShouldFinishEditing(TextField * textField,
|
||||
|
||||
bool CalculationController::textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) {
|
||||
double floatBody;
|
||||
if (textFieldDelegateApp()->hasUndefinedValue(text, floatBody)) {
|
||||
if (app()->hasUndefinedValue(text, floatBody)) {
|
||||
return false;
|
||||
}
|
||||
if (m_calculation->type() != Calculation::Type::FiniteIntegral && selectedColumn() == 2) {
|
||||
|
||||
@@ -62,11 +62,11 @@ float GraphController::interestingXHalfRange() const {
|
||||
|
||||
bool GraphController::textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) {
|
||||
double floatBody;
|
||||
if (textFieldDelegateApp()->hasUndefinedValue(text, floatBody)) {
|
||||
if (app()->hasUndefinedValue(text, floatBody)) {
|
||||
return false;
|
||||
}
|
||||
floatBody = std::fmax(0, std::round(floatBody));
|
||||
double y = yValue(selectedCurveIndex(), floatBody, textFieldDelegateApp()->localContext());
|
||||
double y = yValue(selectedCurveIndex(), floatBody, app()->localContext());
|
||||
m_cursor->moveTo(floatBody, y);
|
||||
interactiveCurveViewRange()->panToMakePointVisible(m_cursor->x(), m_cursor->y(), cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio);
|
||||
reloadBannerView();
|
||||
|
||||
@@ -72,7 +72,7 @@ bool ListParameterController::textFieldDidFinishEditing(TextField * textField, c
|
||||
/* -1 to take into account a double recursive sequence, which has
|
||||
* SecondIndex = FirstIndex + 1 */
|
||||
double floatBody;
|
||||
if (textFieldDelegateApp()->hasUndefinedValue(text, floatBody)) {
|
||||
if (app()->hasUndefinedValue(text, floatBody)) {
|
||||
return false;
|
||||
}
|
||||
int index = std::round(floatBody);
|
||||
|
||||
@@ -78,7 +78,7 @@ bool DisplayModeController::textFieldShouldFinishEditing(TextField * textField,
|
||||
|
||||
bool DisplayModeController::textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) {
|
||||
double floatBody;
|
||||
if (textFieldDelegateApp()->hasUndefinedValue(text, floatBody)) {
|
||||
if (app()->hasUndefinedValue(text, floatBody)) {
|
||||
return false;
|
||||
}
|
||||
if (floatBody < 1) {
|
||||
|
||||
Reference in New Issue
Block a user