Files
Upsilon/apps/graph/graph/graph_controller.cpp
Romain Goyet 753a4a7cb5 [Ion] Move to C++
Change-Id: Id75fca5e92a3fdf18258015bcda7cd70297b0fdb
2016-08-23 16:30:15 +02:00

34 lines
662 B
C++

#include "graph_controller.h"
GraphController::GraphController(Responder * parentResponder, Graph::FunctionStore * functionStore) :
ViewController(parentResponder),
m_view(GraphView(functionStore))
{
}
View * GraphController::view() {
return &m_view;
}
const char * GraphController::title() const {
return "Graphique";
}
void GraphController::setFocused(bool focused) {
/*
if (focused) {
App::runningApp()->focus(&m_view);
}
*/
}
bool GraphController::handleEvent(Ion::Events::Event event) {
switch (event) {
case Ion::Events::Event::ENTER:
m_view.moveCursorRight();
return true;
default:
return false;
}
}