[apps/graph/values] Display the parameter page when selecting the

abscissa title

Change-Id: I12e13baa3f2274064748710d6c8c48b4cb663941
This commit is contained in:
Émilie Feral
2016-10-17 18:10:17 +02:00
parent 5e524bf0bc
commit c9fdafb04b
2 changed files with 11 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ ValuesController::ValuesController(Responder * parentResponder, FunctionStore *
m_functionStore(functionStore),
m_evaluateContext(evaluateContext),
m_parameterController(ValuesParameterController(this, &m_interval)),
m_abscissaParameterController(AbscissaParameterController(this)),
m_setIntervalButton(Button(this, "Regler l'intervalle",Invocation([](void * context, void * sender) {
ValuesController * valuesController = (ValuesController *) context;
StackViewController * stack = ((StackViewController *)valuesController->parentResponder());
@@ -183,6 +184,7 @@ bool ValuesController::handleEvent(Ion::Events::Event event) {
case Ion::Events::Event::ENTER:
if (m_activeCellX == 0) {
if (m_activeCellY == 0) {
configureAbscissa();
return true;
}
editValue(false);
@@ -201,6 +203,12 @@ bool ValuesController::handleEvent(Ion::Events::Event event) {
}
}
void ValuesController::configureAbscissa() {
StackViewController * stack = ((StackViewController *)parentResponder());
stack->push(&m_abscissaParameterController);
}
void ValuesController::editValue(bool overwrite, char initialDigit) {
/* This code assumes that the active cell remains the one which is edited
* until the invocation is performed. This could lead to concurrency issue in