Files
Upsilon/apps/graph/values/function_parameter_controller.h
Émilie Feral b12bf3641b [apps/graph/values] Enable to decide wheter to display the derivative
from the function parameter page

Change-Id: Iba4ad9fed4bafebeea3ef7f667a3f90f640d1db7
2016-10-24 10:36:55 +02:00

40 lines
1.1 KiB
C++

#ifndef GRAPH_FUNCTION_PARAM_CONTROLLER_H
#define GRAPH_FUNCTION_PARAM_CONTROLLER_H
#include <escher.h>
#include "../function.h"
namespace Graph {
class FunctionParameterController : public ViewController, public ListViewDataSource {
public:
FunctionParameterController(Responder * parentResponder);
View * view() override;
const char * title() const override;
bool handleEvent(Ion::Events::Event event) override;
void didBecomeFirstResponder() override;
void setActiveCell(int index);
int numberOfRows() override;
KDCoordinate cellHeight() override;
View * reusableCell(int index) override;
int reusableCellCount() override;
void willDisplayCellForIndex(View * cell, int index) override;
void setFunction(Function * function);
private:
bool handleEnter();
constexpr static int k_totalNumberOfCell = 2;
constexpr static int k_maxNumberOfCharsInTitle = 16;
char m_pageTitle[k_maxNumberOfCharsInTitle];
SwitchListViewCell m_displayDerivativeColumn;
ListViewCell m_copyColumn;
ListView m_listView;
int m_activeCell;
Function * m_function;
};
}
#endif