values_controller.h
1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef GRAPH_VALUES_CONTROLLER_H
#define GRAPH_VALUES_CONTROLLER_H
#include "../cartesian_function_store.h"
#include "../../shared/buffer_function_title_cell.h"
#include "../../shared/values_controller.h"
#include "../../shared/interval_parameter_controller.h"
#include "derivative_parameter_controller.h"
#include "function_parameter_controller.h"
namespace Graph {
class ValuesController : public Shared::ValuesController {
public:
ValuesController(Responder * parentResponder, CartesianFunctionStore * functionStore, Shared::Interval * interval, ButtonRowController * header);
bool handleEvent(Ion::Events::Event event) override;
void willDisplayCellAtLocation(HighlightCell * cell, int i, int j) override;
I18n::Message emptyMessage() override;
Shared::IntervalParameterController * intervalParameterController() override;
void updateNumberOfColumns() override;
private:
CartesianFunction * functionAtColumn(int i) override;
bool isDerivativeColumn(int i);
void configureDerivativeFunction();
int maxNumberOfCells() override;
int maxNumberOfFunctions() override;
double evaluationOfAbscissaAtColumn(double abscissa, int columnIndex) override;
constexpr static int k_maxNumberOfCells = 50;
constexpr static int k_maxNumberOfFunctions = 5;
Shared::BufferFunctionTitleCell * m_functionTitleCells[k_maxNumberOfFunctions];
Shared::BufferFunctionTitleCell * functionTitleCells(int j) override;
EvenOddBufferTextCell * m_floatCells[k_maxNumberOfCells];
EvenOddBufferTextCell * floatCells(int j) override;
CartesianFunctionStore * m_functionStore;
CartesianFunctionStore * functionStore() const override;
FunctionParameterController m_functionParameterController;
FunctionParameterController * functionParameterController() override;
View * loadView() override;
void unloadView(View * view) override;
Shared::IntervalParameterController m_intervalParameterController;
DerivativeParameterController m_derivativeParameterController;
};
}
#endif