mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Get rid of App casts
This commit is contained in:
committed by
EmilieNumworks
parent
eaa4758367
commit
21907fb89a
@@ -1,6 +1,7 @@
|
||||
#include "graph_controller.h"
|
||||
#include <cmath>
|
||||
#include <limits.h>
|
||||
#include "../app.h"
|
||||
|
||||
using namespace Shared;
|
||||
using namespace Poincare;
|
||||
@@ -10,7 +11,7 @@ namespace Sequence {
|
||||
static inline int minInt(int x, int y) { return (x < y ? x : y); }
|
||||
static inline int maxInt(int x, int y) { return (x > y ? x : y); }
|
||||
|
||||
GraphController::GraphController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, SequenceStore * sequenceStore, CurveViewRange * graphRange, CurveViewCursor * cursor, int * indexFunctionSelectedByCursor, uint32_t * modelVersion, uint32_t * rangeVersion, Preferences::AngleUnit * angleUnitVersion, ButtonRowController * header) :
|
||||
GraphController::GraphController(Responder * parentResponder, ::InputEventHandlerDelegate * inputEventHandlerDelegate, SequenceStore * sequenceStore, CurveViewRange * graphRange, CurveViewCursor * cursor, int * indexFunctionSelectedByCursor, uint32_t * modelVersion, uint32_t * rangeVersion, Preferences::AngleUnit * angleUnitVersion, ButtonRowController * header) :
|
||||
FunctionGraphController(parentResponder, inputEventHandlerDelegate, header, graphRange, &m_view, cursor, indexFunctionSelectedByCursor, modelVersion, rangeVersion, angleUnitVersion),
|
||||
m_bannerView(this, inputEventHandlerDelegate, this),
|
||||
m_view(sequenceStore, graphRange, m_cursor, &m_bannerView, &m_cursorView),
|
||||
@@ -95,8 +96,7 @@ bool GraphController::moveCursorHorizontally(int direction) {
|
||||
return false;
|
||||
}
|
||||
Sequence * s = functionStore()->modelForRecord(functionStore()->activeRecordAtIndex(indexFunctionSelectedByCursor()));
|
||||
TextFieldDelegateApp * myApp = (TextFieldDelegateApp *)app();
|
||||
double y = s->evaluateAtAbscissa(x, myApp->localContext());
|
||||
double y = s->evaluateAtAbscissa(x, app()->localContext());
|
||||
m_cursor->moveTo(x, y);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user