[apps/shared] Move partial class values controller and function

parameter controller to shared to be used by sequences

Change-Id: I7908c184c757bb35856763bd339d3b34cf4ffe81
This commit is contained in:
Émilie Feral
2017-02-24 16:05:45 +01:00
parent c51d7cda01
commit 7acac8cec7
9 changed files with 504 additions and 354 deletions

View File

@@ -1,36 +1,26 @@
#ifndef GRAPH_FUNCTION_PARAM_CONTROLLER_H
#define GRAPH_FUNCTION_PARAM_CONTROLLER_H
#include <escher.h>
#include "../cartesian_function.h"
#include "../../shared/values_function_parameter_controller.h"
namespace Graph {
class ValuesController;
class FunctionParameterController : public ViewController, public SimpleListViewDataSource {
class FunctionParameterController : public Shared::ValuesFunctionParameterController {
public:
FunctionParameterController(ValuesController * valuesController);
View * view() override;
const char * title() const override;
bool handleEvent(Ion::Events::Event event) override;
void didBecomeFirstResponder() override;
int numberOfRows() override;
KDCoordinate cellHeight() override;
HighlightCell * reusableCell(int index) override;
int reusableCellCount() override;
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
void setFunction(CartesianFunction * function);
void setFunction(Shared::Function * function) override;
private:
constexpr static int k_totalNumberOfCell = 2;
constexpr static int k_maxNumberOfCharsInTitle = 16;
char m_pageTitle[k_maxNumberOfCharsInTitle];
PointerTableCellWithSwitch m_displayDerivativeColumn;
PointerTableCellWithChevron m_copyColumn;
SelectableTableView m_selectableTableView;
CartesianFunction * m_function;
CartesianFunction * m_cartesianFunction;
ValuesController * m_valuesController;
};