Files
Upsilon/apps/shared/list_parameter_controller.h
Émilie Feral adc80cd71b [apps][escher] I18n
Change-Id: I4d6f40155a8a182184af9ef2a583d0469196ffd5
2017-03-16 15:12:12 +01:00

40 lines
1.2 KiB
C++

#ifndef SHARED_LIST_PARAM_CONTROLLER_H
#define SHARED_LIST_PARAM_CONTROLLER_H
#include <escher.h>
#include "function.h"
#include "function_store.h"
#include "../i18n.h"
namespace Shared {
class ListParameterController : public ViewController, public SimpleListViewDataSource {
public:
ListParameterController(Responder * parentResponder, FunctionStore * functionStore, I18n::Message functionColorMessage, I18n::Message deleteFunctionMessage);
View * view() override;
const char * title() override;
bool handleEvent(Ion::Events::Event event) override;
virtual void setFunction(Function * function);
void didBecomeFirstResponder() override;
int numberOfRows() override;
KDCoordinate cellHeight() override;
HighlightCell * reusableCell(int index) override;
int reusableCellCount() override;
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
protected:
bool handleEnterOnRow(int rowIndex);
SelectableTableView m_selectableTableView;
FunctionStore * m_functionStore;
Function * m_function;
private:
constexpr static int k_totalNumberOfCell = 3;
PointerTableCellWithChevron m_colorCell;
PointerTableCellWithSwitch m_enableCell;
PointerTableCell m_deleteCell;
};
}
#endif