Files
Upsilon/apps/sequence/graph/curve_parameter_controller.cpp
Émilie Feral 43f17faa2e [apps/sequence/graph] Display the term sum controller from the curve
parameter page

Change-Id: Ice645614e67ed40e0001a48b69a8c4d8b284179d
2017-03-03 09:38:53 +01:00

55 lines
1.4 KiB
C++

#include "curve_parameter_controller.h"
#include "graph_controller.h"
#include <assert.h>
using namespace Shared;
namespace Sequence {
CurveParameterController::CurveParameterController(GraphController * graphController, InteractiveCurveViewRange * graphRange, CurveViewCursor * cursor) :
FunctionCurveParameterController(graphRange, cursor),
m_sumCell(PointerTableCell((char*)"Somme des termes")),
m_graphController(graphController)
{
}
const char * CurveParameterController::title() const {
return "Options de la suite";
}
bool CurveParameterController::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::OK) {
switch (m_selectableTableView.selectedRow()) {
case 0:
{
StackViewController * stack = (StackViewController *)parentResponder();
stack->pop();
m_graphController->displayTermSumController();
return true;
}
case 1:
return handleGotoSelection();
default:
return false;
}
}
return false;
}
int CurveParameterController::numberOfRows() {
return k_totalNumberOfCells;
};
HighlightCell * CurveParameterController::reusableCell(int index) {
assert(index >= 0);
assert(index < k_totalNumberOfCells);
HighlightCell * cells[] = {&m_sumCell, &m_goToCell};
return cells[index];
}
int CurveParameterController::reusableCellCount() {
return k_totalNumberOfCells;
}
}