Files
Upsilon/apps/sequence/list/sequence_expression_cell.h
Émilie Feral 8cfdc66e48 [apps/sequence/list] Edit the selected sequence when clicking on OK (or
event with text)

Change-Id: Ib9ac0c0605424cb3e57b0e3e5dcd64bd99ea97e3
2017-02-16 16:34:11 +01:00

37 lines
1.1 KiB
C++

#ifndef SEQUENCE_SEQUENCE_EXPRESSION_CELL_H
#define SEQUENCE_SEQUENCE_EXPRESSION_CELL_H
#include "../sequence.h"
#include <escher.h>
namespace Sequence {
class SequenceExpressionCell : public Responder, public EvenOddCell {
public:
SequenceExpressionCell(Responder * parentResponder);
void setSequence(Sequence * sequence);
Sequence * sequence();
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;
void drawRect(KDContext * ctx, KDRect rect) const override;
bool handleEvent(Ion::Events::Event event) override;
private:
constexpr static KDCoordinate k_separatorThickness = 1;
void editExpression(Ion::Events::Event event);
Sequence * m_sequence;
int m_numberOfSubCells;
int m_selectedSubCell;
EvenOddExpressionCell m_expressionView;
EvenOddExpressionCell m_firstInitialConditionView;
EvenOddExpressionCell m_secondInitialConditionView;
};
}
#endif