Files
Upsilon/apps/sequence/list/sequence_cell.h
Émilie Feral b796098e8f [apps/Sequence/list] Make sequence cell responder
Change-Id: I3250845b59524a3841bb45e7845c97746860c428
2017-02-16 16:34:11 +01:00

33 lines
805 B
C++

#ifndef SEQUENCE_SEQUENCE_CELL_H
#define SEQUENCE_SEQUENCE_CELL_H
#include "../sequence.h"
#include <escher.h>
namespace Sequence {
class SequenceCell : public EvenOddCell, public Responder {
public:
SequenceCell(Responder * parentResponder);
virtual void setSequence(Sequence * sequence);
int numberOfSubCells();
int selectedSubCell();
void selectSubCell(int index);
void setHighlighted(bool highlight) override;
void setEven(bool even) override;
int numberOfSubviews() const override;
View * subviewAtIndex(int index) override;
void layoutSubviews() override;
protected:
constexpr static KDCoordinate k_separatorThickness = 1;
int m_numberOfSubCells;
int m_selectedSubCell;
Sequence * m_sequence;
private:
virtual EvenOddCell * viewAtIndex(int index) = 0;
};
}
#endif