Files
Upsilon/apps/graph/values/storage_values_controller.h
Émilie Feral 698332c355 [escher] InputTextDelegate and LayoutFieldDelegate don't inherit from
InputTextDelegate to avoid diamond inheritance
2018-11-23 12:04:03 +01:00

45 lines
2.0 KiB
C++

#ifndef GRAPH_VALUES_CONTROLLER_H
#define GRAPH_VALUES_CONTROLLER_H
#include "../storage_cartesian_function_store.h"
#include "../../shared/buffer_function_title_cell.h"
#include "../../shared/storage_values_controller.h"
#include "../../shared/interval_parameter_controller.h"
#include "storage_derivative_parameter_controller.h"
#include "storage_function_parameter_controller.h"
namespace Graph {
class StorageValuesController : public Shared::StorageValuesController {
public:
StorageValuesController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, 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:
constexpr static int k_maxNumberOfCells = 50;
constexpr static int k_maxNumberOfFunctions = 5;
Ion::Storage::Record recordAtColumn(int i) override;
bool isDerivativeColumn(int i);
void configureDerivativeFunction();
int maxNumberOfCells() override;
int maxNumberOfFunctions() override;
double evaluationOfAbscissaAtColumn(double abscissa, int columnIndex) override;
StorageCartesianFunctionStore * functionStore() const override { return static_cast<StorageCartesianFunctionStore *>(Shared::StorageValuesController::functionStore()); }
Shared::BufferFunctionTitleCell * functionTitleCells(int j) override;
EvenOddBufferTextCell * floatCells(int j) override;
StorageFunctionParameterController * functionParameterController() override;
Shared::BufferFunctionTitleCell m_functionTitleCells[k_maxNumberOfFunctions];
EvenOddBufferTextCell m_floatCells[k_maxNumberOfCells];
StorageFunctionParameterController m_functionParameterController;
Shared::IntervalParameterController m_intervalParameterController;
StorageDerivativeParameterController m_derivativeParameterController;
};
}
#endif