[apps/graph/graph] Make the cursor position belong to th emodel

"GraphWindow"

Change-Id: I8cdcda85f0e29e4b678829f39b8bd212cd8d1086
This commit is contained in:
Émilie Feral
2016-12-28 13:27:03 +01:00
parent 6753974724
commit b8eba2c42a
16 changed files with 252 additions and 271 deletions

View File

@@ -4,10 +4,10 @@
namespace Graph {
GoToParameterController::GoToParameterController(Responder * parentResponder, GraphView * graphView) :
GoToParameterController::GoToParameterController(Responder * parentResponder, GraphWindow * graphWindow) :
FloatParameterController(parentResponder),
m_abscisseCell(EditableTextMenuListCell(&m_selectableTableView, this, m_draftTextBuffer, (char*)"x")),
m_graphView(graphView),
m_graphWindow(graphWindow),
m_function(nullptr)
{
}
@@ -23,12 +23,12 @@ const char * GoToParameterController::title() const {
float GoToParameterController::parameterAtIndex(int index) {
assert(index == 0);
return m_graphView->xCursorPosition();
return m_graphWindow->xCursorPosition();
}
void GoToParameterController::setParameterAtIndex(int parameterIndex, float f) {
assert(parameterIndex == 0);
m_graphView->goToAbscissaOnFunction(f, m_function);
m_graphWindow->setCursorPositionAtAbscissaWithFunction(f, m_function);
}
int GoToParameterController::numberOfRows() {